Merge
authorduke
Wed, 05 Jul 2017 17:01:52 +0200
changeset 4001 6da7a2a1e3d6
parent 4000 17d415c7180f (current diff)
parent 3992 97c4dc55fbad (diff)
child 4002 4e7661eaa211
Merge
jdk/src/share/native/sun/security/ec/ec.h
jdk/src/share/native/sun/security/ec/ec2.h
jdk/src/share/native/sun/security/ec/ec2_163.c
jdk/src/share/native/sun/security/ec/ec2_193.c
jdk/src/share/native/sun/security/ec/ec2_233.c
jdk/src/share/native/sun/security/ec/ec2_aff.c
jdk/src/share/native/sun/security/ec/ec2_mont.c
jdk/src/share/native/sun/security/ec/ec_naf.c
jdk/src/share/native/sun/security/ec/ecc_impl.h
jdk/src/share/native/sun/security/ec/ecdecode.c
jdk/src/share/native/sun/security/ec/ecl-curve.h
jdk/src/share/native/sun/security/ec/ecl-exp.h
jdk/src/share/native/sun/security/ec/ecl-priv.h
jdk/src/share/native/sun/security/ec/ecl.c
jdk/src/share/native/sun/security/ec/ecl.h
jdk/src/share/native/sun/security/ec/ecl_curve.c
jdk/src/share/native/sun/security/ec/ecl_gf.c
jdk/src/share/native/sun/security/ec/ecl_mult.c
jdk/src/share/native/sun/security/ec/ecp.h
jdk/src/share/native/sun/security/ec/ecp_192.c
jdk/src/share/native/sun/security/ec/ecp_224.c
jdk/src/share/native/sun/security/ec/ecp_256.c
jdk/src/share/native/sun/security/ec/ecp_384.c
jdk/src/share/native/sun/security/ec/ecp_521.c
jdk/src/share/native/sun/security/ec/ecp_aff.c
jdk/src/share/native/sun/security/ec/ecp_jac.c
jdk/src/share/native/sun/security/ec/ecp_jm.c
jdk/src/share/native/sun/security/ec/ecp_mont.c
jdk/src/share/native/sun/security/ec/logtab.h
jdk/src/share/native/sun/security/ec/mp_gf2m-priv.h
jdk/src/share/native/sun/security/ec/mp_gf2m.c
jdk/src/share/native/sun/security/ec/mp_gf2m.h
jdk/src/share/native/sun/security/ec/mpi-config.h
jdk/src/share/native/sun/security/ec/mpi-priv.h
jdk/src/share/native/sun/security/ec/mpi.c
jdk/src/share/native/sun/security/ec/mpi.h
jdk/src/share/native/sun/security/ec/mplogic.c
jdk/src/share/native/sun/security/ec/mplogic.h
jdk/src/share/native/sun/security/ec/mpmontg.c
jdk/src/share/native/sun/security/ec/mpprime.h
jdk/src/share/native/sun/security/ec/oid.c
jdk/src/share/native/sun/security/ec/secitem.c
jdk/src/share/native/sun/security/ec/secoidt.h
--- a/.hgtags-top-repo	Wed Oct 07 14:14:45 2009 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 17:01:52 2017 +0200
@@ -47,3 +47,4 @@
 175cb3fe615998d1004c6d3fd96e6d2e86b6772d jdk7-b70
 4c36e9853dda27bdac5ef4839a610509fbe31d34 jdk7-b71
 0d7e03b426df27c21dcc44ffb9178eacd1b04f10 jdk7-b72
+3ac6dcf7823205546fbbc3d4ea59f37358d0b0d4 jdk7-b73
--- a/corba/.hgtags	Wed Oct 07 14:14:45 2009 -0700
+++ b/corba/.hgtags	Wed Jul 05 17:01:52 2017 +0200
@@ -47,3 +47,4 @@
 175bd68779546078dbdb6dacd7f0aced79ed22b1 jdk7-b70
 3f1ef7f899ea2aec189c4fb67e5c8fa374437c50 jdk7-b71
 c793a31209263fbb867c23c752599d85c21abb73 jdk7-b72
+b751c528c55560cf2adeaeef24b39ca1f4d1cbf7 jdk7-b73
--- a/hotspot/.hgtags	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/.hgtags	Wed Jul 05 17:01:52 2017 +0200
@@ -47,3 +47,4 @@
 0632c3e615a315ff11e2ab1d64f4d82ff9853461 jdk7-b70
 50a95aa4a247f0cbbf66df285a8b1d78ffb153d9 jdk7-b71
 a94714c550658fd6741793ef036cb9625dc2ab1a jdk7-b72
+faf94d94786b621f8e13cbcc941ca69c6d967c3f jdk7-b73
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeCache.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeCache.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,6 +33,7 @@
 
 public class CodeCache {
   private static AddressField       heapField;
+  private static AddressField       scavengeRootNMethodsField;
   private static VirtualConstructor virtualConstructor;
 
   private CodeHeap heap;
@@ -49,6 +50,7 @@
     Type type = db.lookupType("CodeCache");
 
     heapField = type.getAddressField("_heap");
+    scavengeRootNMethodsField = type.getAddressField("_scavenge_root_nmethods");
 
     virtualConstructor = new VirtualConstructor(db);
     // Add mappings for all possible CodeBlob subclasses
@@ -67,6 +69,10 @@
     heap = (CodeHeap) VMObjectFactory.newObject(CodeHeap.class, heapField.getValue());
   }
 
+  public NMethod scavengeRootMethods() {
+    return (NMethod) VMObjectFactory.newObject(NMethod.class, scavengeRootNMethodsField.getValue());
+  }
+
   public boolean contains(Address p) {
     return getHeap().contains(p);
   }
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java	Wed Jul 05 17:01:52 2017 +0200
@@ -40,7 +40,10 @@
   /** != InvocationEntryBci if this nmethod is an on-stack replacement method */
   private static CIntegerField entryBCIField;
   /** To support simple linked-list chaining of nmethods */
-  private static AddressField  linkField;
+  private static AddressField  osrLinkField;
+  private static AddressField  scavengeRootLinkField;
+  private static CIntegerField scavengeRootStateField;
+
   /** Offsets for different nmethod parts */
   private static CIntegerField exceptionOffsetField;
   private static CIntegerField deoptOffsetField;
@@ -87,7 +90,10 @@
     zombieInstructionSizeField  = type.getCIntegerField("_zombie_instruction_size");
     methodField                 = type.getOopField("_method");
     entryBCIField               = type.getCIntegerField("_entry_bci");
-    linkField                   = type.getAddressField("_link");
+    osrLinkField                = type.getAddressField("_osr_link");
+    scavengeRootLinkField       = type.getAddressField("_scavenge_root_link");
+    scavengeRootStateField      = type.getCIntegerField("_scavenge_root_state");
+
     exceptionOffsetField        = type.getCIntegerField("_exception_offset");
     deoptOffsetField            = type.getCIntegerField("_deoptimize_offset");
     origPCOffsetField           = type.getCIntegerField("_orig_pc_offset");
@@ -219,10 +225,19 @@
     return getEntryBCI();
   }
 
-  public NMethod getLink() {
-    return (NMethod) VMObjectFactory.newObject(NMethod.class, linkField.getValue(addr));
+  public NMethod getOSRLink() {
+    return (NMethod) VMObjectFactory.newObject(NMethod.class, osrLinkField.getValue(addr));
   }
 
+  public NMethod getScavengeRootLink() {
+    return (NMethod) VMObjectFactory.newObject(NMethod.class, scavengeRootLinkField.getValue(addr));
+  }
+
+  public int getScavengeRootState() {
+    return (int) scavengeRootStateField.getValue(addr);
+  }
+
+
   /** Tells whether frames described by this nmethod can be
       deoptimized. Note: native wrappers cannot be deoptimized. */
   public boolean canBeDeoptimized() { return isJavaMethod(); }
--- a/hotspot/make/hotspot_version	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/make/hotspot_version	Wed Jul 05 17:01:52 2017 +0200
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=17
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=02
+HS_BUILD_NUMBER=03
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -4676,3 +4676,50 @@
     load_ptr_contents(base, G6_heapbase);
   }
 }
+
+// Compare char[] arrays aligned to 4 bytes.
+void MacroAssembler::char_arrays_equals(Register ary1, Register ary2,
+                                        Register limit, Register result,
+                                        Register chr1, Register chr2, Label& Ldone) {
+  Label Lvector, Lloop;
+  assert(chr1 == result, "should be the same");
+
+  // Note: limit contains number of bytes (2*char_elements) != 0.
+  andcc(limit, 0x2, chr1); // trailing character ?
+  br(Assembler::zero, false, Assembler::pt, Lvector);
+  delayed()->nop();
+
+  // compare the trailing char
+  sub(limit, sizeof(jchar), limit);
+  lduh(ary1, limit, chr1);
+  lduh(ary2, limit, chr2);
+  cmp(chr1, chr2);
+  br(Assembler::notEqual, true, Assembler::pt, Ldone);
+  delayed()->mov(G0, result);     // not equal
+
+  // only one char ?
+  br_on_reg_cond(rc_z, true, Assembler::pn, limit, Ldone);
+  delayed()->add(G0, 1, result); // zero-length arrays are equal
+
+  // word by word compare, dont't need alignment check
+  bind(Lvector);
+  // Shift ary1 and ary2 to the end of the arrays, negate limit
+  add(ary1, limit, ary1);
+  add(ary2, limit, ary2);
+  neg(limit, limit);
+
+  lduw(ary1, limit, chr1);
+  bind(Lloop);
+  lduw(ary2, limit, chr2);
+  cmp(chr1, chr2);
+  br(Assembler::notEqual, true, Assembler::pt, Ldone);
+  delayed()->mov(G0, result);     // not equal
+  inccc(limit, 2*sizeof(jchar));
+  // annul LDUW if branch is not taken to prevent access past end of array
+  br(Assembler::notZero, true, Assembler::pt, Lloop);
+  delayed()->lduw(ary1, limit, chr1); // hoisted
+
+  // Caller should set it:
+  // add(G0, 1, result); // equals
+}
+
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2455,6 +2455,11 @@
   void inc_counter(address counter_addr, Register Rtmp1, Register Rtmp2);
   void inc_counter(int*    counter_addr, Register Rtmp1, Register Rtmp2);
 
+  // Compare char[] arrays aligned to 4 bytes.
+  void char_arrays_equals(Register ary1, Register ary2,
+                          Register limit, Register result,
+                          Register chr1, Register chr2, Label& Ldone);
+
 #undef VIRTUAL
 
 };
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2171,7 +2171,7 @@
     // subtype which we can't check or src is the same array as dst
     // but not necessarily exactly of type default_type.
     Label known_ok, halt;
-    jobject2reg(op->expected_type()->encoding(), tmp);
+    jobject2reg(op->expected_type()->constant_encoding(), tmp);
     __ ld_ptr(dst, oopDesc::klass_offset_in_bytes(), tmp2);
     if (basic_type != T_OBJECT) {
       __ cmp(tmp, tmp2);
@@ -2429,7 +2429,7 @@
       assert(data->is_BitData(), "need BitData for checkcast");
       Register mdo      = k_RInfo;
       Register data_val = Rtmp1;
-      jobject2reg(md->encoding(), mdo);
+      jobject2reg(md->constant_encoding(), mdo);
 
       int mdo_offset_bias = 0;
       if (!Assembler::is_simm13(md->byte_offset_of_slot(data, DataLayout::header_offset()) + data->size_in_bytes())) {
@@ -2452,7 +2452,7 @@
     // patching may screw with our temporaries on sparc,
     // so let's do it before loading the class
     if (k->is_loaded()) {
-      jobject2reg(k->encoding(), k_RInfo);
+      jobject2reg(k->constant_encoding(), k_RInfo);
     } else {
       jobject2reg_with_patching(k_RInfo, op->info_for_patch());
     }
@@ -2513,7 +2513,7 @@
     // patching may screw with our temporaries on sparc,
     // so let's do it before loading the class
     if (k->is_loaded()) {
-      jobject2reg(k->encoding(), k_RInfo);
+      jobject2reg(k->constant_encoding(), k_RInfo);
     } else {
       jobject2reg_with_patching(k_RInfo, op->info_for_patch());
     }
@@ -2717,7 +2717,7 @@
   assert(op->tmp1()->is_single_cpu(), "tmp1 must be allocated");
   Register mdo  = op->mdo()->as_register();
   Register tmp1 = op->tmp1()->as_register();
-  jobject2reg(md->encoding(), mdo);
+  jobject2reg(md->constant_encoding(), mdo);
   int mdo_offset_bias = 0;
   if (!Assembler::is_simm13(md->byte_offset_of_slot(data, CounterData::count_offset()) +
                             data->size_in_bytes())) {
@@ -2774,7 +2774,7 @@
         if (receiver == NULL) {
           Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
                             mdo_offset_bias);
-          jobject2reg(known_klass->encoding(), tmp1);
+          jobject2reg(known_klass->constant_encoding(), tmp1);
           __ st_ptr(tmp1, recv_addr);
           Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
                             mdo_offset_bias);
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -668,7 +668,7 @@
   __ add(obj.result(), offset.result(), addr);
 
   if (type == objectType) {  // Write-barrier needed for Object fields.
-    pre_barrier(obj.result(), false, NULL);
+    pre_barrier(addr, false, NULL);
   }
 
   if (type == objectType)
@@ -896,7 +896,7 @@
   LIR_Opr len = length.result();
   BasicType elem_type = x->elt_type();
 
-  __ oop2reg(ciTypeArrayKlass::make(elem_type)->encoding(), klass_reg);
+  __ oop2reg(ciTypeArrayKlass::make(elem_type)->constant_encoding(), klass_reg);
 
   CodeStub* slow_path = new NewTypeArrayStub(klass_reg, len, reg, info);
   __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, elem_type, klass_reg, slow_path);
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Wed Jul 05 17:01:52 2017 +0200
@@ -2838,63 +2838,41 @@
   %}
 
 
-  enc_class enc_String_Compare(o0RegP str1, o1RegP str2, g3RegP tmp1, g4RegP tmp2, notemp_iRegI result) %{
+  enc_class enc_String_Compare(o0RegP str1, o1RegP str2, g3RegI cnt1, g4RegI cnt2, notemp_iRegI result) %{
     Label Ldone, Lloop;
     MacroAssembler _masm(&cbuf);
 
     Register   str1_reg = reg_to_register_object($str1$$reg);
     Register   str2_reg = reg_to_register_object($str2$$reg);
-    Register   tmp1_reg = reg_to_register_object($tmp1$$reg);
-    Register   tmp2_reg = reg_to_register_object($tmp2$$reg);
+    Register   cnt1_reg = reg_to_register_object($cnt1$$reg);
+    Register   cnt2_reg = reg_to_register_object($cnt2$$reg);
     Register result_reg = reg_to_register_object($result$$reg);
 
-    // Get the first character position in both strings
-    //         [8] char array, [12] offset, [16] count
-    int  value_offset = java_lang_String:: value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int  count_offset = java_lang_String:: count_offset_in_bytes();
-
-    // load str1 (jchar*) base address into tmp1_reg
-    __ load_heap_oop(str1_reg, value_offset, tmp1_reg);
-    __ ld(str1_reg, offset_offset, result_reg);
-    __ add(tmp1_reg, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1_reg);
-    __   ld(str1_reg, count_offset, str1_reg); // hoisted
-    __ sll(result_reg, exact_log2(sizeof(jchar)), result_reg);
-    __   load_heap_oop(str2_reg, value_offset, tmp2_reg); // hoisted
-    __ add(result_reg, tmp1_reg, tmp1_reg);
-
-    // load str2 (jchar*) base address into tmp2_reg
-    // __ ld_ptr(str2_reg, value_offset, tmp2_reg); // hoisted
-    __ ld(str2_reg, offset_offset, result_reg);
-    __ add(tmp2_reg, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp2_reg);
-    __   ld(str2_reg, count_offset, str2_reg); // hoisted
-    __ sll(result_reg, exact_log2(sizeof(jchar)), result_reg);
-    __   subcc(str1_reg, str2_reg, O7); // hoisted
-    __ add(result_reg, tmp2_reg, tmp2_reg);
+    assert(result_reg != str1_reg &&
+           result_reg != str2_reg &&
+           result_reg != cnt1_reg &&
+           result_reg != cnt2_reg ,
+           "need different registers");
 
     // Compute the minimum of the string lengths(str1_reg) and the
     // difference of the string lengths (stack)
 
-    // discard string base pointers, after loading up the lengths
-    // __ ld(str1_reg, count_offset, str1_reg); // hoisted
-    // __ ld(str2_reg, count_offset, str2_reg); // hoisted
-
     // See if the lengths are different, and calculate min in str1_reg.
     // Stash diff in O7 in case we need it for a tie-breaker.
     Label Lskip;
-    // __ subcc(str1_reg, str2_reg, O7); // hoisted
-    __ sll(str1_reg, exact_log2(sizeof(jchar)), str1_reg); // scale the limit
+    __ subcc(cnt1_reg, cnt2_reg, O7);
+    __ sll(cnt1_reg, exact_log2(sizeof(jchar)), cnt1_reg); // scale the limit
     __ br(Assembler::greater, true, Assembler::pt, Lskip);
-    // str2 is shorter, so use its count:
-    __ delayed()->sll(str2_reg, exact_log2(sizeof(jchar)), str1_reg); // scale the limit
+    // cnt2 is shorter, so use its count:
+    __ delayed()->sll(cnt2_reg, exact_log2(sizeof(jchar)), cnt1_reg); // scale the limit
     __ bind(Lskip);
 
-    // reallocate str1_reg, str2_reg, result_reg
+    // reallocate cnt1_reg, cnt2_reg, result_reg
     // Note:  limit_reg holds the string length pre-scaled by 2
-    Register limit_reg =   str1_reg;
-    Register  chr2_reg =   str2_reg;
+    Register limit_reg =   cnt1_reg;
+    Register  chr2_reg =   cnt2_reg;
     Register  chr1_reg = result_reg;
-    // tmp{12} are the base pointers
+    // str{12} are the base pointers
 
     // Is the minimum length zero?
     __ cmp(limit_reg, (int)(0 * sizeof(jchar))); // use cast to resolve overloading ambiguity
@@ -2902,8 +2880,8 @@
     __ delayed()->mov(O7, result_reg);  // result is difference in lengths
 
     // Load first characters
-    __ lduh(tmp1_reg, 0, chr1_reg);
-    __ lduh(tmp2_reg, 0, chr2_reg);
+    __ lduh(str1_reg, 0, chr1_reg);
+    __ lduh(str2_reg, 0, chr2_reg);
 
     // Compare first characters
     __ subcc(chr1_reg, chr2_reg, chr1_reg);
@@ -2915,7 +2893,7 @@
       // Check after comparing first character to see if strings are equivalent
       Label LSkip2;
       // Check if the strings start at same location
-      __ cmp(tmp1_reg, tmp2_reg);
+      __ cmp(str1_reg, str2_reg);
       __ brx(Assembler::notEqual, true, Assembler::pt, LSkip2);
       __ delayed()->nop();
 
@@ -2932,23 +2910,23 @@
     __ br(Assembler::equal, true, Assembler::pn, Ldone);
     __ delayed()->mov(O7, result_reg);  // result is difference in lengths
 
-    // Shift tmp1_reg and tmp2_reg to the end of the arrays, negate limit
-    __ add(tmp1_reg, limit_reg, tmp1_reg);
-    __ add(tmp2_reg, limit_reg, tmp2_reg);
+    // Shift str1_reg and str2_reg to the end of the arrays, negate limit
+    __ add(str1_reg, limit_reg, str1_reg);
+    __ add(str2_reg, limit_reg, str2_reg);
     __ neg(chr1_reg, limit_reg);  // limit = -(limit-2)
 
     // Compare the rest of the characters
-    __ lduh(tmp1_reg, limit_reg, chr1_reg);
+    __ lduh(str1_reg, limit_reg, chr1_reg);
     __ bind(Lloop);
-    // __ lduh(tmp1_reg, limit_reg, chr1_reg); // hoisted
-    __ lduh(tmp2_reg, limit_reg, chr2_reg);
+    // __ lduh(str1_reg, limit_reg, chr1_reg); // hoisted
+    __ lduh(str2_reg, limit_reg, chr2_reg);
     __ subcc(chr1_reg, chr2_reg, chr1_reg);
     __ br(Assembler::notZero, false, Assembler::pt, Ldone);
     assert(chr1_reg == result_reg, "result must be pre-placed");
     __ delayed()->inccc(limit_reg, sizeof(jchar));
     // annul LDUH if branch is not taken to prevent access past end of string
     __ br(Assembler::notZero, true, Assembler::pt, Lloop);
-    __ delayed()->lduh(tmp1_reg, limit_reg, chr1_reg); // hoisted
+    __ delayed()->lduh(str1_reg, limit_reg, chr1_reg); // hoisted
 
     // If strings are equal up to min length, return the length difference.
     __ mov(O7, result_reg);
@@ -2957,125 +2935,80 @@
     __ bind(Ldone);
   %}
 
-enc_class enc_String_Equals(o0RegP str1, o1RegP str2, g3RegP tmp1, g4RegP tmp2, notemp_iRegI result) %{
-    Label Lword, Lword_loop, Lpost_word, Lchar, Lchar_loop, Ldone;
+enc_class enc_String_Equals(o0RegP str1, o1RegP str2, g3RegI cnt, notemp_iRegI result) %{
+    Label Lword_loop, Lpost_word, Lchar, Lchar_loop, Ldone;
     MacroAssembler _masm(&cbuf);
 
     Register   str1_reg = reg_to_register_object($str1$$reg);
     Register   str2_reg = reg_to_register_object($str2$$reg);
-    Register   tmp1_reg = reg_to_register_object($tmp1$$reg);
-    Register   tmp2_reg = reg_to_register_object($tmp2$$reg);
+    Register    cnt_reg = reg_to_register_object($cnt$$reg);
+    Register   tmp1_reg = O7;
     Register result_reg = reg_to_register_object($result$$reg);
 
-    // Get the first character position in both strings
-    //         [8] char array, [12] offset, [16] count
-    int  value_offset = java_lang_String:: value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int  count_offset = java_lang_String:: count_offset_in_bytes();
-
-    // load str1 (jchar*) base address into tmp1_reg
-    __ load_heap_oop(Address(str1_reg, value_offset), tmp1_reg);
-    __ ld(Address(str1_reg, offset_offset), result_reg);
-    __ add(tmp1_reg, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1_reg);
-    __    ld(Address(str1_reg, count_offset), str1_reg); // hoisted
-    __ sll(result_reg, exact_log2(sizeof(jchar)), result_reg);
-    __    load_heap_oop(Address(str2_reg, value_offset), tmp2_reg); // hoisted
-    __ add(result_reg, tmp1_reg, tmp1_reg);
-
-    // load str2 (jchar*) base address into tmp2_reg
-    // __ ld_ptr(Address(str2_reg, value_offset), tmp2_reg); // hoisted
-    __ ld(Address(str2_reg, offset_offset), result_reg);
-    __ add(tmp2_reg, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp2_reg);
-    __    ld(Address(str2_reg, count_offset), str2_reg); // hoisted
-    __ sll(result_reg, exact_log2(sizeof(jchar)), result_reg);
-    __   cmp(str1_reg, str2_reg); // hoisted
-    __ add(result_reg, tmp2_reg, tmp2_reg);
-
-    __ sll(str1_reg, exact_log2(sizeof(jchar)), str1_reg);
-    __ br(Assembler::notEqual, true, Assembler::pt, Ldone);
-    __ delayed()->mov(G0, result_reg);    // not equal
-
-    __ br_zero(Assembler::equal, true, Assembler::pn, str1_reg, Ldone);
-    __ delayed()->add(G0, 1, result_reg); //equals
-
-    __ cmp(tmp1_reg, tmp2_reg); //same string ?
+    assert(result_reg != str1_reg &&
+           result_reg != str2_reg &&
+           result_reg !=  cnt_reg &&
+           result_reg != tmp1_reg ,
+           "need different registers");
+
+    __ cmp(str1_reg, str2_reg); //same char[] ?
     __ brx(Assembler::equal, true, Assembler::pn, Ldone);
     __ delayed()->add(G0, 1, result_reg);
 
+    __ br_on_reg_cond(Assembler::rc_z, true, Assembler::pn, cnt_reg, Ldone);
+    __ delayed()->add(G0, 1, result_reg); // count == 0
+
     //rename registers
-    Register limit_reg =   str1_reg;
-    Register  chr2_reg =   str2_reg;
+    Register limit_reg =    cnt_reg;
     Register  chr1_reg = result_reg;
-    // tmp{12} are the base pointers
+    Register  chr2_reg =   tmp1_reg;
 
     //check for alignment and position the pointers to the ends
-    __ or3(tmp1_reg, tmp2_reg, chr1_reg);
-    __ andcc(chr1_reg, 0x3, chr1_reg); // notZero means at least one not 4-byte aligned
-    __ br(Assembler::notZero, false, Assembler::pn, Lchar);
-    __ delayed()->nop();
-
-    __ bind(Lword);
-    __ and3(limit_reg, 0x2, O7); //remember the remainder (either 0 or 2)
-    __ andn(limit_reg, 0x3, limit_reg);
-    __ br_zero(Assembler::zero, false, Assembler::pn, limit_reg, Lpost_word);
-    __ delayed()->nop();
-
-    __ add(tmp1_reg, limit_reg, tmp1_reg);
-    __ add(tmp2_reg, limit_reg, tmp2_reg);
-    __ neg(limit_reg);
-
-    __ lduw(tmp1_reg, limit_reg, chr1_reg);
-    __ bind(Lword_loop);
-    __ lduw(tmp2_reg, limit_reg, chr2_reg);
-    __ cmp(chr1_reg, chr2_reg);
-    __ br(Assembler::notEqual, true, Assembler::pt, Ldone);
-    __ delayed()->mov(G0, result_reg);
-    __ inccc(limit_reg, 2*sizeof(jchar));
-    // annul LDUW if branch i  s not taken to prevent access past end of string
-    __ br(Assembler::notZero, true, Assembler::pt, Lword_loop); //annul on taken
-    __ delayed()->lduw(tmp1_reg, limit_reg, chr1_reg); // hoisted
-
-    __ bind(Lpost_word);
-    __ br_zero(Assembler::zero, true, Assembler::pt, O7, Ldone);
-    __ delayed()->add(G0, 1, result_reg);
-
-    __ lduh(tmp1_reg, 0, chr1_reg);
-    __ lduh(tmp2_reg, 0, chr2_reg);
-    __ cmp (chr1_reg, chr2_reg);
-    __ br(Assembler::notEqual, true, Assembler::pt, Ldone);
-    __ delayed()->mov(G0, result_reg);
+    __ or3(str1_reg, str2_reg, chr1_reg);
+    __ andcc(chr1_reg, 0x3, chr1_reg);
+    // notZero means at least one not 4-byte aligned.
+    // We could optimize the case when both arrays are not aligned
+    // but it is not frequent case and it requires additional checks.
+    __ br(Assembler::notZero, false, Assembler::pn, Lchar); // char by char compare
+    __ delayed()->sll(limit_reg, exact_log2(sizeof(jchar)), limit_reg); // set byte count
+
+    // Compare char[] arrays aligned to 4 bytes.
+    __ char_arrays_equals(str1_reg, str2_reg, limit_reg, result_reg,
+                          chr1_reg, chr2_reg, Ldone);
     __ ba(false,Ldone);
     __ delayed()->add(G0, 1, result_reg);
 
+    // char by char compare
     __ bind(Lchar);
-    __ add(tmp1_reg, limit_reg, tmp1_reg);
-    __ add(tmp2_reg, limit_reg, tmp2_reg);
+    __ add(str1_reg, limit_reg, str1_reg);
+    __ add(str2_reg, limit_reg, str2_reg);
     __ neg(limit_reg); //negate count
 
-    __ lduh(tmp1_reg, limit_reg, chr1_reg);
+    __ lduh(str1_reg, limit_reg, chr1_reg);
+    // Lchar_loop
     __ bind(Lchar_loop);
-    __ lduh(tmp2_reg, limit_reg, chr2_reg);
+    __ lduh(str2_reg, limit_reg, chr2_reg);
     __ cmp(chr1_reg, chr2_reg);
     __ br(Assembler::notEqual, true, Assembler::pt, Ldone);
     __ delayed()->mov(G0, result_reg); //not equal
     __ inccc(limit_reg, sizeof(jchar));
     // annul LDUH if branch is not taken to prevent access past end of string
-    __ br(Assembler::notZero, true, Assembler::pt, Lchar_loop); //annul on taken
-    __ delayed()->lduh(tmp1_reg, limit_reg, chr1_reg); // hoisted
+    __ br(Assembler::notZero, true, Assembler::pt, Lchar_loop);
+    __ delayed()->lduh(str1_reg, limit_reg, chr1_reg); // hoisted
 
     __ add(G0, 1, result_reg);  //equal
 
     __ bind(Ldone);
   %}
 
-enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, g4RegP tmp2, notemp_iRegI result) %{
+enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, notemp_iRegI result) %{
     Label Lvector, Ldone, Lloop;
     MacroAssembler _masm(&cbuf);
 
     Register   ary1_reg = reg_to_register_object($ary1$$reg);
     Register   ary2_reg = reg_to_register_object($ary2$$reg);
     Register   tmp1_reg = reg_to_register_object($tmp1$$reg);
-    Register   tmp2_reg = reg_to_register_object($tmp2$$reg);
+    Register   tmp2_reg = O7;
     Register result_reg = reg_to_register_object($result$$reg);
 
     int length_offset  = arrayOopDesc::length_offset_in_bytes();
@@ -3101,7 +3034,7 @@
     __ br(Assembler::notEqual, true, Assembler::pn, Ldone);
     __ delayed()->mov(G0, result_reg);     // not equal
 
-    __ br_zero(Assembler::zero, true, Assembler::pn, tmp1_reg, Ldone);
+    __ br_on_reg_cond(Assembler::rc_z, true, Assembler::pn, tmp1_reg, Ldone);
     __ delayed()->add(G0, 1, result_reg); // zero-length arrays are equal
 
     // load array addresses
@@ -3109,45 +3042,16 @@
     __ add(ary2_reg, base_offset, ary2_reg);
 
     // renaming registers
-    Register chr1_reg  =  tmp2_reg;   // for characters in ary1
-    Register chr2_reg  =  result_reg; // for characters in ary2
+    Register chr1_reg  =  result_reg; // for characters in ary1
+    Register chr2_reg  =  tmp2_reg;   // for characters in ary2
     Register limit_reg =  tmp1_reg;   // length
 
     // set byte count
     __ sll(limit_reg, exact_log2(sizeof(jchar)), limit_reg);
-    __ andcc(limit_reg, 0x2, chr1_reg); //trailing character ?
-    __ br(Assembler::zero, false, Assembler::pt, Lvector);
-    __ delayed()->nop();
-
-    //compare the trailing char
-    __ sub(limit_reg, sizeof(jchar), limit_reg);
-    __ lduh(ary1_reg, limit_reg, chr1_reg);
-    __ lduh(ary2_reg, limit_reg, chr2_reg);
-    __ cmp(chr1_reg, chr2_reg);
-    __ br(Assembler::notEqual, true, Assembler::pt, Ldone);
-    __ delayed()->mov(G0, result_reg);     // not equal
-
-    // only one char ?
-    __ br_zero(Assembler::zero, true, Assembler::pn, limit_reg, Ldone);
-    __ delayed()->add(G0, 1, result_reg); // zero-length arrays are equal
-
-    __ bind(Lvector);
-    // Shift ary1_reg and ary2_reg to the end of the arrays, negate limit
-    __ add(ary1_reg, limit_reg, ary1_reg);
-    __ add(ary2_reg, limit_reg, ary2_reg);
-    __ neg(limit_reg, limit_reg);
-
-    __ lduw(ary1_reg, limit_reg, chr1_reg);
-    __ bind(Lloop);
-    __ lduw(ary2_reg, limit_reg, chr2_reg);
-    __ cmp(chr1_reg, chr2_reg);
-    __ br(Assembler::notEqual, false, Assembler::pt, Ldone);
-    __ delayed()->mov(G0, result_reg);     // not equal
-    __ inccc(limit_reg, 2*sizeof(jchar));
-    // annul LDUW if branch is not taken to prevent access past end of string
-    __ br(Assembler::notZero, true, Assembler::pt, Lloop); //annul on taken
-    __ delayed()->lduw(ary1_reg, limit_reg, chr1_reg); // hoisted
-
+
+    // Compare char[] arrays aligned to 4 bytes.
+    __ char_arrays_equals(ary1_reg, ary2_reg, limit_reg, result_reg,
+                          chr1_reg, chr2_reg, Ldone);
     __ add(G0, 1, result_reg); // equals
 
     __ bind(Ldone);
@@ -9471,33 +9375,33 @@
   ins_pipe(long_memory_op);
 %}
 
-instruct string_compare(o0RegP str1, o1RegP str2, g3RegP tmp1, g4RegP tmp2, notemp_iRegI result,
-                        o7RegI tmp3, flagsReg ccr) %{
-  match(Set result (StrComp str1 str2));
-  effect(USE_KILL str1, USE_KILL str2, KILL tmp1, KILL tmp2, KILL ccr, KILL tmp3);
+instruct string_compare(o0RegP str1, o1RegP str2, g3RegI cnt1, g4RegI cnt2, notemp_iRegI result,
+                        o7RegI tmp, flagsReg ccr) %{
+  match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
+  effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL ccr, KILL tmp);
   ins_cost(300);
-  format %{ "String Compare $str1,$str2 -> $result" %}
-  ins_encode( enc_String_Compare(str1, str2, tmp1, tmp2, result) );
+  format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result   // KILL $tmp" %}
+  ins_encode( enc_String_Compare(str1, str2, cnt1, cnt2, result) );
   ins_pipe(long_memory_op);
 %}
 
-instruct string_equals(o0RegP str1, o1RegP str2, g3RegP tmp1, g4RegP tmp2, notemp_iRegI result,
-                       o7RegI tmp3, flagsReg ccr) %{
-  match(Set result (StrEquals str1 str2));
-  effect(USE_KILL str1, USE_KILL str2, KILL tmp1, KILL tmp2, KILL ccr, KILL tmp3);
+instruct string_equals(o0RegP str1, o1RegP str2, g3RegI cnt, notemp_iRegI result,
+                       o7RegI tmp, flagsReg ccr) %{
+  match(Set result (StrEquals (Binary str1 str2) cnt));
+  effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL tmp, KILL ccr);
   ins_cost(300);
-  format %{ "String Equals $str1,$str2 -> $result" %}
-  ins_encode( enc_String_Equals(str1, str2, tmp1, tmp2, result) );
+  format %{ "String Equals $str1,$str2,$cnt -> $result   // KILL $tmp" %}
+  ins_encode( enc_String_Equals(str1, str2, cnt, result) );
   ins_pipe(long_memory_op);
 %}
 
-instruct array_equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, g4RegP tmp2, notemp_iRegI result,
-                        flagsReg ccr) %{
+instruct array_equals(o0RegP ary1, o1RegP ary2, g3RegI tmp1, notemp_iRegI result,
+                      o7RegI tmp2, flagsReg ccr) %{
   match(Set result (AryEq ary1 ary2));
   effect(USE_KILL ary1, USE_KILL ary2, KILL tmp1, KILL tmp2, KILL ccr);
   ins_cost(300);
-  format %{ "Array Equals $ary1,$ary2 -> $result" %}
-  ins_encode( enc_Array_Equals(ary1, ary2, tmp1, tmp2, result));
+  format %{ "Array Equals $ary1,$ary2 -> $result   // KILL $tmp1,$tmp2" %}
+  ins_encode( enc_Array_Equals(ary1, ary2, tmp1, result));
   ins_pipe(long_memory_op);
 %}
 
--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -8404,6 +8404,319 @@
 }
 #endif // _LP64
 
+// IndexOf substring.
+void MacroAssembler::string_indexof(Register str1, Register str2,
+                                    Register cnt1, Register cnt2, Register result,
+                                    XMMRegister vec, Register tmp) {
+  assert(UseSSE42Intrinsics, "SSE4.2 is required");
+
+  Label RELOAD_SUBSTR, PREP_FOR_SCAN, SCAN_TO_SUBSTR,
+        SCAN_SUBSTR, RET_NOT_FOUND, CLEANUP;
+
+  push(str1); // string addr
+  push(str2); // substr addr
+  push(cnt2); // substr count
+  jmpb(PREP_FOR_SCAN);
+
+  // Substr count saved at sp
+  // Substr saved at sp+1*wordSize
+  // String saved at sp+2*wordSize
+
+  // Reload substr for rescan
+  bind(RELOAD_SUBSTR);
+  movl(cnt2, Address(rsp, 0));
+  movptr(str2, Address(rsp, wordSize));
+  // We came here after the beginninig of the substring was
+  // matched but the rest of it was not so we need to search
+  // again. Start from the next element after the previous match.
+  subptr(str1, result); // Restore counter
+  shrl(str1, 1);
+  addl(cnt1, str1);
+  lea(str1, Address(result, 2)); // Reload string
+
+  // Load substr
+  bind(PREP_FOR_SCAN);
+  movdqu(vec, Address(str2, 0));
+  addl(cnt1, 8);  // prime the loop
+  subptr(str1, 16);
+
+  // Scan string for substr in 16-byte vectors
+  bind(SCAN_TO_SUBSTR);
+  subl(cnt1, 8);
+  addptr(str1, 16);
+
+  // pcmpestri
+  //   inputs:
+  //     xmm - substring
+  //     rax - substring length (elements count)
+  //     mem - scaned string
+  //     rdx - string length (elements count)
+  //     0xd - mode: 1100 (substring search) + 01 (unsigned shorts)
+  //   outputs:
+  //     rcx - matched index in string
+  assert(cnt1 == rdx && cnt2 == rax && tmp == rcx, "pcmpestri");
+
+  pcmpestri(vec, Address(str1, 0), 0x0d);
+  jcc(Assembler::above, SCAN_TO_SUBSTR);      // CF == 0 && ZF == 0
+  jccb(Assembler::aboveEqual, RET_NOT_FOUND); // CF == 0
+
+  // Fallthrough: found a potential substr
+
+  // Make sure string is still long enough
+  subl(cnt1, tmp);
+  cmpl(cnt1, cnt2);
+  jccb(Assembler::negative, RET_NOT_FOUND);
+  // Compute start addr of substr
+  lea(str1, Address(str1, tmp, Address::times_2));
+  movptr(result, str1); // save
+
+  // Compare potential substr
+  addl(cnt1, 8);     // prime the loop
+  addl(cnt2, 8);
+  subptr(str1, 16);
+  subptr(str2, 16);
+
+  // Scan 16-byte vectors of string and substr
+  bind(SCAN_SUBSTR);
+  subl(cnt1, 8);
+  subl(cnt2, 8);
+  addptr(str1, 16);
+  addptr(str2, 16);
+  movdqu(vec, Address(str2, 0));
+  pcmpestri(vec, Address(str1, 0), 0x0d);
+  jcc(Assembler::noOverflow, RELOAD_SUBSTR); // OF == 0
+  jcc(Assembler::positive, SCAN_SUBSTR);     // SF == 0
+
+  // Compute substr offset
+  subptr(result, Address(rsp, 2*wordSize));
+  shrl(result, 1); // index
+  jmpb(CLEANUP);
+
+  bind(RET_NOT_FOUND);
+  movl(result, -1);
+
+  bind(CLEANUP);
+  addptr(rsp, 3*wordSize);
+}
+
+// Compare strings.
+void MacroAssembler::string_compare(Register str1, Register str2,
+                                    Register cnt1, Register cnt2, Register result,
+                                    XMMRegister vec1, XMMRegister vec2) {
+  Label LENGTH_DIFF_LABEL, POP_LABEL, DONE_LABEL, WHILE_HEAD_LABEL;
+
+  // Compute the minimum of the string lengths and the
+  // difference of the string lengths (stack).
+  // Do the conditional move stuff
+  movl(result, cnt1);
+  subl(cnt1, cnt2);
+  push(cnt1);
+  if (VM_Version::supports_cmov()) {
+    cmovl(Assembler::lessEqual, cnt2, result);
+  } else {
+    Label GT_LABEL;
+    jccb(Assembler::greater, GT_LABEL);
+    movl(cnt2, result);
+    bind(GT_LABEL);
+  }
+
+  // Is the minimum length zero?
+  testl(cnt2, cnt2);
+  jcc(Assembler::zero, LENGTH_DIFF_LABEL);
+
+  // Load first characters
+  load_unsigned_short(result, Address(str1, 0));
+  load_unsigned_short(cnt1, Address(str2, 0));
+
+  // Compare first characters
+  subl(result, cnt1);
+  jcc(Assembler::notZero,  POP_LABEL);
+  decrementl(cnt2);
+  jcc(Assembler::zero, LENGTH_DIFF_LABEL);
+
+  {
+    // Check after comparing first character to see if strings are equivalent
+    Label LSkip2;
+    // Check if the strings start at same location
+    cmpptr(str1, str2);
+    jccb(Assembler::notEqual, LSkip2);
+
+    // Check if the length difference is zero (from stack)
+    cmpl(Address(rsp, 0), 0x0);
+    jcc(Assembler::equal,  LENGTH_DIFF_LABEL);
+
+    // Strings might not be equivalent
+    bind(LSkip2);
+  }
+
+  // Advance to next character
+  addptr(str1, 2);
+  addptr(str2, 2);
+
+  if (UseSSE42Intrinsics) {
+    // With SSE4.2, use double quad vector compare
+    Label COMPARE_VECTORS, VECTOR_NOT_EQUAL, COMPARE_TAIL;
+    // Setup to compare 16-byte vectors
+    movl(cnt1, cnt2);
+    andl(cnt2, 0xfffffff8); // cnt2 holds the vector count
+    andl(cnt1, 0x00000007); // cnt1 holds the tail count
+    testl(cnt2, cnt2);
+    jccb(Assembler::zero, COMPARE_TAIL);
+
+    lea(str2, Address(str2, cnt2, Address::times_2));
+    lea(str1, Address(str1, cnt2, Address::times_2));
+    negptr(cnt2);
+
+    bind(COMPARE_VECTORS);
+    movdqu(vec1, Address(str1, cnt2, Address::times_2));
+    movdqu(vec2, Address(str2, cnt2, Address::times_2));
+    pxor(vec1, vec2);
+    ptest(vec1, vec1);
+    jccb(Assembler::notZero, VECTOR_NOT_EQUAL);
+    addptr(cnt2, 8);
+    jcc(Assembler::notZero, COMPARE_VECTORS);
+    jmpb(COMPARE_TAIL);
+
+    // Mismatched characters in the vectors
+    bind(VECTOR_NOT_EQUAL);
+    lea(str1, Address(str1, cnt2, Address::times_2));
+    lea(str2, Address(str2, cnt2, Address::times_2));
+    movl(cnt1, 8);
+
+    // Compare tail (< 8 chars), or rescan last vectors to
+    // find 1st mismatched characters
+    bind(COMPARE_TAIL);
+    testl(cnt1, cnt1);
+    jccb(Assembler::zero, LENGTH_DIFF_LABEL);
+    movl(cnt2, cnt1);
+    // Fallthru to tail compare
+  }
+
+  // Shift str2 and str1 to the end of the arrays, negate min
+  lea(str1, Address(str1, cnt2, Address::times_2, 0));
+  lea(str2, Address(str2, cnt2, Address::times_2, 0));
+  negptr(cnt2);
+
+    // Compare the rest of the characters
+  bind(WHILE_HEAD_LABEL);
+  load_unsigned_short(result, Address(str1, cnt2, Address::times_2, 0));
+  load_unsigned_short(cnt1, Address(str2, cnt2, Address::times_2, 0));
+  subl(result, cnt1);
+  jccb(Assembler::notZero, POP_LABEL);
+  increment(cnt2);
+  jcc(Assembler::notZero, WHILE_HEAD_LABEL);
+
+  // Strings are equal up to min length.  Return the length difference.
+  bind(LENGTH_DIFF_LABEL);
+  pop(result);
+  jmpb(DONE_LABEL);
+
+  // Discard the stored length difference
+  bind(POP_LABEL);
+  addptr(rsp, wordSize);
+
+  // That's it
+  bind(DONE_LABEL);
+}
+
+// Compare char[] arrays aligned to 4 bytes or substrings.
+void MacroAssembler::char_arrays_equals(bool is_array_equ, Register ary1, Register ary2,
+                                        Register limit, Register result, Register chr,
+                                        XMMRegister vec1, XMMRegister vec2) {
+  Label TRUE_LABEL, FALSE_LABEL, DONE, COMPARE_VECTORS, COMPARE_CHAR;
+
+  int length_offset  = arrayOopDesc::length_offset_in_bytes();
+  int base_offset    = arrayOopDesc::base_offset_in_bytes(T_CHAR);
+
+  // Check the input args
+  cmpptr(ary1, ary2);
+  jcc(Assembler::equal, TRUE_LABEL);
+
+  if (is_array_equ) {
+    // Need additional checks for arrays_equals.
+    andptr(ary1, ary2);
+    jcc(Assembler::zero, FALSE_LABEL); // One pointer is NULL
+
+    // Check the lengths
+    movl(limit, Address(ary1, length_offset));
+    cmpl(limit, Address(ary2, length_offset));
+    jcc(Assembler::notEqual, FALSE_LABEL);
+  }
+
+  // count == 0
+  testl(limit, limit);
+  jcc(Assembler::zero, TRUE_LABEL);
+
+  if (is_array_equ) {
+    // Load array address
+    lea(ary1, Address(ary1, base_offset));
+    lea(ary2, Address(ary2, base_offset));
+  }
+
+  shll(limit, 1);      // byte count != 0
+  movl(result, limit); // copy
+
+  if (UseSSE42Intrinsics) {
+    // With SSE4.2, use double quad vector compare
+    Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
+    // Compare 16-byte vectors
+    andl(result, 0x0000000e);  //   tail count (in bytes)
+    andl(limit, 0xfffffff0);   // vector count (in bytes)
+    jccb(Assembler::zero, COMPARE_TAIL);
+
+    lea(ary1, Address(ary1, limit, Address::times_1));
+    lea(ary2, Address(ary2, limit, Address::times_1));
+    negptr(limit);
+
+    bind(COMPARE_WIDE_VECTORS);
+    movdqu(vec1, Address(ary1, limit, Address::times_1));
+    movdqu(vec2, Address(ary2, limit, Address::times_1));
+    pxor(vec1, vec2);
+    ptest(vec1, vec1);
+    jccb(Assembler::notZero, FALSE_LABEL);
+    addptr(limit, 16);
+    jcc(Assembler::notZero, COMPARE_WIDE_VECTORS);
+
+    bind(COMPARE_TAIL); // limit is zero
+    movl(limit, result);
+    // Fallthru to tail compare
+  }
+
+  // Compare 4-byte vectors
+  andl(limit, 0xfffffffc); // vector count (in bytes)
+  jccb(Assembler::zero, COMPARE_CHAR);
+
+  lea(ary1, Address(ary1, limit, Address::times_1));
+  lea(ary2, Address(ary2, limit, Address::times_1));
+  negptr(limit);
+
+  bind(COMPARE_VECTORS);
+  movl(chr, Address(ary1, limit, Address::times_1));
+  cmpl(chr, Address(ary2, limit, Address::times_1));
+  jccb(Assembler::notEqual, FALSE_LABEL);
+  addptr(limit, 4);
+  jcc(Assembler::notZero, COMPARE_VECTORS);
+
+  // Compare trailing char (final 2 bytes), if any
+  bind(COMPARE_CHAR);
+  testl(result, 0x2);   // tail  char
+  jccb(Assembler::zero, TRUE_LABEL);
+  load_unsigned_short(chr, Address(ary1, 0));
+  load_unsigned_short(limit, Address(ary2, 0));
+  cmpl(chr, limit);
+  jccb(Assembler::notEqual, FALSE_LABEL);
+
+  bind(TRUE_LABEL);
+  movl(result, 1);   // return true
+  jmpb(DONE);
+
+  bind(FALSE_LABEL);
+  xorl(result, result); // return false
+
+  // That's it
+  bind(DONE);
+}
+
 Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond) {
   switch (cond) {
     // Note some conditions are synonyms for others
--- a/hotspot/src/cpu/x86/vm/assembler_x86.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2206,6 +2206,20 @@
   void movl2ptr(Register dst, Address src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(movl(dst, src)); }
   void movl2ptr(Register dst, Register src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(if (dst != src) movl(dst, src)); }
 
+  // IndexOf strings.
+  void string_indexof(Register str1, Register str2,
+                      Register cnt1, Register cnt2, Register result,
+                      XMMRegister vec, Register tmp);
+
+  // Compare strings.
+  void string_compare(Register str1, Register str2,
+                      Register cnt1, Register cnt2, Register result,
+                      XMMRegister vec1, XMMRegister vec2);
+
+  // Compare char[] arrays.
+  void char_arrays_equals(bool is_array_equ, Register ary1, Register ary2,
+                          Register limit, Register result, Register chr,
+                          XMMRegister vec1, XMMRegister vec2);
 
 #undef VIRTUAL
 
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -1638,7 +1638,7 @@
       jobject2reg_with_patching(k_RInfo, op->info_for_patch());
     } else {
 #ifdef _LP64
-      __ movoop(k_RInfo, k->encoding());
+      __ movoop(k_RInfo, k->constant_encoding());
 #else
       k_RInfo = noreg;
 #endif // _LP64
@@ -1661,7 +1661,7 @@
       assert(data != NULL,       "need data for checkcast");
       assert(data->is_BitData(), "need BitData for checkcast");
       Register mdo  = klass_RInfo;
-      __ movoop(mdo, md->encoding());
+      __ movoop(mdo, md->constant_encoding());
       Address data_addr(mdo, md->byte_offset_of_slot(data, DataLayout::header_offset()));
       int header_bits = DataLayout::flag_mask_to_header_mask(BitData::null_seen_byte_constant());
       __ orl(data_addr, header_bits);
@@ -1679,7 +1679,7 @@
 #ifdef _LP64
         __ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
 #else
-        __ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->encoding());
+        __ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->constant_encoding());
 #endif // _LP64
       } else {
         __ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
@@ -1696,7 +1696,7 @@
 #ifdef _LP64
         __ cmpptr(k_RInfo, Address(klass_RInfo, k->super_check_offset()));
 #else
-        __ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->encoding());
+        __ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->constant_encoding());
 #endif // _LP64
         if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() != k->super_check_offset()) {
           __ jcc(Assembler::notEqual, *stub->entry());
@@ -1707,7 +1707,7 @@
 #ifdef _LP64
           __ cmpptr(klass_RInfo, k_RInfo);
 #else
-          __ cmpoop(klass_RInfo, k->encoding());
+          __ cmpoop(klass_RInfo, k->constant_encoding());
 #endif // _LP64
           __ jcc(Assembler::equal, done);
 
@@ -1715,7 +1715,7 @@
 #ifdef _LP64
           __ push(k_RInfo);
 #else
-          __ pushoop(k->encoding());
+          __ pushoop(k->constant_encoding());
 #endif // _LP64
           __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
           __ pop(klass_RInfo);
@@ -1763,7 +1763,7 @@
     if (!k->is_loaded()) {
       jobject2reg_with_patching(k_RInfo, op->info_for_patch());
     } else {
-      LP64_ONLY(__ movoop(k_RInfo, k->encoding()));
+      LP64_ONLY(__ movoop(k_RInfo, k->constant_encoding()));
     }
     assert(obj != k_RInfo, "must be different");
 
@@ -1774,7 +1774,7 @@
       // get object class
       // not a safepoint as obj null check happens earlier
       if (LP64_ONLY(false &&) k->is_loaded()) {
-        NOT_LP64(__ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->encoding()));
+        NOT_LP64(__ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->constant_encoding()));
         k_RInfo = noreg;
       } else {
         __ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
@@ -1791,14 +1791,14 @@
 #ifndef _LP64
       if (k->is_loaded()) {
         // See if we get an immediate positive hit
-        __ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->encoding());
+        __ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->constant_encoding());
         __ jcc(Assembler::equal, one);
         if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() == k->super_check_offset()) {
           // check for self
-          __ cmpoop(klass_RInfo, k->encoding());
+          __ cmpoop(klass_RInfo, k->constant_encoding());
           __ jcc(Assembler::equal, one);
           __ push(klass_RInfo);
-          __ pushoop(k->encoding());
+          __ pushoop(k->constant_encoding());
           __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
           __ pop(klass_RInfo);
           __ pop(dst);
@@ -3112,7 +3112,7 @@
     // subtype which we can't check or src is the same array as dst
     // but not necessarily exactly of type default_type.
     Label known_ok, halt;
-    __ movoop(tmp, default_type->encoding());
+    __ movoop(tmp, default_type->constant_encoding());
     if (basic_type != T_OBJECT) {
       __ cmpptr(tmp, dst_klass_addr);
       __ jcc(Assembler::notEqual, halt);
@@ -3200,7 +3200,7 @@
   assert(data->is_CounterData(), "need CounterData for calls");
   assert(op->mdo()->is_single_cpu(),  "mdo must be allocated");
   Register mdo  = op->mdo()->as_register();
-  __ movoop(mdo, md->encoding());
+  __ movoop(mdo, md->constant_encoding());
   Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
   __ addl(counter_addr, DataLayout::counter_increment);
   Bytecodes::Code bc = method->java_code_at_bci(bci);
@@ -3240,7 +3240,7 @@
         ciKlass* receiver = vc_data->receiver(i);
         if (receiver == NULL) {
           Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
-          __ movoop(recv_addr, known_klass->encoding());
+          __ movoop(recv_addr, known_klass->constant_encoding());
           Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
           __ addl(data_addr, DataLayout::counter_increment);
           return;
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -994,7 +994,7 @@
   LIR_Opr len = length.result();
   BasicType elem_type = x->elt_type();
 
-  __ oop2reg(ciTypeArrayKlass::make(elem_type)->encoding(), klass_reg);
+  __ oop2reg(ciTypeArrayKlass::make(elem_type)->constant_encoding(), klass_reg);
 
   CodeStub* slow_path = new NewTypeArrayStub(klass_reg, len, reg, info);
   __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, elem_type, klass_reg, slow_path);
--- a/hotspot/src/cpu/x86/vm/x86_32.ad	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad	Wed Jul 05 17:01:52 2017 +0200
@@ -379,7 +379,7 @@
         int format) {
 #ifdef ASSERT
   if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
-    assert(oop(d32)->is_oop() && oop(d32)->is_perm(), "cannot embed non-perm oops in code");
+    assert(oop(d32)->is_oop() && (ScavengeRootsInCode || !oop(d32)->is_scavengable()), "cannot embed scavengable oops in code");
   }
 #endif
   cbuf.relocate(cbuf.inst_mark(), rspec, format);
@@ -3701,458 +3701,6 @@
     }
   %}
 
-  enc_class enc_String_Compare(eDIRegP str1, eSIRegP str2, regXD tmp1, regXD tmp2,
-                        eAXRegI tmp3, eBXRegI tmp4, eCXRegI result) %{
-    Label ECX_GOOD_LABEL, LENGTH_DIFF_LABEL,
-          POP_LABEL, DONE_LABEL, CONT_LABEL,
-          WHILE_HEAD_LABEL;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-    XMMRegister tmp2Reg   = as_XMMRegister($tmp2$$reg);
-
-    // Get the first character position in both strings
-    //         [8] char array, [12] offset, [16] count
-    int value_offset  = java_lang_String::value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int count_offset  = java_lang_String::count_offset_in_bytes();
-    int base_offset   = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    masm.movptr(rax, Address(rsi, value_offset));
-    masm.movl(rcx, Address(rsi, offset_offset));
-    masm.lea(rax, Address(rax, rcx, Address::times_2, base_offset));
-    masm.movptr(rbx, Address(rdi, value_offset));
-    masm.movl(rcx, Address(rdi, offset_offset));
-    masm.lea(rbx, Address(rbx, rcx, Address::times_2, base_offset));
-
-    // Compute the minimum of the string lengths(rsi) and the
-    // difference of the string lengths (stack)
-
-    if (VM_Version::supports_cmov()) {
-      masm.movl(rdi, Address(rdi, count_offset));
-      masm.movl(rsi, Address(rsi, count_offset));
-      masm.movl(rcx, rdi);
-      masm.subl(rdi, rsi);
-      masm.push(rdi);
-      masm.cmovl(Assembler::lessEqual, rsi, rcx);
-    } else {
-      masm.movl(rdi, Address(rdi, count_offset));
-      masm.movl(rcx, Address(rsi, count_offset));
-      masm.movl(rsi, rdi);
-      masm.subl(rdi, rcx);
-      masm.push(rdi);
-      masm.jccb(Assembler::lessEqual, ECX_GOOD_LABEL);
-      masm.movl(rsi, rcx);
-      // rsi holds min, rcx is unused
-    }
-
-    // Is the minimum length zero?
-    masm.bind(ECX_GOOD_LABEL);
-    masm.testl(rsi, rsi);
-    masm.jcc(Assembler::zero, LENGTH_DIFF_LABEL);
-
-    // Load first characters
-    masm.load_unsigned_short(rcx, Address(rbx, 0));
-    masm.load_unsigned_short(rdi, Address(rax, 0));
-
-    // Compare first characters
-    masm.subl(rcx, rdi);
-    masm.jcc(Assembler::notZero,  POP_LABEL);
-    masm.decrementl(rsi);
-    masm.jcc(Assembler::zero, LENGTH_DIFF_LABEL);
-
-    {
-      // Check after comparing first character to see if strings are equivalent
-      Label LSkip2;
-      // Check if the strings start at same location
-      masm.cmpptr(rbx,rax);
-      masm.jccb(Assembler::notEqual, LSkip2);
-
-      // Check if the length difference is zero (from stack)
-      masm.cmpl(Address(rsp, 0), 0x0);
-      masm.jcc(Assembler::equal,  LENGTH_DIFF_LABEL);
-
-      // Strings might not be equivalent
-      masm.bind(LSkip2);
-    }
-
-   // Advance to next character
-    masm.addptr(rax, 2);
-    masm.addptr(rbx, 2);
-
-    if (UseSSE42Intrinsics) {
-      // With SSE4.2, use double quad vector compare
-      Label COMPARE_VECTORS, VECTOR_NOT_EQUAL, COMPARE_TAIL;
-      // Setup to compare 16-byte vectors
-      masm.movl(rdi, rsi);
-      masm.andl(rsi, 0xfffffff8); // rsi holds the vector count
-      masm.andl(rdi, 0x00000007); // rdi holds the tail count
-      masm.testl(rsi, rsi);
-      masm.jccb(Assembler::zero, COMPARE_TAIL);
-
-      masm.lea(rax, Address(rax, rsi, Address::times_2));
-      masm.lea(rbx, Address(rbx, rsi, Address::times_2));
-      masm.negl(rsi);
-
-      masm.bind(COMPARE_VECTORS);
-      masm.movdqu(tmp1Reg, Address(rax, rsi, Address::times_2));
-      masm.movdqu(tmp2Reg, Address(rbx, rsi, Address::times_2));
-      masm.pxor(tmp1Reg, tmp2Reg);
-      masm.ptest(tmp1Reg, tmp1Reg);
-      masm.jccb(Assembler::notZero, VECTOR_NOT_EQUAL);
-      masm.addl(rsi, 8);
-      masm.jcc(Assembler::notZero, COMPARE_VECTORS);
-      masm.jmpb(COMPARE_TAIL);
-
-      // Mismatched characters in the vectors
-      masm.bind(VECTOR_NOT_EQUAL);
-      masm.lea(rax, Address(rax, rsi, Address::times_2));
-      masm.lea(rbx, Address(rbx, rsi, Address::times_2));
-      masm.movl(rdi, 8);
-
-      // Compare tail (< 8 chars), or rescan last vectors to
-      // find 1st mismatched characters
-      masm.bind(COMPARE_TAIL);
-      masm.testl(rdi, rdi);
-      masm.jccb(Assembler::zero, LENGTH_DIFF_LABEL);
-      masm.movl(rsi, rdi);
-      // Fallthru to tail compare
-    }
-
-    //Shift rax, and rbx, to the end of the arrays, negate min
-    masm.lea(rax, Address(rax, rsi, Address::times_2, 0));
-    masm.lea(rbx, Address(rbx, rsi, Address::times_2, 0));
-    masm.negl(rsi);
-
-    // Compare the rest of the characters
-    masm.bind(WHILE_HEAD_LABEL);
-    masm.load_unsigned_short(rcx, Address(rbx, rsi, Address::times_2, 0));
-    masm.load_unsigned_short(rdi, Address(rax, rsi, Address::times_2, 0));
-    masm.subl(rcx, rdi);
-    masm.jccb(Assembler::notZero, POP_LABEL);
-    masm.incrementl(rsi);
-    masm.jcc(Assembler::notZero, WHILE_HEAD_LABEL);
-
-    // Strings are equal up to min length.  Return the length difference.
-    masm.bind(LENGTH_DIFF_LABEL);
-    masm.pop(rcx);
-    masm.jmpb(DONE_LABEL);
-
-    // Discard the stored length difference
-    masm.bind(POP_LABEL);
-    masm.addptr(rsp, 4);
-
-    // That's it
-    masm.bind(DONE_LABEL);
-  %}
-
- enc_class enc_String_Equals(eDIRegP str1, eSIRegP str2, regXD tmp1, regXD tmp2,
-                       eBXRegI tmp3, eCXRegI tmp4, eAXRegI result) %{
-    Label RET_TRUE, RET_FALSE, DONE, COMPARE_VECTORS, COMPARE_CHAR;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-    XMMRegister tmp2Reg   = as_XMMRegister($tmp2$$reg);
-
-    int value_offset  = java_lang_String::value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int count_offset  = java_lang_String::count_offset_in_bytes();
-    int base_offset   = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    // does source == target string?
-    masm.cmpptr(rdi, rsi);
-    masm.jcc(Assembler::equal, RET_TRUE);
-
-    // get and compare counts
-    masm.movl(rcx, Address(rdi, count_offset));
-    masm.movl(rax, Address(rsi, count_offset));
-    masm.cmpl(rcx, rax);
-    masm.jcc(Assembler::notEqual, RET_FALSE);
-    masm.testl(rax, rax);
-    masm.jcc(Assembler::zero, RET_TRUE);
-
-    // get source string offset and value
-    masm.movptr(rbx, Address(rsi, value_offset));
-    masm.movl(rax, Address(rsi, offset_offset));
-    masm.leal(rsi, Address(rbx, rax, Address::times_2, base_offset));
-
-    // get compare string offset and value
-    masm.movptr(rbx, Address(rdi, value_offset));
-    masm.movl(rax, Address(rdi, offset_offset));
-    masm.leal(rdi, Address(rbx, rax, Address::times_2, base_offset));
-
-    // Set byte count
-    masm.shll(rcx, 1);
-    masm.movl(rax, rcx);
-
-    if (UseSSE42Intrinsics) {
-      // With SSE4.2, use double quad vector compare
-      Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
-      // Compare 16-byte vectors
-      masm.andl(rcx, 0xfffffff0);  // vector count (in bytes)
-      masm.andl(rax, 0x0000000e);  // tail count (in bytes)
-      masm.testl(rcx, rcx);
-      masm.jccb(Assembler::zero, COMPARE_TAIL);
-      masm.lea(rdi, Address(rdi, rcx, Address::times_1));
-      masm.lea(rsi, Address(rsi, rcx, Address::times_1));
-      masm.negl(rcx);
-
-      masm.bind(COMPARE_WIDE_VECTORS);
-      masm.movdqu(tmp1Reg, Address(rdi, rcx, Address::times_1));
-      masm.movdqu(tmp2Reg, Address(rsi, rcx, Address::times_1));
-      masm.pxor(tmp1Reg, tmp2Reg);
-      masm.ptest(tmp1Reg, tmp1Reg);
-      masm.jccb(Assembler::notZero, RET_FALSE);
-      masm.addl(rcx, 16);
-      masm.jcc(Assembler::notZero, COMPARE_WIDE_VECTORS);
-      masm.bind(COMPARE_TAIL);
-      masm.movl(rcx, rax);
-      // Fallthru to tail compare
-    }
-
-    // Compare 4-byte vectors
-    masm.andl(rcx, 0xfffffffc);  // vector count (in bytes)
-    masm.andl(rax, 0x00000002);  // tail char (in bytes)
-    masm.testl(rcx, rcx);
-    masm.jccb(Assembler::zero, COMPARE_CHAR);
-    masm.lea(rdi, Address(rdi, rcx, Address::times_1));
-    masm.lea(rsi, Address(rsi, rcx, Address::times_1));
-    masm.negl(rcx);
-
-    masm.bind(COMPARE_VECTORS);
-    masm.movl(rbx, Address(rdi, rcx, Address::times_1));
-    masm.cmpl(rbx, Address(rsi, rcx, Address::times_1));
-    masm.jccb(Assembler::notEqual, RET_FALSE);
-    masm.addl(rcx, 4);
-    masm.jcc(Assembler::notZero, COMPARE_VECTORS);
-
-    // Compare trailing char (final 2 bytes), if any
-    masm.bind(COMPARE_CHAR);
-    masm.testl(rax, rax);
-    masm.jccb(Assembler::zero, RET_TRUE);
-    masm.load_unsigned_short(rbx, Address(rdi, 0));
-    masm.load_unsigned_short(rcx, Address(rsi, 0));
-    masm.cmpl(rbx, rcx);
-    masm.jccb(Assembler::notEqual, RET_FALSE);
-
-    masm.bind(RET_TRUE);
-    masm.movl(rax, 1);   // return true
-    masm.jmpb(DONE);
-
-    masm.bind(RET_FALSE);
-    masm.xorl(rax, rax); // return false
-
-    masm.bind(DONE);
-    %}
-
- enc_class enc_String_IndexOf(eSIRegP str1, eDIRegP str2, regXD tmp1, eAXRegI tmp2,
-                        eCXRegI tmp3, eDXRegI tmp4, eBXRegI result) %{
-    // SSE4.2 version
-    Label LOAD_SUBSTR, PREP_FOR_SCAN, SCAN_TO_SUBSTR,
-          SCAN_SUBSTR, RET_NEG_ONE, RET_NOT_FOUND, CLEANUP, DONE;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-
-    // Get the first character position in both strings
-    //         [8] char array, [12] offset, [16] count
-    int value_offset  = java_lang_String::value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int count_offset  = java_lang_String::count_offset_in_bytes();
-    int base_offset   = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    // Get counts for string and substr
-    masm.movl(rdx, Address(rsi, count_offset));
-    masm.movl(rax, Address(rdi, count_offset));
-    // Check for substr count > string count
-    masm.cmpl(rax, rdx);
-    masm.jcc(Assembler::greater, RET_NEG_ONE);
-
-    // Start the indexOf operation
-    // Get start addr of string
-    masm.movptr(rbx, Address(rsi, value_offset));
-    masm.movl(rcx, Address(rsi, offset_offset));
-    masm.lea(rsi, Address(rbx, rcx, Address::times_2, base_offset));
-    masm.push(rsi);
-
-    // Get start addr of substr
-    masm.movptr(rbx, Address(rdi, value_offset));
-    masm.movl(rcx, Address(rdi, offset_offset));
-    masm.lea(rdi, Address(rbx, rcx, Address::times_2, base_offset));
-    masm.push(rdi);
-    masm.push(rax);
-    masm.jmpb(PREP_FOR_SCAN);
-
-    // Substr count saved at sp
-    // Substr saved at sp+4
-    // String saved at sp+8
-
-    // Prep to load substr for scan
-    masm.bind(LOAD_SUBSTR);
-    masm.movptr(rdi, Address(rsp, 4));
-    masm.movl(rax, Address(rsp, 0));
-
-    // Load substr
-    masm.bind(PREP_FOR_SCAN);
-    masm.movdqu(tmp1Reg, Address(rdi, 0));
-    masm.addl(rdx, 8);        // prime the loop
-    masm.subptr(rsi, 16);
-
-    // Scan string for substr in 16-byte vectors
-    masm.bind(SCAN_TO_SUBSTR);
-    masm.subl(rdx, 8);
-    masm.addptr(rsi, 16);
-    masm.pcmpestri(tmp1Reg, Address(rsi, 0), 0x0d);
-    masm.jcc(Assembler::above, SCAN_TO_SUBSTR);     // CF == 0 && ZF == 0
-    masm.jccb(Assembler::aboveEqual, RET_NOT_FOUND); // CF == 0
-
-    // Fallthru: found a potential substr
-
-    // Make sure string is still long enough
-    masm.subl(rdx, rcx);
-    masm.cmpl(rdx, rax);
-    masm.jccb(Assembler::negative, RET_NOT_FOUND);
-    // Compute start addr of substr
-    masm.lea(rsi, Address(rsi, rcx, Address::times_2));
-    masm.movptr(rbx, rsi);
-
-    // Compare potential substr
-    masm.addl(rdx, 8);        // prime the loop
-    masm.addl(rax, 8);
-    masm.subptr(rsi, 16);
-    masm.subptr(rdi, 16);
-
-    // Scan 16-byte vectors of string and substr
-    masm.bind(SCAN_SUBSTR);
-    masm.subl(rax, 8);
-    masm.subl(rdx, 8);
-    masm.addptr(rsi, 16);
-    masm.addptr(rdi, 16);
-    masm.movdqu(tmp1Reg, Address(rdi, 0));
-    masm.pcmpestri(tmp1Reg, Address(rsi, 0), 0x0d);
-    masm.jcc(Assembler::noOverflow, LOAD_SUBSTR);   // OF == 0
-    masm.jcc(Assembler::positive, SCAN_SUBSTR);     // SF == 0
-
-    // Compute substr offset
-    masm.movptr(rsi, Address(rsp, 8));
-    masm.subptr(rbx, rsi);
-    masm.shrl(rbx, 1);
-    masm.jmpb(CLEANUP);
-
-    masm.bind(RET_NEG_ONE);
-    masm.movl(rbx, -1);
-    masm.jmpb(DONE);
-
-    masm.bind(RET_NOT_FOUND);
-    masm.movl(rbx, -1);
-
-    masm.bind(CLEANUP);
-    masm.addptr(rsp, 12);
-
-    masm.bind(DONE);
-  %}
-
-  enc_class enc_Array_Equals(eDIRegP ary1, eSIRegP ary2, regXD tmp1, regXD tmp2,
-                             eBXRegI tmp3, eDXRegI tmp4, eAXRegI result) %{
-    Label TRUE_LABEL, FALSE_LABEL, DONE, COMPARE_VECTORS, COMPARE_CHAR;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-    XMMRegister tmp2Reg   = as_XMMRegister($tmp2$$reg);
-    Register ary1Reg      = as_Register($ary1$$reg);
-    Register ary2Reg      = as_Register($ary2$$reg);
-    Register tmp3Reg      = as_Register($tmp3$$reg);
-    Register tmp4Reg      = as_Register($tmp4$$reg);
-    Register resultReg    = as_Register($result$$reg);
-
-    int length_offset  = arrayOopDesc::length_offset_in_bytes();
-    int base_offset    = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    // Check the input args
-    masm.cmpptr(ary1Reg, ary2Reg);
-    masm.jcc(Assembler::equal, TRUE_LABEL);
-    masm.testptr(ary1Reg, ary1Reg);
-    masm.jcc(Assembler::zero, FALSE_LABEL);
-    masm.testptr(ary2Reg, ary2Reg);
-    masm.jcc(Assembler::zero, FALSE_LABEL);
-
-    // Check the lengths
-    masm.movl(tmp4Reg, Address(ary1Reg, length_offset));
-    masm.movl(resultReg, Address(ary2Reg, length_offset));
-    masm.cmpl(tmp4Reg, resultReg);
-    masm.jcc(Assembler::notEqual, FALSE_LABEL);
-    masm.testl(resultReg, resultReg);
-    masm.jcc(Assembler::zero, TRUE_LABEL);
-
-    // Load array addrs
-    masm.lea(ary1Reg, Address(ary1Reg, base_offset));
-    masm.lea(ary2Reg, Address(ary2Reg, base_offset));
-
-    // Set byte count
-    masm.shll(tmp4Reg, 1);
-    masm.movl(resultReg, tmp4Reg);
-
-    if (UseSSE42Intrinsics) {
-      // With SSE4.2, use double quad vector compare
-      Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
-      // Compare 16-byte vectors
-      masm.andl(tmp4Reg, 0xfffffff0);    // vector count (in bytes)
-      masm.andl(resultReg, 0x0000000e);  // tail count (in bytes)
-      masm.testl(tmp4Reg, tmp4Reg);
-      masm.jccb(Assembler::zero, COMPARE_TAIL);
-      masm.lea(ary1Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-      masm.lea(ary2Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-      masm.negl(tmp4Reg);
-
-      masm.bind(COMPARE_WIDE_VECTORS);
-      masm.movdqu(tmp1Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-      masm.movdqu(tmp2Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-      masm.pxor(tmp1Reg, tmp2Reg);
-      masm.ptest(tmp1Reg, tmp1Reg);
-
-      masm.jccb(Assembler::notZero, FALSE_LABEL);
-      masm.addl(tmp4Reg, 16);
-      masm.jcc(Assembler::notZero, COMPARE_WIDE_VECTORS);
-      masm.bind(COMPARE_TAIL);
-      masm.movl(tmp4Reg, resultReg);
-      // Fallthru to tail compare
-    }
-
-    // Compare 4-byte vectors
-    masm.andl(tmp4Reg, 0xfffffffc);    // vector count (in bytes)
-    masm.andl(resultReg, 0x00000002);  // tail char (in bytes)
-    masm.testl(tmp4Reg, tmp4Reg);
-    masm.jccb(Assembler::zero, COMPARE_CHAR);
-    masm.lea(ary1Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-    masm.lea(ary2Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-    masm.negl(tmp4Reg);
-
-    masm.bind(COMPARE_VECTORS);
-    masm.movl(tmp3Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-    masm.cmpl(tmp3Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-    masm.jccb(Assembler::notEqual, FALSE_LABEL);
-    masm.addl(tmp4Reg, 4);
-    masm.jcc(Assembler::notZero, COMPARE_VECTORS);
-
-    // Compare trailing char (final 2 bytes), if any
-    masm.bind(COMPARE_CHAR);
-    masm.testl(resultReg, resultReg);
-    masm.jccb(Assembler::zero, TRUE_LABEL);
-    masm.load_unsigned_short(tmp3Reg, Address(ary1Reg, 0));
-    masm.load_unsigned_short(tmp4Reg, Address(ary2Reg, 0));
-    masm.cmpl(tmp3Reg, tmp4Reg);
-    masm.jccb(Assembler::notEqual, FALSE_LABEL);
-
-    masm.bind(TRUE_LABEL);
-    masm.movl(resultReg, 1);   // return true
-    masm.jmpb(DONE);
-
-    masm.bind(FALSE_LABEL);
-    masm.xorl(resultReg, resultReg); // return false
-
-    // That's it
-    masm.bind(DONE);
-  %}
 
   enc_class enc_pop_rdx() %{
     emit_opcode(cbuf,0x5A);
@@ -12718,48 +12266,64 @@
   ins_pipe( pipe_slow );
 %}
 
-instruct string_compare(eDIRegP str1, eSIRegP str2, regXD tmp1, regXD tmp2,
-                        eAXRegI tmp3, eBXRegI tmp4, eCXRegI result, eFlagsReg cr) %{
-  match(Set result (StrComp str1 str2));
-  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, KILL tmp3, KILL tmp4, KILL cr);
-  //ins_cost(300);
-
-  format %{ "String Compare $str1,$str2 -> $result    // KILL EAX, EBX" %}
-  ins_encode( enc_String_Compare(str1, str2, tmp1, tmp2, tmp3, tmp4, result) );
+instruct string_compare(eDIRegP str1, eCXRegI cnt1, eSIRegP str2, eBXRegI cnt2,
+                        eAXRegI result, regXD tmp1, regXD tmp2, eFlagsReg cr) %{
+  match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
+  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr);
+
+  format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result   // KILL $tmp1, $tmp2" %}
+  ins_encode %{
+    __ string_compare($str1$$Register, $str2$$Register,
+                      $cnt1$$Register, $cnt2$$Register, $result$$Register,
+                      $tmp1$$XMMRegister, $tmp2$$XMMRegister);
+  %}
   ins_pipe( pipe_slow );
 %}
 
 // fast string equals
-instruct string_equals(eDIRegP str1, eSIRegP str2, regXD tmp1, regXD tmp2,
-                       eBXRegI tmp3, eCXRegI tmp4, eAXRegI result, eFlagsReg cr) %{
-  match(Set result (StrEquals str1 str2));
-  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, KILL tmp3, KILL tmp4, KILL cr);
-
-  format %{ "String Equals $str1,$str2 -> $result    // KILL EBX, ECX" %}
-  ins_encode( enc_String_Equals(tmp1, tmp2, str1, str2, tmp3, tmp4, result) );
-  ins_pipe( pipe_slow );
-%}
-
-instruct string_indexof(eSIRegP str1, eDIRegP str2, regXD tmp1, eAXRegI tmp2,
-                        eCXRegI tmp3, eDXRegI tmp4, eBXRegI result, eFlagsReg cr) %{
+instruct string_equals(eDIRegP str1, eSIRegP str2, eCXRegI cnt, eAXRegI result,
+                       regXD tmp1, regXD tmp2, eBXRegI tmp3, eFlagsReg cr) %{
+  match(Set result (StrEquals (Binary str1 str2) cnt));
+  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL tmp3, KILL cr);
+
+  format %{ "String Equals $str1,$str2,$cnt -> $result    // KILL $tmp1, $tmp2, $tmp3" %}
+  ins_encode %{
+    __ char_arrays_equals(false, $str1$$Register, $str2$$Register,
+                          $cnt$$Register, $result$$Register, $tmp3$$Register,
+                          $tmp1$$XMMRegister, $tmp2$$XMMRegister);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+instruct string_indexof(eDIRegP str1, eDXRegI cnt1, eSIRegP str2, eAXRegI cnt2,
+                        eBXRegI result, regXD tmp1, eCXRegI tmp2, eFlagsReg cr) %{
   predicate(UseSSE42Intrinsics);
-  match(Set result (StrIndexOf str1 str2));
-  effect(TEMP tmp1, USE_KILL str1, USE_KILL str2, KILL tmp2, KILL tmp3, KILL tmp4, KILL cr);
-
-  format %{ "String IndexOf $str1,$str2 -> $result    // KILL EAX, ECX, EDX" %}
-  ins_encode( enc_String_IndexOf(str1, str2, tmp1, tmp2, tmp3, tmp4, result) );
+  match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
+  effect(TEMP tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL tmp2, KILL cr);
+
+  format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result   // KILL $tmp2, $tmp1" %}
+  ins_encode %{
+    __ string_indexof($str1$$Register, $str2$$Register,
+                      $cnt1$$Register, $cnt2$$Register, $result$$Register,
+                      $tmp1$$XMMRegister, $tmp2$$Register);
+  %}
   ins_pipe( pipe_slow );
 %}
 
 // fast array equals
-instruct array_equals(eDIRegP ary1, eSIRegP ary2, regXD tmp1, regXD tmp2, eBXRegI tmp3,
-                      eDXRegI tmp4, eAXRegI result, eFlagsReg cr) %{
+instruct array_equals(eDIRegP ary1, eSIRegP ary2, eAXRegI result,
+                      regXD tmp1, regXD tmp2, eCXRegI tmp3, eBXRegI tmp4, eFlagsReg cr)
+%{
   match(Set result (AryEq ary1 ary2));
   effect(TEMP tmp1, TEMP tmp2, USE_KILL ary1, USE_KILL ary2, KILL tmp3, KILL tmp4, KILL cr);
   //ins_cost(300);
 
-  format %{ "Array Equals $ary1,$ary2 -> $result    // KILL EBX, EDX" %}
-  ins_encode( enc_Array_Equals(ary1, ary2, tmp1, tmp2, tmp3, tmp4, result) );
+  format %{ "Array Equals $ary1,$ary2 -> $result   // KILL $tmp1, $tmp2, $tmp3, $tmp4" %}
+  ins_encode %{
+    __ char_arrays_equals(true, $ary1$$Register, $ary2$$Register,
+                          $tmp3$$Register, $result$$Register, $tmp4$$Register,
+                          $tmp1$$XMMRegister, $tmp2$$XMMRegister);
+  %}
   ins_pipe( pipe_slow );
 %}
 
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad	Wed Jul 05 17:01:52 2017 +0200
@@ -683,7 +683,7 @@
 #ifdef ASSERT
   if (rspec.reloc()->type() == relocInfo::oop_type &&
       d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
-    assert(oop((intptr_t)d32)->is_oop() && oop((intptr_t)d32)->is_perm(), "cannot embed non-perm oops in code");
+    assert(oop((intptr_t)d32)->is_oop() && (ScavengeRootsInCode || !oop((intptr_t)d32)->is_scavengable()), "cannot embed scavengable oops in code");
   }
 #endif
   cbuf.relocate(cbuf.inst_mark(), rspec, format);
@@ -721,8 +721,8 @@
 #ifdef ASSERT
   if (rspec.reloc()->type() == relocInfo::oop_type &&
       d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
-    assert(oop(d64)->is_oop() && oop(d64)->is_perm(),
-           "cannot embed non-perm oops in code");
+    assert(oop(d64)->is_oop() && (ScavengeRootsInCode || !oop(d64)->is_scavengable()),
+           "cannot embed scavengable oops in code");
   }
 #endif
   cbuf.relocate(cbuf.inst_mark(), rspec, format);
@@ -3701,448 +3701,6 @@
     }
   %}
 
-  enc_class enc_String_Compare(rdi_RegP str1, rsi_RegP str2, regD tmp1, regD tmp2,
-                        rax_RegI tmp3, rbx_RegI tmp4, rcx_RegI result) %{
-    Label RCX_GOOD_LABEL, LENGTH_DIFF_LABEL,
-          POP_LABEL, DONE_LABEL, CONT_LABEL,
-          WHILE_HEAD_LABEL;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-    XMMRegister tmp2Reg   = as_XMMRegister($tmp2$$reg);
-
-    // Get the first character position in both strings
-    //         [8] char array, [12] offset, [16] count
-    int value_offset  = java_lang_String::value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int count_offset  = java_lang_String::count_offset_in_bytes();
-    int base_offset   = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    masm.load_heap_oop(rax, Address(rsi, value_offset));
-    masm.movl(rcx, Address(rsi, offset_offset));
-    masm.lea(rax, Address(rax, rcx, Address::times_2, base_offset));
-    masm.load_heap_oop(rbx, Address(rdi, value_offset));
-    masm.movl(rcx, Address(rdi, offset_offset));
-    masm.lea(rbx, Address(rbx, rcx, Address::times_2, base_offset));
-
-    // Compute the minimum of the string lengths(rsi) and the
-    // difference of the string lengths (stack)
-
-    // do the conditional move stuff
-    masm.movl(rdi, Address(rdi, count_offset));
-    masm.movl(rsi, Address(rsi, count_offset));
-    masm.movl(rcx, rdi);
-    masm.subl(rdi, rsi);
-    masm.push(rdi);
-    masm.cmov(Assembler::lessEqual, rsi, rcx);
-
-    // Is the minimum length zero?
-    masm.bind(RCX_GOOD_LABEL);
-    masm.testl(rsi, rsi);
-    masm.jcc(Assembler::zero, LENGTH_DIFF_LABEL);
-
-    // Load first characters
-    masm.load_unsigned_short(rcx, Address(rbx, 0));
-    masm.load_unsigned_short(rdi, Address(rax, 0));
-
-    // Compare first characters
-    masm.subl(rcx, rdi);
-    masm.jcc(Assembler::notZero,  POP_LABEL);
-    masm.decrementl(rsi);
-    masm.jcc(Assembler::zero, LENGTH_DIFF_LABEL);
-
-    {
-      // Check after comparing first character to see if strings are equivalent
-      Label LSkip2;
-      // Check if the strings start at same location
-      masm.cmpptr(rbx, rax);
-      masm.jccb(Assembler::notEqual, LSkip2);
-
-      // Check if the length difference is zero (from stack)
-      masm.cmpl(Address(rsp, 0), 0x0);
-      masm.jcc(Assembler::equal,  LENGTH_DIFF_LABEL);
-
-      // Strings might not be equivalent
-      masm.bind(LSkip2);
-    }
-
-    // Advance to next character
-    masm.addptr(rax, 2);
-    masm.addptr(rbx, 2);
-
-    if (UseSSE42Intrinsics) {
-      // With SSE4.2, use double quad vector compare
-      Label COMPARE_VECTORS, VECTOR_NOT_EQUAL, COMPARE_TAIL;
-      // Setup to compare 16-byte vectors
-      masm.movl(rdi, rsi);
-      masm.andl(rsi, 0xfffffff8); // rsi holds the vector count
-      masm.andl(rdi, 0x00000007); // rdi holds the tail count
-      masm.testl(rsi, rsi);
-      masm.jccb(Assembler::zero, COMPARE_TAIL);
-
-      masm.lea(rax, Address(rax, rsi, Address::times_2));
-      masm.lea(rbx, Address(rbx, rsi, Address::times_2));
-      masm.negptr(rsi);
-
-      masm.bind(COMPARE_VECTORS);
-      masm.movdqu(tmp1Reg, Address(rax, rsi, Address::times_2));
-      masm.movdqu(tmp2Reg, Address(rbx, rsi, Address::times_2));
-      masm.pxor(tmp1Reg, tmp2Reg);
-      masm.ptest(tmp1Reg, tmp1Reg);
-      masm.jccb(Assembler::notZero, VECTOR_NOT_EQUAL);
-      masm.addptr(rsi, 8);
-      masm.jcc(Assembler::notZero, COMPARE_VECTORS);
-      masm.jmpb(COMPARE_TAIL);
-
-      // Mismatched characters in the vectors
-      masm.bind(VECTOR_NOT_EQUAL);
-      masm.lea(rax, Address(rax, rsi, Address::times_2));
-      masm.lea(rbx, Address(rbx, rsi, Address::times_2));
-      masm.movl(rdi, 8);
-
-      // Compare tail (< 8 chars), or rescan last vectors to
-      // find 1st mismatched characters
-      masm.bind(COMPARE_TAIL);
-      masm.testl(rdi, rdi);
-      masm.jccb(Assembler::zero, LENGTH_DIFF_LABEL);
-      masm.movl(rsi, rdi);
-      // Fallthru to tail compare
-    }
-
-    // Shift RAX and RBX to the end of the arrays, negate min
-    masm.lea(rax, Address(rax, rsi, Address::times_2, 0));
-    masm.lea(rbx, Address(rbx, rsi, Address::times_2, 0));
-    masm.negptr(rsi);
-
-    // Compare the rest of the characters
-    masm.bind(WHILE_HEAD_LABEL);
-    masm.load_unsigned_short(rcx, Address(rbx, rsi, Address::times_2, 0));
-    masm.load_unsigned_short(rdi, Address(rax, rsi, Address::times_2, 0));
-    masm.subl(rcx, rdi);
-    masm.jccb(Assembler::notZero, POP_LABEL);
-    masm.increment(rsi);
-    masm.jcc(Assembler::notZero, WHILE_HEAD_LABEL);
-
-    // Strings are equal up to min length.  Return the length difference.
-    masm.bind(LENGTH_DIFF_LABEL);
-    masm.pop(rcx);
-    masm.jmpb(DONE_LABEL);
-
-    // Discard the stored length difference
-    masm.bind(POP_LABEL);
-    masm.addptr(rsp, 8);
-
-    // That's it
-    masm.bind(DONE_LABEL);
-  %}
-
- enc_class enc_String_IndexOf(rsi_RegP str1, rdi_RegP str2, regD tmp1, rax_RegI tmp2,
-                        rcx_RegI tmp3, rdx_RegI tmp4, rbx_RegI result) %{
-    // SSE4.2 version
-    Label LOAD_SUBSTR, PREP_FOR_SCAN, SCAN_TO_SUBSTR,
-          SCAN_SUBSTR, RET_NEG_ONE, RET_NOT_FOUND, CLEANUP, DONE;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-
-    // Get the first character position in both strings
-    //         [8] char array, [12] offset, [16] count
-    int value_offset  = java_lang_String::value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int count_offset  = java_lang_String::count_offset_in_bytes();
-    int base_offset   = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    // Get counts for string and substr
-    masm.movl(rdx, Address(rsi, count_offset));
-    masm.movl(rax, Address(rdi, count_offset));
-    // Check for substr count > string count
-    masm.cmpl(rax, rdx);
-    masm.jcc(Assembler::greater, RET_NEG_ONE);
-
-    // Start the indexOf operation
-    // Get start addr of string
-    masm.load_heap_oop(rbx, Address(rsi, value_offset));
-    masm.movl(rcx, Address(rsi, offset_offset));
-    masm.lea(rsi, Address(rbx, rcx, Address::times_2, base_offset));
-    masm.push(rsi);
-
-    // Get start addr of substr
-    masm.load_heap_oop(rbx, Address(rdi, value_offset));
-    masm.movl(rcx, Address(rdi, offset_offset));
-    masm.lea(rdi, Address(rbx, rcx, Address::times_2, base_offset));
-    masm.push(rdi);
-    masm.push(rax);
-    masm.jmpb(PREP_FOR_SCAN);
-
-    // Substr count saved at sp
-    // Substr saved at sp+8
-    // String saved at sp+16
-
-    // Prep to load substr for scan
-    masm.bind(LOAD_SUBSTR);
-    masm.movptr(rdi, Address(rsp, 8));
-    masm.movl(rax, Address(rsp, 0));
-
-    // Load substr
-    masm.bind(PREP_FOR_SCAN);
-    masm.movdqu(tmp1Reg, Address(rdi, 0));
-    masm.addq(rdx, 8);    // prime the loop
-    masm.subptr(rsi, 16);
-
-    // Scan string for substr in 16-byte vectors
-    masm.bind(SCAN_TO_SUBSTR);
-    masm.subq(rdx, 8);
-    masm.addptr(rsi, 16);
-    masm.pcmpestri(tmp1Reg, Address(rsi, 0), 0x0d);
-    masm.jcc(Assembler::above, SCAN_TO_SUBSTR);
-    masm.jccb(Assembler::aboveEqual, RET_NOT_FOUND);
-
-    // Fallthru: found a potential substr
-
-    //Make sure string is still long enough
-    masm.subl(rdx, rcx);
-    masm.cmpl(rdx, rax);
-    masm.jccb(Assembler::negative, RET_NOT_FOUND);
-    // Compute start addr of substr
-    masm.lea(rsi, Address(rsi, rcx, Address::times_2));
-    masm.movptr(rbx, rsi);
-
-    // Compare potential substr
-    masm.addq(rdx, 8);        // prime the loop
-    masm.addq(rax, 8);
-    masm.subptr(rsi, 16);
-    masm.subptr(rdi, 16);
-
-    // Scan 16-byte vectors of string and substr
-    masm.bind(SCAN_SUBSTR);
-    masm.subq(rax, 8);
-    masm.subq(rdx, 8);
-    masm.addptr(rsi, 16);
-    masm.addptr(rdi, 16);
-    masm.movdqu(tmp1Reg, Address(rdi, 0));
-    masm.pcmpestri(tmp1Reg, Address(rsi, 0), 0x0d);
-    masm.jcc(Assembler::noOverflow, LOAD_SUBSTR);   // OF == 0
-    masm.jcc(Assembler::positive, SCAN_SUBSTR);     // SF == 0
-
-    // Compute substr offset
-    masm.movptr(rsi, Address(rsp, 16));
-    masm.subptr(rbx, rsi);
-    masm.shrl(rbx, 1);
-    masm.jmpb(CLEANUP);
-
-    masm.bind(RET_NEG_ONE);
-    masm.movl(rbx, -1);
-    masm.jmpb(DONE);
-
-    masm.bind(RET_NOT_FOUND);
-    masm.movl(rbx, -1);
-
-    masm.bind(CLEANUP);
-    masm.addptr(rsp, 24);
-
-    masm.bind(DONE);
-  %}
-
-  enc_class enc_String_Equals(rdi_RegP str1, rsi_RegP str2, regD tmp1, regD tmp2,
-                              rbx_RegI tmp3, rcx_RegI tmp2, rax_RegI result) %{
-    Label RET_TRUE, RET_FALSE, DONE, COMPARE_VECTORS, COMPARE_CHAR;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-    XMMRegister tmp2Reg   = as_XMMRegister($tmp2$$reg);
-
-    int value_offset  = java_lang_String::value_offset_in_bytes();
-    int offset_offset = java_lang_String::offset_offset_in_bytes();
-    int count_offset  = java_lang_String::count_offset_in_bytes();
-    int base_offset   = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    // does source == target string?
-    masm.cmpptr(rdi, rsi);
-    masm.jcc(Assembler::equal, RET_TRUE);
-
-    // get and compare counts
-    masm.movl(rcx, Address(rdi, count_offset));
-    masm.movl(rax, Address(rsi, count_offset));
-    masm.cmpl(rcx, rax);
-    masm.jcc(Assembler::notEqual, RET_FALSE);
-    masm.testl(rax, rax);
-    masm.jcc(Assembler::zero, RET_TRUE);
-
-    // get source string offset and value
-    masm.load_heap_oop(rbx, Address(rsi, value_offset));
-    masm.movl(rax, Address(rsi, offset_offset));
-    masm.lea(rsi, Address(rbx, rax, Address::times_2, base_offset));
-
-    // get compare string offset and value
-    masm.load_heap_oop(rbx, Address(rdi, value_offset));
-    masm.movl(rax, Address(rdi, offset_offset));
-    masm.lea(rdi, Address(rbx, rax, Address::times_2, base_offset));
-
-    // Set byte count
-    masm.shll(rcx, 1);
-    masm.movl(rax, rcx);
-
-    if (UseSSE42Intrinsics) {
-      // With SSE4.2, use double quad vector compare
-      Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
-      // Compare 16-byte vectors
-      masm.andl(rcx, 0xfffffff0);  // vector count (in bytes)
-      masm.andl(rax, 0x0000000e);  // tail count (in bytes)
-      masm.testl(rcx, rcx);
-      masm.jccb(Assembler::zero, COMPARE_TAIL);
-      masm.lea(rdi, Address(rdi, rcx, Address::times_1));
-      masm.lea(rsi, Address(rsi, rcx, Address::times_1));
-      masm.negptr(rcx);
-
-      masm.bind(COMPARE_WIDE_VECTORS);
-      masm.movdqu(tmp1Reg, Address(rdi, rcx, Address::times_1));
-      masm.movdqu(tmp2Reg, Address(rsi, rcx, Address::times_1));
-      masm.pxor(tmp1Reg, tmp2Reg);
-      masm.ptest(tmp1Reg, tmp1Reg);
-      masm.jccb(Assembler::notZero, RET_FALSE);
-      masm.addptr(rcx, 16);
-      masm.jcc(Assembler::notZero, COMPARE_WIDE_VECTORS);
-      masm.bind(COMPARE_TAIL);
-      masm.movl(rcx, rax);
-      // Fallthru to tail compare
-    }
-
-    // Compare 4-byte vectors
-    masm.andl(rcx, 0xfffffffc);  // vector count (in bytes)
-    masm.andl(rax, 0x00000002);  // tail char (in bytes)
-    masm.testl(rcx, rcx);
-    masm.jccb(Assembler::zero, COMPARE_CHAR);
-    masm.lea(rdi, Address(rdi, rcx, Address::times_1));
-    masm.lea(rsi, Address(rsi, rcx, Address::times_1));
-    masm.negptr(rcx);
-
-    masm.bind(COMPARE_VECTORS);
-    masm.movl(rbx, Address(rdi, rcx, Address::times_1));
-    masm.cmpl(rbx, Address(rsi, rcx, Address::times_1));
-    masm.jccb(Assembler::notEqual, RET_FALSE);
-    masm.addptr(rcx, 4);
-    masm.jcc(Assembler::notZero, COMPARE_VECTORS);
-
-    // Compare trailing char (final 2 bytes), if any
-    masm.bind(COMPARE_CHAR);
-    masm.testl(rax, rax);
-    masm.jccb(Assembler::zero, RET_TRUE);
-    masm.load_unsigned_short(rbx, Address(rdi, 0));
-    masm.load_unsigned_short(rcx, Address(rsi, 0));
-    masm.cmpl(rbx, rcx);
-    masm.jccb(Assembler::notEqual, RET_FALSE);
-
-    masm.bind(RET_TRUE);
-    masm.movl(rax, 1);   // return true
-    masm.jmpb(DONE);
-
-    masm.bind(RET_FALSE);
-    masm.xorl(rax, rax); // return false
-
-    masm.bind(DONE);
-  %}
-
-  enc_class enc_Array_Equals(rdi_RegP ary1, rsi_RegP ary2, regD tmp1, regD tmp2,
-                             rax_RegI tmp3, rbx_RegI tmp4, rcx_RegI result) %{
-    Label TRUE_LABEL, FALSE_LABEL, DONE, COMPARE_VECTORS, COMPARE_CHAR;
-    MacroAssembler masm(&cbuf);
-
-    XMMRegister tmp1Reg   = as_XMMRegister($tmp1$$reg);
-    XMMRegister tmp2Reg   = as_XMMRegister($tmp2$$reg);
-    Register ary1Reg      = as_Register($ary1$$reg);
-    Register ary2Reg      = as_Register($ary2$$reg);
-    Register tmp3Reg      = as_Register($tmp3$$reg);
-    Register tmp4Reg      = as_Register($tmp4$$reg);
-    Register resultReg    = as_Register($result$$reg);
-
-    int length_offset  = arrayOopDesc::length_offset_in_bytes();
-    int base_offset    = arrayOopDesc::base_offset_in_bytes(T_CHAR);
-
-    // Check the input args
-    masm.cmpq(ary1Reg, ary2Reg);
-    masm.jcc(Assembler::equal, TRUE_LABEL);
-    masm.testq(ary1Reg, ary1Reg);
-    masm.jcc(Assembler::zero, FALSE_LABEL);
-    masm.testq(ary2Reg, ary2Reg);
-    masm.jcc(Assembler::zero, FALSE_LABEL);
-
-    // Check the lengths
-    masm.movl(tmp4Reg, Address(ary1Reg, length_offset));
-    masm.movl(resultReg, Address(ary2Reg, length_offset));
-    masm.cmpl(tmp4Reg, resultReg);
-    masm.jcc(Assembler::notEqual, FALSE_LABEL);
-    masm.testl(resultReg, resultReg);
-    masm.jcc(Assembler::zero, TRUE_LABEL);
-
-    //load array address
-    masm.lea(ary1Reg, Address(ary1Reg, base_offset));
-    masm.lea(ary2Reg, Address(ary2Reg, base_offset));
-
-    //set byte count
-    masm.shll(tmp4Reg, 1);
-    masm.movl(resultReg,tmp4Reg);
-
-    if (UseSSE42Intrinsics){
-      // With SSE4.2, use double quad vector compare
-      Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
-      // Compare 16-byte vectors
-      masm.andl(tmp4Reg, 0xfffffff0);    // vector count (in bytes)
-      masm.andl(resultReg, 0x0000000e);  // tail count (in bytes)
-      masm.testl(tmp4Reg, tmp4Reg);
-      masm.jccb(Assembler::zero, COMPARE_TAIL);
-      masm.lea(ary1Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-      masm.lea(ary2Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-      masm.negptr(tmp4Reg);
-
-      masm.bind(COMPARE_WIDE_VECTORS);
-      masm.movdqu(tmp1Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-      masm.movdqu(tmp2Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-      masm.pxor(tmp1Reg, tmp2Reg);
-      masm.ptest(tmp1Reg, tmp1Reg);
-
-      masm.jccb(Assembler::notZero, FALSE_LABEL);
-      masm.addptr(tmp4Reg, 16);
-      masm.jcc(Assembler::notZero, COMPARE_WIDE_VECTORS);
-      masm.bind(COMPARE_TAIL);
-      masm.movl(tmp4Reg, resultReg);
-      // Fallthru to tail compare
-    }
-
-   // Compare 4-byte vectors
-    masm.andl(tmp4Reg, 0xfffffffc);    // vector count (in bytes)
-    masm.andl(resultReg, 0x00000002);  // tail char (in bytes)
-    masm.testl(tmp4Reg, tmp4Reg); //if tmp2 == 0, only compare char
-    masm.jccb(Assembler::zero, COMPARE_CHAR);
-    masm.lea(ary1Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-    masm.lea(ary2Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-    masm.negptr(tmp4Reg);
-
-    masm.bind(COMPARE_VECTORS);
-    masm.movl(tmp3Reg, Address(ary1Reg, tmp4Reg, Address::times_1));
-    masm.cmpl(tmp3Reg, Address(ary2Reg, tmp4Reg, Address::times_1));
-    masm.jccb(Assembler::notEqual, FALSE_LABEL);
-    masm.addptr(tmp4Reg, 4);
-    masm.jcc(Assembler::notZero, COMPARE_VECTORS);
-
-    // Compare trailing char (final 2 bytes), if any
-    masm.bind(COMPARE_CHAR);
-    masm.testl(resultReg, resultReg);
-    masm.jccb(Assembler::zero, TRUE_LABEL);
-    masm.load_unsigned_short(tmp3Reg, Address(ary1Reg, 0));
-    masm.load_unsigned_short(tmp4Reg, Address(ary2Reg, 0));
-    masm.cmpl(tmp3Reg, tmp4Reg);
-    masm.jccb(Assembler::notEqual, FALSE_LABEL);
-
-    masm.bind(TRUE_LABEL);
-    masm.movl(resultReg, 1);   // return true
-    masm.jmpb(DONE);
-
-    masm.bind(FALSE_LABEL);
-    masm.xorl(resultReg, resultReg); // return false
-
-    // That's it
-    masm.bind(DONE);
-  %}
 
   enc_class enc_rethrow()
   %{
@@ -12096,52 +11654,67 @@
   ins_pipe(pipe_slow);
 %}
 
-instruct string_compare(rdi_RegP str1, rsi_RegP str2, regD tmp1, regD tmp2,
-                        rax_RegI tmp3, rbx_RegI tmp4, rcx_RegI result, rFlagsReg cr)
-%{
-  match(Set result (StrComp str1 str2));
-  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, KILL tmp3, KILL tmp4, KILL cr);
-  //ins_cost(300);
-
-  format %{ "String Compare $str1, $str2 -> $result    // XXX KILL RAX, RBX" %}
-  ins_encode( enc_String_Compare(str1, str2, tmp1, tmp2, tmp3, tmp4, result) );
+instruct string_compare(rdi_RegP str1, rcx_RegI cnt1, rsi_RegP str2, rbx_RegI cnt2,
+                        rax_RegI result, regD tmp1, regD tmp2, rFlagsReg cr)
+%{
+  match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
+  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL cr);
+
+  format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result   // KILL $tmp1, $tmp2" %}
+  ins_encode %{
+    __ string_compare($str1$$Register, $str2$$Register,
+                      $cnt1$$Register, $cnt2$$Register, $result$$Register,
+                      $tmp1$$XMMRegister, $tmp2$$XMMRegister);
+  %}
   ins_pipe( pipe_slow );
 %}
 
-instruct string_indexof(rsi_RegP str1, rdi_RegP str2, regD tmp1, rax_RegI tmp2,
-                        rcx_RegI tmp3, rdx_RegI tmp4, rbx_RegI result, rFlagsReg cr)
+instruct string_indexof(rdi_RegP str1, rdx_RegI cnt1, rsi_RegP str2, rax_RegI cnt2,
+                        rbx_RegI result, regD tmp1, rcx_RegI tmp2, rFlagsReg cr)
 %{
   predicate(UseSSE42Intrinsics);
-  match(Set result (StrIndexOf str1 str2));
-  effect(TEMP tmp1, USE_KILL str1, USE_KILL str2, KILL tmp2, KILL tmp3, KILL tmp4, KILL cr);
-
-  format %{ "String IndexOf $str1,$str2 -> $result   // KILL RAX, RCX, RDX" %}
-  ins_encode( enc_String_IndexOf(str1, str2, tmp1, tmp2, tmp3, tmp4, result) );
+  match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
+  effect(TEMP tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, KILL tmp2, KILL cr);
+
+  format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result   // KILL $tmp1, $tmp2" %}
+  ins_encode %{
+    __ string_indexof($str1$$Register, $str2$$Register,
+                      $cnt1$$Register, $cnt2$$Register, $result$$Register,
+                      $tmp1$$XMMRegister, $tmp2$$Register);
+  %}
   ins_pipe( pipe_slow );
 %}
 
 // fast string equals
-instruct string_equals(rdi_RegP str1, rsi_RegP str2, regD tmp1, regD tmp2, rbx_RegI tmp3,
-                       rcx_RegI tmp4, rax_RegI result, rFlagsReg cr)
-%{
-  match(Set result (StrEquals str1 str2));
-  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, KILL tmp3, KILL tmp4, KILL cr);
-
-  format %{ "String Equals $str1,$str2 -> $result    // KILL RBX, RCX" %}
-  ins_encode( enc_String_Equals(str1, str2, tmp1, tmp2, tmp3, tmp4, result) );
+instruct string_equals(rdi_RegP str1, rsi_RegP str2, rcx_RegI cnt, rax_RegI result,
+                       regD tmp1, regD tmp2, rbx_RegI tmp3, rFlagsReg cr)
+%{
+  match(Set result (StrEquals (Binary str1 str2) cnt));
+  effect(TEMP tmp1, TEMP tmp2, USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL tmp3, KILL cr);
+
+  format %{ "String Equals $str1,$str2,$cnt -> $result    // KILL $tmp1, $tmp2, $tmp3" %}
+  ins_encode %{
+    __ char_arrays_equals(false, $str1$$Register, $str2$$Register,
+                          $cnt$$Register, $result$$Register, $tmp3$$Register,
+                          $tmp1$$XMMRegister, $tmp2$$XMMRegister);
+  %}
   ins_pipe( pipe_slow );
 %}
 
 // fast array equals
-instruct array_equals(rdi_RegP ary1, rsi_RegP ary2, regD tmp1, regD tmp2, rax_RegI tmp3,
-                      rbx_RegI tmp4, rcx_RegI result, rFlagsReg cr)
+instruct array_equals(rdi_RegP ary1, rsi_RegP ary2, rax_RegI result,
+                      regD tmp1, regD tmp2, rcx_RegI tmp3, rbx_RegI tmp4, rFlagsReg cr)
 %{
   match(Set result (AryEq ary1 ary2));
   effect(TEMP tmp1, TEMP tmp2, USE_KILL ary1, USE_KILL ary2, KILL tmp3, KILL tmp4, KILL cr);
   //ins_cost(300);
 
-  format %{ "Array Equals $ary1,$ary2 -> $result   // KILL RAX, RBX" %}
-  ins_encode( enc_Array_Equals(ary1, ary2, tmp1, tmp2, tmp3, tmp4, result) );
+  format %{ "Array Equals $ary1,$ary2 -> $result   // KILL $tmp1, $tmp2, $tmp3, $tmp4" %}
+  ins_encode %{
+    __ char_arrays_equals(true, $ary1$$Register, $ary2$$Register,
+                          $tmp3$$Register, $result$$Register, $tmp4$$Register,
+                          $tmp1$$XMMRegister, $tmp2$$XMMRegister);
+  %}
   ins_pipe( pipe_slow );
 %}
 
--- a/hotspot/src/share/vm/adlc/formssel.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/adlc/formssel.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -828,11 +828,13 @@
     return AdlcVMDeps::Parms;   // Skip the machine-state edges
 
   if( _matrule->_rChild &&
-      ( strcmp(_matrule->_rChild->_opType,"StrComp"   )==0 ||
+      ( strcmp(_matrule->_rChild->_opType,"AryEq"     )==0 ||
+        strcmp(_matrule->_rChild->_opType,"StrComp"   )==0 ||
         strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
         strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 )) {
-        // String.(compareTo/equals/indexOf) take 1 control and 4 memory edges.
-    return 5;
+        // String.(compareTo/equals/indexOf) and Arrays.equals
+        // take 1 control and 1 memory edges.
+    return 2;
   }
 
   // Check for handling of 'Memory' input/edge in the ideal world.
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -1442,7 +1442,7 @@
         switch (field_type) {
         case T_ARRAY:
         case T_OBJECT:
-          if (field_val.as_object()->has_encoding()) {
+          if (field_val.as_object()->should_be_constant()) {
             constant =  new Constant(as_ValueType(field_val));
           }
           break;
--- a/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -133,12 +133,12 @@
       ciMethod* m = (ciMethod*)value;
       output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8());
     } else {
-      output()->print("<object 0x%x>", value->encoding());
+      output()->print("<object 0x%x>", value->constant_encoding());
     }
   } else if (type->as_InstanceConstant() != NULL) {
-    output()->print("<instance 0x%x>", type->as_InstanceConstant()->value()->encoding());
+    output()->print("<instance 0x%x>", type->as_InstanceConstant()->value()->constant_encoding());
   } else if (type->as_ArrayConstant() != NULL) {
-    output()->print("<array 0x%x>", type->as_ArrayConstant()->value()->encoding());
+    output()->print("<array 0x%x>", type->as_ArrayConstant()->value()->constant_encoding());
   } else if (type->as_ClassConstant() != NULL) {
     ciInstanceKlass* klass = type->as_ClassConstant()->value();
     if (!klass->is_loaded()) {
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -440,7 +440,7 @@
     __ oop2reg_patch(NULL, r, info);
   } else {
     // no patching needed
-    __ oop2reg(obj->encoding(), r);
+    __ oop2reg(obj->constant_encoding(), r);
   }
 }
 
@@ -831,7 +831,7 @@
     int taken_count_offset     = md->byte_offset_of_slot(data, BranchData::taken_offset());
     int not_taken_count_offset = md->byte_offset_of_slot(data, BranchData::not_taken_offset());
     LIR_Opr md_reg = new_register(T_OBJECT);
-    __ move(LIR_OprFact::oopConst(md->encoding()), md_reg);
+    __ move(LIR_OprFact::oopConst(md->constant_encoding()), md_reg);
     LIR_Opr data_offset_reg = new_register(T_INT);
     __ cmove(lir_cond(cond),
              LIR_OprFact::intConst(taken_count_offset),
@@ -1071,7 +1071,7 @@
     LIR_OprList* args = new LIR_OprList();
     args->append(getThreadPointer());
     LIR_Opr meth = new_register(T_OBJECT);
-    __ oop2reg(method()->encoding(), meth);
+    __ oop2reg(method()->constant_encoding(), meth);
     args->append(meth);
     call_runtime(&signature, args, CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), voidType, NULL);
   }
@@ -1784,7 +1784,7 @@
     LIR_OprList* args = new LIR_OprList();
     args->append(getThreadPointer());
     LIR_Opr meth = new_register(T_OBJECT);
-    __ oop2reg(method()->encoding(), meth);
+    __ oop2reg(method()->constant_encoding(), meth);
     args->append(meth);
     call_runtime(&signature, args, CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), voidType, NULL);
   }
@@ -2207,7 +2207,7 @@
     LIR_OprList* args = new LIR_OprList();
     args->append(getThreadPointer());
     LIR_Opr meth = new_register(T_OBJECT);
-    __ oop2reg(method()->encoding(), meth);
+    __ oop2reg(method()->constant_encoding(), meth);
     args->append(meth);
     call_runtime(&signature, args, CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), voidType, NULL);
   }
@@ -2216,7 +2216,7 @@
     LIR_Opr obj;
     if (method()->is_static()) {
       obj = new_register(T_OBJECT);
-      __ oop2reg(method()->holder()->java_mirror()->encoding(), obj);
+      __ oop2reg(method()->holder()->java_mirror()->constant_encoding(), obj);
     } else {
       Local* receiver = x->state()->local_at(0)->as_Local();
       assert(receiver != NULL, "must already exist");
@@ -2660,7 +2660,7 @@
     }
 
     LIR_Opr meth = new_register(T_OBJECT);
-    __ oop2reg(method()->encoding(), meth);
+    __ oop2reg(method()->constant_encoding(), meth);
     LIR_Opr result = increment_and_return_counter(meth, offset, InvocationCounter::count_increment);
     __ cmp(lir_cond_aboveEqual, result, LIR_OprFact::intConst(limit));
     CodeStub* overflow = new CounterOverflowStub(info, info->bci());
--- a/hotspot/src/share/vm/c1/c1_ValueType.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/c1/c1_ValueType.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -86,7 +86,7 @@
 
 jobject ObjectType::encoding() const {
   assert(is_constant(), "must be");
-  return constant_value()->encoding();
+  return constant_value()->constant_encoding();
 }
 
 bool ObjectType::is_loaded() const {
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -257,7 +257,7 @@
 
 // ------------------------------------------------------------------
 // ciEnv::make_array
-ciArray* ciEnv::make_array(GrowableArray<ciObject*>* objects) {
+ciArray* ciEnv::make_system_array(GrowableArray<ciObject*>* objects) {
   VM_ENTRY_MARK;
   int length = objects->length();
   objArrayOop a = oopFactory::new_system_objArray(length, THREAD);
--- a/hotspot/src/share/vm/ci/ciEnv.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -339,8 +339,8 @@
   // but consider adding to vmSymbols.hpp instead.
 
   // Use this to make a holder for non-perm compile time constants.
-  // The resulting array is guaranteed to satisfy "has_encoding".
-  ciArray*  make_array(GrowableArray<ciObject*>* objects);
+  // The resulting array is guaranteed to satisfy "can_be_constant".
+  ciArray*  make_system_array(GrowableArray<ciObject*>* objects);
 
   // converts the ciKlass* representing the holder of a method into a
   // ciInstanceKlass*.  This is needed since the holder of a method in
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -325,10 +325,10 @@
 }
 
 // ------------------------------------------------------------------
-// ciMethod::liveness_at_bci
+// ciMethod::raw_liveness_at_bci
 //
 // Which local variables are live at a specific bci?
-MethodLivenessResult ciMethod::liveness_at_bci(int bci) {
+MethodLivenessResult ciMethod::raw_liveness_at_bci(int bci) {
   check_is_loaded();
   if (_liveness == NULL) {
     // Create the liveness analyzer.
@@ -336,7 +336,17 @@
     _liveness = new (arena) MethodLiveness(arena, this);
     _liveness->compute_liveness();
   }
-  MethodLivenessResult result = _liveness->get_liveness_at(bci);
+  return _liveness->get_liveness_at(bci);
+}
+
+// ------------------------------------------------------------------
+// ciMethod::liveness_at_bci
+//
+// Which local variables are live at a specific bci?  When debugging
+// will return true for all locals in some cases to improve debug
+// information.
+MethodLivenessResult ciMethod::liveness_at_bci(int bci) {
+  MethodLivenessResult result = raw_liveness_at_bci(bci);
   if (CURRENT_ENV->jvmti_can_access_local_variables() || DeoptimizeALot || CompileTheWorld) {
     // Keep all locals live for the user's edification and amusement.
     result.at_put_range(0, result.size(), true);
--- a/hotspot/src/share/vm/ci/ciMethod.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -149,6 +149,12 @@
   bool          has_monitor_bytecodes() const    { return _uses_monitors; }
   bool          has_balanced_monitors();
 
+  // Returns a bitmap indicating which locals are required to be
+  // maintained as live for deopt.  raw_liveness_at_bci is always the
+  // direct output of the liveness computation while liveness_at_bci
+  // may mark all locals as live to improve support for debugging Java
+  // code by maintaining the state of as many locals as possible.
+  MethodLivenessResult raw_liveness_at_bci(int bci);
   MethodLivenessResult liveness_at_bci(int bci);
 
   // Get the interpreters viewpoint on oop liveness.  MethodLiveness is
--- a/hotspot/src/share/vm/ci/ciObject.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciObject.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -55,6 +55,7 @@
   }
   _klass = NULL;
   _ident = 0;
+  init_flags_from(o);
 }
 
 // ------------------------------------------------------------------
@@ -69,6 +70,7 @@
   }
   _klass = NULL;
   _ident = 0;
+  init_flags_from(h());
 }
 
 // ------------------------------------------------------------------
@@ -158,7 +160,7 @@
 }
 
 // ------------------------------------------------------------------
-// ciObject::encoding
+// ciObject::constant_encoding
 //
 // The address which the compiler should embed into the
 // generated code to represent this oop.  This address
@@ -172,16 +174,24 @@
 //
 // This method should be changed to return an generified address
 // to discourage use of the JNI handle.
-jobject ciObject::encoding() {
+jobject ciObject::constant_encoding() {
   assert(is_null_object() || handle() != NULL, "cannot embed null pointer");
-  assert(has_encoding(), "oop must be NULL or perm");
+  assert(can_be_constant(), "oop must be NULL or perm");
   return handle();
 }
 
 // ------------------------------------------------------------------
-// ciObject::has_encoding
-bool ciObject::has_encoding() {
-  return handle() == NULL || is_perm();
+// ciObject::can_be_constant
+bool ciObject::can_be_constant() {
+  if (ScavengeRootsInCode >= 1)  return true;  // now everybody can encode as a constant
+  return handle() == NULL || !is_scavengable();
+}
+
+// ------------------------------------------------------------------
+// ciObject::should_be_constant()
+bool ciObject::should_be_constant() {
+  if (ScavengeRootsInCode >= 2)  return true;  // force everybody to be a constant
+  return handle() == NULL || !is_scavengable();
 }
 
 
@@ -195,8 +205,9 @@
 void ciObject::print(outputStream* st) {
   st->print("<%s", type_string());
   GUARDED_VM_ENTRY(print_impl(st);)
-  st->print(" ident=%d %s address=0x%x>", ident(),
+  st->print(" ident=%d %s%s address=0x%x>", ident(),
         is_perm() ? "PERM" : "",
+        is_scavengable() ? "SCAVENGABLE" : "",
         (address)this);
 }
 
--- a/hotspot/src/share/vm/ci/ciObject.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciObject.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -51,9 +51,10 @@
   ciKlass* _klass;
   uint     _ident;
 
-  enum { FLAG_BITS   = 1};
+  enum { FLAG_BITS   = 2 };
   enum {
-         PERM_FLAG    = 1
+         PERM_FLAG        = 1,
+         SCAVENGABLE_FLAG = 2
        };
 protected:
   ciObject();
@@ -68,8 +69,15 @@
     return JNIHandles::resolve_non_null(_handle);
   }
 
-  void set_perm() {
-    _ident |=  PERM_FLAG;
+  void init_flags_from(oop x) {
+    int flags = 0;
+    if (x != NULL) {
+      if (x->is_perm())
+        flags |= PERM_FLAG;
+      if (x->is_scavengable())
+        flags |= SCAVENGABLE_FLAG;
+    }
+    _ident |= flags;
   }
 
   // Virtual behavior of the print() method.
@@ -91,17 +99,27 @@
   // A hash value for the convenience of compilers.
   int hash();
 
-  // Tells if this oop has an encoding.  (I.e., is it null or perm?)
+  // Tells if this oop has an encoding as a constant.
+  // True if is_scavengable is false.
+  // Also true if ScavengeRootsInCode is non-zero.
   // If it does not have an encoding, the compiler is responsible for
   // making other arrangements for dealing with the oop.
-  // See ciEnv::make_perm_array
-  bool has_encoding();
+  // See ciEnv::make_array
+  bool can_be_constant();
+
+  // Tells if this oop should be made a constant.
+  // True if is_scavengable is false or ScavengeRootsInCode > 1.
+  bool should_be_constant();
 
   // Is this object guaranteed to be in the permanent part of the heap?
   // If so, CollectedHeap::can_elide_permanent_oop_store_barriers is relevant.
   // If the answer is false, no guarantees are made.
   bool is_perm() { return (_ident & PERM_FLAG) != 0; }
 
+  // Might this object possibly move during a scavenge operation?
+  // If the answer is true and ScavengeRootsInCode==0, the oop cannot be embedded in code.
+  bool is_scavengable() { return (_ident & SCAVENGABLE_FLAG) != 0; }
+
   // The address which the compiler should embed into the
   // generated code to represent this oop.  This address
   // is not the true address of the oop -- it will get patched
@@ -109,7 +127,7 @@
   //
   // Usage note: no address arithmetic allowed.  Oop must
   // be registered with the oopRecorder.
-  jobject encoding();
+  jobject constant_encoding();
 
   // What kind of ciObject is this?
   virtual bool is_null_object() const       { return false; }
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -261,12 +261,11 @@
     ciObject* new_object = create_new_object(keyHandle());
     assert(keyHandle() == new_object->get_oop(), "must be properly recorded");
     init_ident_of(new_object);
-    if (!keyHandle->is_perm()) {
+    if (!new_object->is_perm()) {
       // Not a perm-space object.
       insert_non_perm(bucket, keyHandle(), new_object);
       return new_object;
     }
-    new_object->set_perm();
     if (len != _ci_objects->length()) {
       // creating the new object has recursively entered new objects
       // into the table.  We need to recompute our index.
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2486,8 +2486,13 @@
         // Assume irreducible entries need more data flow
         add_to_work_list(succ);
       }
-      lp = lp->parent();
-      assert(lp != NULL, "nested loop must have parent by now");
+      Loop* plp = lp->parent();
+      if (plp == NULL) {
+        // This only happens for some irreducible cases.  The parent
+        // will be updated during a later pass.
+        break;
+      }
+      lp = plp;
     }
 
     // Merge loop tree branch for all successors.
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2417,6 +2417,8 @@
                          vmSymbols::makeSite_name(), vmSymbols::makeSite_signature(),
                          &args, CHECK_(empty));
   oop call_site_oop = (oop) result.get_jobject();
+  assert(call_site_oop->is_oop()
+         /*&& sun_dyn_CallSiteImpl::is_instance(call_site_oop)*/, "must be sane");
   sun_dyn_CallSiteImpl::set_vmmethod(call_site_oop, mh_invdyn());
   if (TraceMethodHandles) {
     tty->print_cr("Linked invokedynamic bci=%d site="INTPTR_FORMAT":", caller_bci, call_site_oop);
@@ -2453,6 +2455,8 @@
   oop boot_method_oop = (oop) result.get_jobject();
 
   if (boot_method_oop != NULL) {
+    assert(boot_method_oop->is_oop()
+           && java_dyn_MethodHandle::is_instance(boot_method_oop), "must be sane");
     // probably no race conditions, but let's be careful:
     if (Atomic::cmpxchg_ptr(boot_method_oop, ik->adr_bootstrap_method(), NULL) == NULL)
       ik->set_bootstrap_method(boot_method_oop);
--- a/hotspot/src/share/vm/code/codeBlob.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/codeBlob.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -175,6 +175,8 @@
                             OopClosure* keep_alive,
                             bool unloading_occurred);
   virtual void oops_do(OopClosure* f) = 0;
+  // (All CodeBlob subtypes other than NMethod currently have
+  // an empty oops_do() method.
 
   // OopMap for frame
   OopMapSet* oop_maps() const                    { return _oop_maps; }
--- a/hotspot/src/share/vm/code/codeCache.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -95,6 +95,7 @@
 int CodeCache::_number_of_blobs = 0;
 int CodeCache::_number_of_nmethods_with_dependencies = 0;
 bool CodeCache::_needs_cache_clean = false;
+nmethod* CodeCache::_scavenge_root_nmethods = NULL;
 
 
 CodeBlob* CodeCache::first() {
@@ -148,10 +149,7 @@
     }
   }
   verify_if_often();
-  if (PrintCodeCache2) {        // Need to add a new flag
-      ResourceMark rm;
-      tty->print_cr("CodeCache allocation:  addr: " INTPTR_FORMAT ", size: 0x%x\n", cb, size);
-  }
+  print_trace("allocation", cb, size);
   return cb;
 }
 
@@ -159,10 +157,7 @@
   assert_locked_or_safepoint(CodeCache_lock);
   verify_if_often();
 
-  if (PrintCodeCache2) {        // Need to add a new flag
-      ResourceMark rm;
-      tty->print_cr("CodeCache free:  addr: " INTPTR_FORMAT ", size: 0x%x\n", cb, cb->size());
-  }
+  print_trace("free", cb);
   if (cb->is_nmethod() && ((nmethod *)cb)->has_dependencies()) {
     _number_of_nmethods_with_dependencies--;
   }
@@ -260,14 +255,148 @@
   }
 }
 
-void CodeCache::oops_do(OopClosure* f) {
+void CodeCache::blobs_do(CodeBlobClosure* f) {
   assert_locked_or_safepoint(CodeCache_lock);
   FOR_ALL_ALIVE_BLOBS(cb) {
-    cb->oops_do(f);
+    f->do_code_blob(cb);
+
+#ifdef ASSERT
+    if (cb->is_nmethod())
+      ((nmethod*)cb)->verify_scavenge_root_oops();
+#endif //ASSERT
   }
 }
 
+// Walk the list of methods which might contain non-perm oops.
+void CodeCache::scavenge_root_nmethods_do(CodeBlobClosure* f) {
+  assert_locked_or_safepoint(CodeCache_lock);
+  debug_only(mark_scavenge_root_nmethods());
+
+  for (nmethod* cur = scavenge_root_nmethods(); cur != NULL; cur = cur->scavenge_root_link()) {
+    debug_only(cur->clear_scavenge_root_marked());
+    assert(cur->scavenge_root_not_marked(), "");
+    assert(cur->on_scavenge_root_list(), "else shouldn't be on this list");
+
+    bool is_live = (!cur->is_zombie() && !cur->is_unloaded());
+#ifndef PRODUCT
+    if (TraceScavenge) {
+      cur->print_on(tty, is_live ? "scavenge root" : "dead scavenge root"); tty->cr();
+    }
+#endif //PRODUCT
+    if (is_live)
+      // Perform cur->oops_do(f), maybe just once per nmethod.
+      f->do_code_blob(cur);
+  }
+
+  // Check for stray marks.
+  debug_only(verify_perm_nmethods(NULL));
+}
+
+void CodeCache::add_scavenge_root_nmethod(nmethod* nm) {
+  assert_locked_or_safepoint(CodeCache_lock);
+  nm->set_on_scavenge_root_list();
+  nm->set_scavenge_root_link(_scavenge_root_nmethods);
+  set_scavenge_root_nmethods(nm);
+  print_trace("add_scavenge_root", nm);
+}
+
+void CodeCache::drop_scavenge_root_nmethod(nmethod* nm) {
+  assert_locked_or_safepoint(CodeCache_lock);
+  print_trace("drop_scavenge_root", nm);
+  nmethod* last = NULL;
+  nmethod* cur = scavenge_root_nmethods();
+  while (cur != NULL) {
+    nmethod* next = cur->scavenge_root_link();
+    if (cur == nm) {
+      if (last != NULL)
+            last->set_scavenge_root_link(next);
+      else  set_scavenge_root_nmethods(next);
+      nm->set_scavenge_root_link(NULL);
+      nm->clear_on_scavenge_root_list();
+      return;
+    }
+    last = cur;
+    cur = next;
+  }
+  assert(false, "should have been on list");
+}
+
+void CodeCache::prune_scavenge_root_nmethods() {
+  assert_locked_or_safepoint(CodeCache_lock);
+  debug_only(mark_scavenge_root_nmethods());
+
+  nmethod* last = NULL;
+  nmethod* cur = scavenge_root_nmethods();
+  while (cur != NULL) {
+    nmethod* next = cur->scavenge_root_link();
+    debug_only(cur->clear_scavenge_root_marked());
+    assert(cur->scavenge_root_not_marked(), "");
+    assert(cur->on_scavenge_root_list(), "else shouldn't be on this list");
+
+    if (!cur->is_zombie() && !cur->is_unloaded()
+        && cur->detect_scavenge_root_oops()) {
+      // Keep it.  Advance 'last' to prevent deletion.
+      last = cur;
+    } else {
+      // Prune it from the list, so we don't have to look at it any more.
+      print_trace("prune_scavenge_root", cur);
+      cur->set_scavenge_root_link(NULL);
+      cur->clear_on_scavenge_root_list();
+      if (last != NULL)
+            last->set_scavenge_root_link(next);
+      else  set_scavenge_root_nmethods(next);
+    }
+    cur = next;
+  }
+
+  // Check for stray marks.
+  debug_only(verify_perm_nmethods(NULL));
+}
+
+#ifndef PRODUCT
+void CodeCache::asserted_non_scavengable_nmethods_do(CodeBlobClosure* f) {
+  // While we are here, verify the integrity of the list.
+  mark_scavenge_root_nmethods();
+  for (nmethod* cur = scavenge_root_nmethods(); cur != NULL; cur = cur->scavenge_root_link()) {
+    assert(cur->on_scavenge_root_list(), "else shouldn't be on this list");
+    cur->clear_scavenge_root_marked();
+  }
+  verify_perm_nmethods(f);
+}
+
+// Temporarily mark nmethods that are claimed to be on the non-perm list.
+void CodeCache::mark_scavenge_root_nmethods() {
+  FOR_ALL_ALIVE_BLOBS(cb) {
+    if (cb->is_nmethod()) {
+      nmethod *nm = (nmethod*)cb;
+      assert(nm->scavenge_root_not_marked(), "clean state");
+      if (nm->on_scavenge_root_list())
+        nm->set_scavenge_root_marked();
+    }
+  }
+}
+
+// If the closure is given, run it on the unlisted nmethods.
+// Also make sure that the effects of mark_scavenge_root_nmethods is gone.
+void CodeCache::verify_perm_nmethods(CodeBlobClosure* f_or_null) {
+  FOR_ALL_ALIVE_BLOBS(cb) {
+    bool call_f = (f_or_null != NULL);
+    if (cb->is_nmethod()) {
+      nmethod *nm = (nmethod*)cb;
+      assert(nm->scavenge_root_not_marked(), "must be already processed");
+      if (nm->on_scavenge_root_list())
+        call_f = false;  // don't show this one to the client
+      nm->verify_scavenge_root_oops();
+    } else {
+      call_f = false;   // not an nmethod
+    }
+    if (call_f)  f_or_null->do_code_blob(cb);
+  }
+}
+#endif //PRODUCT
+
 void CodeCache::gc_prologue() {
+  assert(!nmethod::oops_do_marking_is_active(), "oops_do_marking_epilogue must be called");
 }
 
 
@@ -285,6 +414,8 @@
     cb->fix_oop_relocations();
   }
   set_needs_cache_clean(false);
+  prune_scavenge_root_nmethods();
+  assert(!nmethod::oops_do_marking_is_active(), "oops_do_marking_prologue must be called");
 }
 
 
@@ -508,6 +639,14 @@
   }
 }
 
+void CodeCache::print_trace(const char* event, CodeBlob* cb, int size) {
+  if (PrintCodeCache2) {  // Need to add a new flag
+    ResourceMark rm;
+    if (size == 0)  size = cb->size();
+    tty->print_cr("CodeCache %s:  addr: " INTPTR_FORMAT ", size: 0x%x", event, cb, size);
+  }
+}
+
 void CodeCache::print_internals() {
   int nmethodCount = 0;
   int runtimeStubCount = 0;
--- a/hotspot/src/share/vm/code/codeCache.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/codeCache.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -45,8 +45,13 @@
   static int _number_of_blobs;
   static int _number_of_nmethods_with_dependencies;
   static bool _needs_cache_clean;
+  static nmethod* _scavenge_root_nmethods;  // linked via nm->scavenge_root_link()
 
   static void verify_if_often() PRODUCT_RETURN;
+
+  static void mark_scavenge_root_nmethods() PRODUCT_RETURN;
+  static void verify_perm_nmethods(CodeBlobClosure* f_or_null) PRODUCT_RETURN;
+
  public:
 
   // Initialization
@@ -61,6 +66,7 @@
   static void flush();                              // flushes all CodeBlobs
   static bool contains(void *p);                    // returns whether p is included
   static void blobs_do(void f(CodeBlob* cb));       // iterates over all CodeBlobs
+  static void blobs_do(CodeBlobClosure* f);         // iterates over all CodeBlobs
   static void nmethods_do(void f(nmethod* nm));     // iterates over all nmethods
 
   // Lookup
@@ -106,12 +112,24 @@
   static void do_unloading(BoolObjectClosure* is_alive,
                            OopClosure* keep_alive,
                            bool unloading_occurred);
-  static void oops_do(OopClosure* f);
+  static void oops_do(OopClosure* f) {
+    CodeBlobToOopClosure oopc(f, /*do_marking=*/ false);
+    blobs_do(&oopc);
+  }
+  static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN;
+  static void scavenge_root_nmethods_do(CodeBlobClosure* f);
+
+  static nmethod* scavenge_root_nmethods()          { return _scavenge_root_nmethods; }
+  static void set_scavenge_root_nmethods(nmethod* nm) { _scavenge_root_nmethods = nm; }
+  static void add_scavenge_root_nmethod(nmethod* nm);
+  static void drop_scavenge_root_nmethod(nmethod* nm);
+  static void prune_scavenge_root_nmethods();
 
   // Printing/debugging
   static void print()   PRODUCT_RETURN;          // prints summary
   static void print_internals();
   static void verify();                          // verifies the code cache
+  static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN;
 
   // The full limits of the codeCache
   static address  low_bound()                    { return (address) _heap->low_boundary(); }
--- a/hotspot/src/share/vm/code/debugInfoRec.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/debugInfoRec.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -299,7 +299,7 @@
   stream()->write_int(sender_stream_offset);
 
   // serialize scope
-  jobject method_enc = (method == NULL)? NULL: method->encoding();
+  jobject method_enc = (method == NULL)? NULL: method->constant_encoding();
   stream()->write_int(oop_recorder()->find_index(method_enc));
   stream()->write_bci(bci);
   assert(method == NULL ||
--- a/hotspot/src/share/vm/code/dependencies.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/dependencies.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -302,7 +302,7 @@
       bytes.write_byte(code_byte);
       for (int j = 0; j < stride; j++) {
         if (j == skipj)  continue;
-        bytes.write_int(_oop_recorder->find_index(deps->at(i+j)->encoding()));
+        bytes.write_int(_oop_recorder->find_index(deps->at(i+j)->constant_encoding()));
       }
     }
   }
--- a/hotspot/src/share/vm/code/nmethod.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -581,10 +581,13 @@
     debug_only(No_Safepoint_Verifier nsv;)
     assert_locked_or_safepoint(CodeCache_lock);
 
-    NOT_PRODUCT(_has_debug_info = false; )
+    NOT_PRODUCT(_has_debug_info = false);
+    _oops_do_mark_link       = NULL;
     _method                  = method;
     _entry_bci               = InvocationEntryBci;
-    _link                    = NULL;
+    _osr_link                = NULL;
+    _scavenge_root_link      = NULL;
+    _scavenge_root_state     = 0;
     _compiler                = NULL;
     // We have no exception handler or deopt handler make the
     // values something that will never match a pc like the nmethod vtable entry
@@ -618,7 +621,7 @@
     _stack_traversal_mark    = 0;
 
     code_buffer->copy_oops_to(this);
-    debug_only(check_store();)
+    debug_only(verify_scavenge_root_oops());
     CodeCache::commit(this);
     VTune::create_nmethod(this);
   }
@@ -668,10 +671,13 @@
     debug_only(No_Safepoint_Verifier nsv;)
     assert_locked_or_safepoint(CodeCache_lock);
 
-    NOT_PRODUCT(_has_debug_info = false; )
+    NOT_PRODUCT(_has_debug_info = false);
+    _oops_do_mark_link       = NULL;
     _method                  = method;
     _entry_bci               = InvocationEntryBci;
-    _link                    = NULL;
+    _osr_link                = NULL;
+    _scavenge_root_link      = NULL;
+    _scavenge_root_state     = 0;
     _compiler                = NULL;
     // We have no exception handler or deopt handler make the
     // values something that will never match a pc like the nmethod vtable entry
@@ -703,7 +709,7 @@
     _stack_traversal_mark    = 0;
 
     code_buffer->copy_oops_to(this);
-    debug_only(check_store();)
+    debug_only(verify_scavenge_root_oops());
     CodeCache::commit(this);
     VTune::create_nmethod(this);
   }
@@ -770,12 +776,15 @@
     debug_only(No_Safepoint_Verifier nsv;)
     assert_locked_or_safepoint(CodeCache_lock);
 
-    NOT_PRODUCT(_has_debug_info = false; )
+    NOT_PRODUCT(_has_debug_info = false);
+    _oops_do_mark_link       = NULL;
     _method                  = method;
     _compile_id              = compile_id;
     _comp_level              = comp_level;
     _entry_bci               = entry_bci;
-    _link                    = NULL;
+    _osr_link                = NULL;
+    _scavenge_root_link      = NULL;
+    _scavenge_root_state     = 0;
     _compiler                = compiler;
     _orig_pc_offset          = orig_pc_offset;
 #ifdef HAVE_DTRACE_H
@@ -813,7 +822,10 @@
     code_buffer->copy_oops_to(this);
     debug_info->copy_to(this);
     dependencies->copy_to(this);
-    debug_only(check_store();)
+    if (ScavengeRootsInCode && detect_scavenge_root_oops()) {
+      CodeCache::add_scavenge_root_nmethod(this);
+    }
+    debug_only(verify_scavenge_root_oops());
 
     CodeCache::commit(this);
 
@@ -902,23 +914,30 @@
   if (st != NULL) {
     ttyLocker ttyl;
     // Print a little tag line that looks like +PrintCompilation output:
-    st->print("%3d%c  %s",
+    int tlen = (int) strlen(title);
+    bool do_nl = false;
+    if (tlen > 0 && title[tlen-1] == '\n') { tlen--; do_nl = true; }
+    st->print("%3d%c  %.*s",
               compile_id(),
               is_osr_method() ? '%' :
               method() != NULL &&
               is_native_method() ? 'n' : ' ',
-              title);
+              tlen, title);
 #ifdef TIERED
     st->print(" (%d) ", comp_level());
 #endif // TIERED
     if (WizardMode) st->print(" (" INTPTR_FORMAT ")", this);
-    if (method() != NULL) {
-      method()->print_short_name(st);
+    if (Universe::heap()->is_gc_active() && method() != NULL) {
+      st->print("(method)");
+    } else if (method() != NULL) {
+        method()->print_short_name(st);
       if (is_osr_method())
         st->print(" @ %d", osr_entry_bci());
       if (method()->code_size() > 0)
         st->print(" (%d bytes)", method()->code_size());
     }
+
+    if (do_nl)  st->cr();
   }
 }
 
@@ -1033,6 +1052,7 @@
   }
 }
 
+// This is a private interface with the sweeper.
 void nmethod::mark_as_seen_on_stack() {
   assert(is_not_entrant(), "must be a non-entrant method");
   set_stack_traversal_mark(NMethodSweeper::traversal_count());
@@ -1077,7 +1097,8 @@
                   " unloadable], methodOop(" INTPTR_FORMAT
                   "), cause(" INTPTR_FORMAT ")",
                   this, (address)_method, (address)cause);
-    cause->klass()->print();
+    if (!Universe::heap()->is_gc_active())
+      cause->klass()->print();
   }
   // Unlink the osr method, so we do not look this up again
   if (is_osr_method()) {
@@ -1109,7 +1130,8 @@
   // The methodOop is gone at this point
   assert(_method == NULL, "Tautology");
 
-  set_link(NULL);
+  set_osr_link(NULL);
+  //set_scavenge_root_link(NULL); // done by prune_scavenge_root_nmethods
   NMethodSweeper::notify(this);
 }
 
@@ -1295,6 +1317,10 @@
     ec = next;
   }
 
+  if (on_scavenge_root_list()) {
+    CodeCache::drop_scavenge_root_nmethod(this);
+  }
+
   ((CodeBlob*)(this))->flush();
 
   CodeCache::free(this);
@@ -1354,7 +1380,10 @@
       return false;
     }
   }
-  assert(unloading_occurred, "Inconsistency in unloading");
+  // If ScavengeRootsInCode is true, an nmethod might be unloaded
+  // simply because one of its constant oops has gone dead.
+  // No actual classes need to be unloaded in order for this to occur.
+  assert(unloading_occurred || ScavengeRootsInCode, "Inconsistency in unloading");
   make_unloaded(is_alive, obj);
   return true;
 }
@@ -1529,13 +1558,12 @@
 // the (strong) marking phase, and then again when walking
 // the code cache contents during the weak roots processing
 // phase. The two uses are distinguished by means of the
-// do_nmethods() method in the closure "f" below -- which
-// answers "yes" in the first case, and "no" in the second
+// 'do_strong_roots_only' flag, which is true in the first
 // case. We want to walk the weak roots in the nmethod
 // only in the second case. The weak roots in the nmethod
 // are the oops in the ExceptionCache and the InlineCache
 // oops.
-void nmethod::oops_do(OopClosure* f) {
+void nmethod::oops_do(OopClosure* f, bool do_strong_roots_only) {
   // make sure the oops ready to receive visitors
   assert(!is_zombie() && !is_unloaded(),
          "should not call follow on zombie or unloaded nmethod");
@@ -1553,7 +1581,7 @@
 
   // Compiled code
   f->do_oop((oop*) &_method);
-  if (!f->do_nmethods()) {
+  if (!do_strong_roots_only) {
     // weak roots processing phase -- update ExceptionCache oops
     ExceptionCache* ec = exception_cache();
     while(ec != NULL) {
@@ -1579,12 +1607,108 @@
   }
 
   // Scopes
+  // This includes oop constants not inlined in the code stream.
   for (oop* p = oops_begin(); p < oops_end(); p++) {
     if (*p == Universe::non_oop_word())  continue;  // skip non-oops
     f->do_oop(p);
   }
 }
 
+#define NMETHOD_SENTINEL ((nmethod*)badAddress)
+
+nmethod* volatile nmethod::_oops_do_mark_nmethods;
+
+// An nmethod is "marked" if its _mark_link is set non-null.
+// Even if it is the end of the linked list, it will have a non-null link value,
+// as long as it is on the list.
+// This code must be MP safe, because it is used from parallel GC passes.
+bool nmethod::test_set_oops_do_mark() {
+  assert(nmethod::oops_do_marking_is_active(), "oops_do_marking_prologue must be called");
+  nmethod* observed_mark_link = _oops_do_mark_link;
+  if (observed_mark_link == NULL) {
+    // Claim this nmethod for this thread to mark.
+    observed_mark_link = (nmethod*)
+      Atomic::cmpxchg_ptr(NMETHOD_SENTINEL, &_oops_do_mark_link, NULL);
+    if (observed_mark_link == NULL) {
+
+      // Atomically append this nmethod (now claimed) to the head of the list:
+      nmethod* observed_mark_nmethods = _oops_do_mark_nmethods;
+      for (;;) {
+        nmethod* required_mark_nmethods = observed_mark_nmethods;
+        _oops_do_mark_link = required_mark_nmethods;
+        observed_mark_nmethods = (nmethod*)
+          Atomic::cmpxchg_ptr(this, &_oops_do_mark_nmethods, required_mark_nmethods);
+        if (observed_mark_nmethods == required_mark_nmethods)
+          break;
+      }
+      // Mark was clear when we first saw this guy.
+      NOT_PRODUCT(if (TraceScavenge)  print_on(tty, "oops_do, mark\n"));
+      return false;
+    }
+  }
+  // On fall through, another racing thread marked this nmethod before we did.
+  return true;
+}
+
+void nmethod::oops_do_marking_prologue() {
+  NOT_PRODUCT(if (TraceScavenge)  tty->print_cr("[oops_do_marking_prologue"));
+  assert(_oops_do_mark_nmethods == NULL, "must not call oops_do_marking_prologue twice in a row");
+  // We use cmpxchg_ptr instead of regular assignment here because the user
+  // may fork a bunch of threads, and we need them all to see the same state.
+  void* observed = Atomic::cmpxchg_ptr(NMETHOD_SENTINEL, &_oops_do_mark_nmethods, NULL);
+  guarantee(observed == NULL, "no races in this sequential code");
+}
+
+void nmethod::oops_do_marking_epilogue() {
+  assert(_oops_do_mark_nmethods != NULL, "must not call oops_do_marking_epilogue twice in a row");
+  nmethod* cur = _oops_do_mark_nmethods;
+  while (cur != NMETHOD_SENTINEL) {
+    assert(cur != NULL, "not NULL-terminated");
+    nmethod* next = cur->_oops_do_mark_link;
+    cur->_oops_do_mark_link = NULL;
+    NOT_PRODUCT(if (TraceScavenge)  cur->print_on(tty, "oops_do, unmark\n"));
+    cur = next;
+  }
+  void* required = _oops_do_mark_nmethods;
+  void* observed = Atomic::cmpxchg_ptr(NULL, &_oops_do_mark_nmethods, required);
+  guarantee(observed == required, "no races in this sequential code");
+  NOT_PRODUCT(if (TraceScavenge)  tty->print_cr("oops_do_marking_epilogue]"));
+}
+
+class DetectScavengeRoot: public OopClosure {
+  bool     _detected_scavenge_root;
+public:
+  DetectScavengeRoot() : _detected_scavenge_root(false)
+  { NOT_PRODUCT(_print_nm = NULL); }
+  bool detected_scavenge_root() { return _detected_scavenge_root; }
+  virtual void do_oop(oop* p) {
+    if ((*p) != NULL && (*p)->is_scavengable()) {
+      NOT_PRODUCT(maybe_print(p));
+      _detected_scavenge_root = true;
+    }
+  }
+  virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
+
+#ifndef PRODUCT
+  nmethod* _print_nm;
+  void maybe_print(oop* p) {
+    if (_print_nm == NULL)  return;
+    if (!_detected_scavenge_root)  _print_nm->print_on(tty, "new scavenge root");
+    tty->print_cr(""PTR_FORMAT"[offset=%d] detected non-perm oop "PTR_FORMAT" (found at "PTR_FORMAT")",
+                  _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm),
+                  (intptr_t)(*p), (intptr_t)p);
+    (*p)->print();
+  }
+#endif //PRODUCT
+};
+
+bool nmethod::detect_scavenge_root_oops() {
+  DetectScavengeRoot detect_scavenge_root;
+  NOT_PRODUCT(if (TraceScavenge)  detect_scavenge_root._print_nm = this);
+  oops_do(&detect_scavenge_root);
+  return detect_scavenge_root.detected_scavenge_root();
+}
+
 // Method that knows how to preserve outgoing arguments at call. This method must be
 // called with a frame corresponding to a Java invoke
 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
@@ -1899,6 +2023,24 @@
 // -----------------------------------------------------------------------------
 // Verification
 
+class VerifyOopsClosure: public OopClosure {
+  nmethod* _nm;
+  bool     _ok;
+public:
+  VerifyOopsClosure(nmethod* nm) : _nm(nm), _ok(true) { }
+  bool ok() { return _ok; }
+  virtual void do_oop(oop* p) {
+    if ((*p) == NULL || (*p)->is_oop())  return;
+    if (_ok) {
+      _nm->print_nmethod(true);
+      _ok = false;
+    }
+    tty->print_cr("*** non-oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)",
+                  (intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
+  }
+  virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
+};
+
 void nmethod::verify() {
 
   // Hmm. OSR methods can be deopted but not marked as zombie or not_entrant
@@ -1932,6 +2074,11 @@
     }
   }
 
+  VerifyOopsClosure voc(this);
+  oops_do(&voc);
+  assert(voc.ok(), "embedded oops must be OK");
+  verify_scavenge_root_oops();
+
   verify_scopes();
 }
 
@@ -1995,19 +2142,34 @@
 // Non-product code
 #ifndef PRODUCT
 
-void nmethod::check_store() {
-  // Make sure all oops in the compiled code are tenured
+class DebugScavengeRoot: public OopClosure {
+  nmethod* _nm;
+  bool     _ok;
+public:
+  DebugScavengeRoot(nmethod* nm) : _nm(nm), _ok(true) { }
+  bool ok() { return _ok; }
+  virtual void do_oop(oop* p) {
+    if ((*p) == NULL || !(*p)->is_scavengable())  return;
+    if (_ok) {
+      _nm->print_nmethod(true);
+      _ok = false;
+    }
+    tty->print_cr("*** non-perm oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)",
+                  (intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
+    (*p)->print();
+  }
+  virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
+};
 
-  RelocIterator iter(this);
-  while (iter.next()) {
-    if (iter.type() == relocInfo::oop_type) {
-      oop_Relocation* reloc = iter.oop_reloc();
-      oop obj = reloc->oop_value();
-      if (obj != NULL && !obj->is_perm()) {
-        fatal("must be permanent oop in compiled code");
-      }
-    }
+void nmethod::verify_scavenge_root_oops() {
+  if (!on_scavenge_root_list()) {
+    // Actually look inside, to verify the claim that it's clean.
+    DebugScavengeRoot debug_scavenge_root(this);
+    oops_do(&debug_scavenge_root);
+    if (!debug_scavenge_root.ok())
+      fatal("found an unadvertised bad non-perm oop in the code cache");
   }
+  assert(scavenge_root_not_marked(), "");
 }
 
 #endif // PRODUCT
@@ -2040,6 +2202,7 @@
     if (is_not_entrant()) tty->print("not_entrant ");
     if (is_zombie())      tty->print("zombie ");
     if (is_unloaded())    tty->print("unloaded ");
+    if (on_scavenge_root_list())  tty->print("scavenge_root ");
     tty->print_cr("}:");
   }
   if (size              () > 0) tty->print_cr(" total in heap  [" INTPTR_FORMAT "," INTPTR_FORMAT "] = %d",
--- a/hotspot/src/share/vm/code/nmethod.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -125,6 +125,7 @@
 class nmethod : public CodeBlob {
   friend class VMStructs;
   friend class NMethodSweeper;
+  friend class CodeCache;  // non-perm oops
  private:
   // Shared fields for all nmethod's
   static int _zombie_instruction_size;
@@ -132,7 +133,12 @@
   methodOop _method;
   int       _entry_bci;        // != InvocationEntryBci if this nmethod is an on-stack replacement method
 
-  nmethod*  _link;             // To support simple linked-list chaining of nmethods
+  // To support simple linked-list chaining of nmethods:
+  nmethod*  _osr_link;         // from instanceKlass::osr_nmethods_head
+  nmethod*  _scavenge_root_link; // from CodeCache::scavenge_root_nmethods
+
+  static nmethod* volatile _oops_do_mark_nmethods;
+  nmethod*        volatile _oops_do_mark_link;
 
   AbstractCompiler* _compiler; // The compiler which compiled this nmethod
 
@@ -174,6 +180,8 @@
   // used by jvmti to track if an unload event has been posted for this nmethod.
   bool _unload_reported;
 
+  jbyte _scavenge_root_state;
+
   NOT_PRODUCT(bool _has_debug_info; )
 
   // Nmethod Flushing lock (if non-zero, then the nmethod is not removed)
@@ -242,7 +250,6 @@
 
   // helper methods
   void* operator new(size_t size, int nmethod_size);
-  void check_store();
 
   const char* reloc_string_for(u_char* begin, u_char* end);
   void make_not_entrant_or_zombie(int state);
@@ -406,6 +413,24 @@
   int   version() const                           { return flags.version; }
   void  set_version(int v);
 
+  // Non-perm oop support
+  bool  on_scavenge_root_list() const                  { return (_scavenge_root_state & 1) != 0; }
+ protected:
+  enum { npl_on_list = 0x01, npl_marked = 0x10 };
+  void  set_on_scavenge_root_list()                    { _scavenge_root_state = npl_on_list; }
+  void  clear_on_scavenge_root_list()                  { _scavenge_root_state = 0; }
+  // assertion-checking and pruning logic uses the bits of _scavenge_root_state
+#ifndef PRODUCT
+  void  set_scavenge_root_marked()                     { _scavenge_root_state |= npl_marked; }
+  void  clear_scavenge_root_marked()                   { _scavenge_root_state &= ~npl_marked; }
+  bool  scavenge_root_not_marked()                     { return (_scavenge_root_state &~ npl_on_list) == 0; }
+  // N.B. there is no positive marked query, and we only use the not_marked query for asserts.
+#endif //PRODUCT
+  nmethod* scavenge_root_link() const                  { return _scavenge_root_link; }
+  void     set_scavenge_root_link(nmethod *n)          { _scavenge_root_link = n; }
+
+ public:
+
   // Sweeper support
   long  stack_traversal_mark()                    { return _stack_traversal_mark; }
   void  set_stack_traversal_mark(long l)          { _stack_traversal_mark = l; }
@@ -424,8 +449,8 @@
   int   osr_entry_bci() const                     { assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod"); return _entry_bci; }
   address  osr_entry() const                      { assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod"); return _osr_entry_point; }
   void  invalidate_osr_method();
-  nmethod* link() const                           { return _link; }
-  void     set_link(nmethod *n)                   { _link = n; }
+  nmethod* osr_link() const                       { return _osr_link; }
+  void     set_osr_link(nmethod *n)               { _osr_link = n; }
 
   // tells whether frames described by this nmethod can be deoptimized
   // note: native wrappers cannot be deoptimized.
@@ -465,7 +490,16 @@
 
   void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map,
                                      OopClosure* f);
-  void oops_do(OopClosure* f);
+  virtual void oops_do(OopClosure* f) { oops_do(f, false); }
+  void         oops_do(OopClosure* f, bool do_strong_roots_only);
+  bool detect_scavenge_root_oops();
+  void verify_scavenge_root_oops() PRODUCT_RETURN;
+
+  bool test_set_oops_do_mark();
+  static void oops_do_marking_prologue();
+  static void oops_do_marking_epilogue();
+  static bool oops_do_marking_is_active() { return _oops_do_mark_nmethods != NULL; }
+  DEBUG_ONLY(bool test_oops_do_mark() { return _oops_do_mark_link != NULL; })
 
   // ScopeDesc for an instruction
   ScopeDesc* scope_desc_at(address pc);
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -47,20 +47,15 @@
  private:
   const MemRegion _span;
   CMSBitMap*      _bitMap;
-  const bool      _should_do_nmethods;
  protected:
   DO_OOP_WORK_DEFN
  public:
-  MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap,
-                      bool should_do_nmethods);
+  MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
   virtual void do_oop(oop* p);
   virtual void do_oop(narrowOop* p);
   inline void do_oop_nv(oop* p)       { MarkRefsIntoClosure::do_oop_work(p); }
   inline void do_oop_nv(narrowOop* p) { MarkRefsIntoClosure::do_oop_work(p); }
   bool do_header() { return true; }
-  virtual const bool do_nmethods() const {
-    return _should_do_nmethods;
-  }
   Prefetch::style prefetch_style() {
     return Prefetch::do_read;
   }
@@ -73,20 +68,16 @@
   const MemRegion _span;
   CMSBitMap*      _verification_bm;
   CMSBitMap*      _cms_bm;
-  const bool      _should_do_nmethods;
  protected:
   DO_OOP_WORK_DEFN
  public:
   MarkRefsIntoVerifyClosure(MemRegion span, CMSBitMap* verification_bm,
-                            CMSBitMap* cms_bm, bool should_do_nmethods);
+                            CMSBitMap* cms_bm);
   virtual void do_oop(oop* p);
   virtual void do_oop(narrowOop* p);
   inline void do_oop_nv(oop* p)       { MarkRefsIntoVerifyClosure::do_oop_work(p); }
   inline void do_oop_nv(narrowOop* p) { MarkRefsIntoVerifyClosure::do_oop_work(p); }
   bool do_header() { return true; }
-  virtual const bool do_nmethods() const {
-    return _should_do_nmethods;
-  }
   Prefetch::style prefetch_style() {
     return Prefetch::do_read;
   }
@@ -228,7 +219,6 @@
   inline void do_oop_nv(oop* p)       { MarkRefsIntoAndScanClosure::do_oop_work(p); }
   inline void do_oop_nv(narrowOop* p) { MarkRefsIntoAndScanClosure::do_oop_work(p); }
   bool do_header() { return true; }
-  virtual const bool do_nmethods() const { return true; }
   Prefetch::style prefetch_style() {
     return Prefetch::do_read;
   }
@@ -273,7 +263,6 @@
   inline void do_oop_nv(oop* p)       { Par_MarkRefsIntoAndScanClosure::do_oop_work(p); }
   inline void do_oop_nv(narrowOop* p) { Par_MarkRefsIntoAndScanClosure::do_oop_work(p); }
   bool do_header() { return true; }
-  virtual const bool do_nmethods() const { return true; }
   // When ScanMarkedObjectsAgainClosure is used,
   // it passes [Par_]MarkRefsIntoAndScanClosure to oop_oop_iterate(),
   // and this delegation is used.
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2852,14 +2852,17 @@
   GenCollectedHeap* gch = GenCollectedHeap::heap();
 
   // Mark from roots one level into CMS
-  MarkRefsIntoClosure notOlder(_span, verification_mark_bm(), true /* nmethods */);
+  MarkRefsIntoClosure notOlder(_span, verification_mark_bm());
   gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
 
   gch->gen_process_strong_roots(_cmsGen->level(),
                                 true,   // younger gens are roots
+                                true,   // activate StrongRootsScope
                                 true,   // collecting perm gen
                                 SharedHeap::ScanningOption(roots_scanning_options()),
-                                NULL, &notOlder);
+                                &notOlder,
+                                true,   // walk code active on stacks
+                                NULL);
 
   // Now mark from the roots
   assert(_revisitStack.isEmpty(), "Should be empty");
@@ -2901,13 +2904,16 @@
 
   // Mark from roots one level into CMS
   MarkRefsIntoVerifyClosure notOlder(_span, verification_mark_bm(),
-                                     markBitMap(), true /* nmethods */);
+                                     markBitMap());
   gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
   gch->gen_process_strong_roots(_cmsGen->level(),
                                 true,   // younger gens are roots
+                                true,   // activate StrongRootsScope
                                 true,   // collecting perm gen
                                 SharedHeap::ScanningOption(roots_scanning_options()),
-                                NULL, &notOlder);
+                                &notOlder,
+                                true,   // walk code active on stacks
+                                NULL);
 
   // Now mark from the roots
   assert(_revisitStack.isEmpty(), "Should be empty");
@@ -3484,8 +3490,10 @@
   FalseClosure falseClosure;
   // In the case of a synchronous collection, we will elide the
   // remark step, so it's important to catch all the nmethod oops
-  // in this step; hence the last argument to the constrcutor below.
-  MarkRefsIntoClosure notOlder(_span, &_markBitMap, !asynch /* nmethods */);
+  // in this step.
+  // The final 'true' flag to gen_process_strong_roots will ensure this.
+  // If 'async' is true, we can relax the nmethod tracing.
+  MarkRefsIntoClosure notOlder(_span, &_markBitMap);
   GenCollectedHeap* gch = GenCollectedHeap::heap();
 
   verify_work_stacks_empty();
@@ -3504,9 +3512,12 @@
     gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
     gch->gen_process_strong_roots(_cmsGen->level(),
                                   true,   // younger gens are roots
+                                  true,   // activate StrongRootsScope
                                   true,   // collecting perm gen
                                   SharedHeap::ScanningOption(roots_scanning_options()),
-                                  NULL, &notOlder);
+                                  &notOlder,
+                                  true,   // walk all of code cache if (so & SO_CodeCache)
+                                  NULL);
   }
 
   // Clear mod-union table; it will be dirtied in the prologue of
@@ -5040,9 +5051,15 @@
   _timer.start();
   gch->gen_process_strong_roots(_collector->_cmsGen->level(),
                                 false,     // yg was scanned above
+                                false,     // this is parallel code
                                 true,      // collecting perm gen
                                 SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
-                                NULL, &par_mrias_cl);
+                                &par_mrias_cl,
+                                true,   // walk all of code cache if (so & SO_CodeCache)
+                                NULL);
+  assert(_collector->should_unload_classes()
+         || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache),
+         "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
   _timer.stop();
   if (PrintCMSStatistics != 0) {
     gclog_or_tty->print_cr(
@@ -5423,7 +5440,6 @@
 
   // Set up for parallel process_strong_roots work.
   gch->set_par_threads(n_workers);
-  gch->change_strong_roots_parity();
   // We won't be iterating over the cards in the card table updating
   // the younger_gen cards, so we shouldn't call the following else
   // the verification code as well as subsequent younger_refs_iterate
@@ -5454,8 +5470,10 @@
   if (n_workers > 1) {
     // Make refs discovery MT-safe
     ReferenceProcessorMTMutator mt(ref_processor(), true);
+    GenCollectedHeap::StrongRootsScope srs(gch);
     workers->run_task(&tsk);
   } else {
+    GenCollectedHeap::StrongRootsScope srs(gch);
     tsk.work(0);
   }
   gch->set_par_threads(0);  // 0 ==> non-parallel.
@@ -5539,11 +5557,18 @@
     verify_work_stacks_empty();
 
     gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
+    GenCollectedHeap::StrongRootsScope srs(gch);
     gch->gen_process_strong_roots(_cmsGen->level(),
                                   true,  // younger gens as roots
+                                  false, // use the local StrongRootsScope
                                   true,  // collecting perm gen
                                   SharedHeap::ScanningOption(roots_scanning_options()),
-                                  NULL, &mrias_cl);
+                                  &mrias_cl,
+                                  true,   // walk code active on stacks
+                                  NULL);
+    assert(should_unload_classes()
+           || (roots_scanning_options() & SharedHeap::SO_CodeCache),
+           "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
   }
   verify_work_stacks_empty();
   // Restore evacuated mark words, if any, used for overflow list links
@@ -6418,10 +6443,9 @@
 // generation then this will lose younger_gen cards!
 
 MarkRefsIntoClosure::MarkRefsIntoClosure(
-  MemRegion span, CMSBitMap* bitMap, bool should_do_nmethods):
+  MemRegion span, CMSBitMap* bitMap):
     _span(span),
-    _bitMap(bitMap),
-    _should_do_nmethods(should_do_nmethods)
+    _bitMap(bitMap)
 {
     assert(_ref_processor == NULL, "deliberately left NULL");
     assert(_bitMap->covers(_span), "_bitMap/_span mismatch");
@@ -6442,12 +6466,11 @@
 
 // A variant of the above, used for CMS marking verification.
 MarkRefsIntoVerifyClosure::MarkRefsIntoVerifyClosure(
-  MemRegion span, CMSBitMap* verification_bm, CMSBitMap* cms_bm,
-  bool should_do_nmethods):
+  MemRegion span, CMSBitMap* verification_bm, CMSBitMap* cms_bm):
     _span(span),
     _verification_bm(verification_bm),
-    _cms_bm(cms_bm),
-    _should_do_nmethods(should_do_nmethods) {
+    _cms_bm(cms_bm)
+{
     assert(_ref_processor == NULL, "deliberately left NULL");
     assert(_verification_bm->covers(_span), "_verification_bm/_span mismatch");
 }
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -746,10 +746,11 @@
   // clear the mark bitmap (no grey objects to start with)
   _nextMarkBitMap->clearAll();
   PrintReachableClosure prcl(_nextMarkBitMap);
-  g1h->process_strong_roots(
+  g1h->process_strong_roots(true,    // activate StrongRootsScope
                             false,   // fake perm gen collection
                             SharedHeap::SO_AllClasses,
                             &prcl, // Regular roots
+                            NULL,  // do not visit active blobs
                             &prcl    // Perm Gen Roots
                             );
   // The root iteration above "consumed" dirty cards in the perm gen.
@@ -852,9 +853,11 @@
   g1h->set_marking_started();
   g1h->rem_set()->prepare_for_younger_refs_iterate(false);
 
-  g1h->process_strong_roots(false,   // fake perm gen collection
+  g1h->process_strong_roots(true,    // activate StrongRootsScope
+                            false,   // fake perm gen collection
                             SharedHeap::SO_AllClasses,
                             &notOlder, // Regular roots
+                            NULL,     // do not visit active blobs
                             &older    // Perm Gen Roots
                             );
   checkpointRootsInitialPost();
@@ -1915,7 +1918,7 @@
   g1h->ensure_parsability(false);
 
   if (ParallelGCThreads > 0) {
-    g1h->change_strong_roots_parity();
+    G1CollectedHeap::StrongRootsScope srs(g1h);
     // this is remark, so we'll use up all available threads
     int active_workers = ParallelGCThreads;
     set_phase(active_workers, false);
@@ -1932,7 +1935,7 @@
     SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
     guarantee( satb_mq_set.completed_buffers_num() == 0, "invariant" );
   } else {
-    g1h->change_strong_roots_parity();
+    G1CollectedHeap::StrongRootsScope srs(g1h);
     // this is remark, so we'll use up all available threads
     int active_workers = 1;
     set_phase(active_workers, false);
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2300,9 +2300,12 @@
   if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) {
     if (!silent) { gclog_or_tty->print("roots "); }
     VerifyRootsClosure rootsCl(use_prev_marking);
-    process_strong_roots(false,
+    CodeBlobToOopClosure blobsCl(&rootsCl, /*do_marking=*/ false);
+    process_strong_roots(true,  // activate StrongRootsScope
+                         false,
                          SharedHeap::SO_AllClasses,
                          &rootsCl,
+                         &blobsCl,
                          &rootsCl);
     rem_set()->invalidate(perm_gen()->used_region(), false);
     if (!silent) { gclog_or_tty->print("heapRegions "); }
@@ -3987,8 +3990,14 @@
   BufferingOopsInGenClosure buf_scan_perm(scan_perm);
   buf_scan_perm.set_generation(perm_gen());
 
-  process_strong_roots(collecting_perm_gen, so,
+  // Walk the code cache w/o buffering, because StarTask cannot handle
+  // unaligned oop locations.
+  CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, /*do_marking=*/ true);
+
+  process_strong_roots(false, // no scoping; this is parallel code
+                       collecting_perm_gen, so,
                        &buf_scan_non_heap_roots,
+                       &eager_scan_code_roots,
                        &buf_scan_perm);
   // Finish up any enqueued closure apps.
   buf_scan_non_heap_roots.done();
@@ -4078,7 +4087,8 @@
 void
 G1CollectedHeap::g1_process_weak_roots(OopClosure* root_closure,
                                        OopClosure* non_root_closure) {
-  SharedHeap::process_weak_roots(root_closure, non_root_closure);
+  CodeBlobToOopClosure roots_in_blobs(root_closure, /*do_marking=*/ false);
+  SharedHeap::process_weak_roots(root_closure, &roots_in_blobs, non_root_closure);
 }
 
 
@@ -4112,15 +4122,16 @@
 
   init_for_evac_failure(NULL);
 
-  change_strong_roots_parity();  // In preparation for parallel strong roots.
   rem_set()->prepare_for_younger_refs_iterate(true);
 
   assert(dirty_card_queue_set().completed_buffers_num() == 0, "Should be empty");
   double start_par = os::elapsedTime();
   if (ParallelGCThreads > 0) {
     // The individual threads will set their evac-failure closures.
+    StrongRootsScope srs(this);
     workers()->run_task(&g1_par_task);
   } else {
+    StrongRootsScope srs(this);
     g1_par_task.work(0);
   }
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -121,9 +121,11 @@
 
   SharedHeap* sh = SharedHeap::heap();
 
-  sh->process_strong_roots(true,  // Collecting permanent generation.
+  sh->process_strong_roots(true,  // activeate StrongRootsScope
+                           true,  // Collecting permanent generation.
                            SharedHeap::SO_SystemClasses,
                            &GenMarkSweep::follow_root_closure,
+                           &GenMarkSweep::follow_code_root_closure,
                            &GenMarkSweep::follow_root_closure);
 
   // Process reference objects found during marking
@@ -286,9 +288,11 @@
 
   SharedHeap* sh = SharedHeap::heap();
 
-  sh->process_strong_roots(true,  // Collecting permanent generation.
+  sh->process_strong_roots(true,  // activate StrongRootsScope
+                           true,  // Collecting permanent generation.
                            SharedHeap::SO_AllClasses,
                            &GenMarkSweep::adjust_root_pointer_closure,
+                           NULL,  // do not touch code cache here
                            &GenMarkSweep::adjust_pointer_closure);
 
   g1h->ref_processor()->weak_oops_do(&GenMarkSweep::adjust_root_pointer_closure);
--- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	Wed Jul 05 17:01:52 2017 +0200
@@ -373,6 +373,7 @@
 psScavenge.inline.hpp                   psPromotionManager.hpp
 psScavenge.inline.hpp                   psScavenge.hpp
 
+pcTasks.cpp                             codeCache.hpp
 pcTasks.cpp                             collectedHeap.hpp
 pcTasks.cpp                             fprofiler.hpp
 pcTasks.cpp                             jniHandles.hpp
@@ -392,6 +393,7 @@
 pcTasks.hpp				psTasks.hpp
 
 psTasks.cpp                             cardTableExtension.hpp
+psTasks.cpp                             codeCache.hpp
 psTasks.cpp                             fprofiler.hpp
 psTasks.cpp                             gcTaskManager.hpp
 psTasks.cpp                             iterator.hpp
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -480,12 +480,14 @@
 
   par_scan_state.start_strong_roots();
   gch->gen_process_strong_roots(_gen->level(),
-                                true, // Process younger gens, if any,
-                                      // as strong roots.
-                                false,// not collecting perm generation.
+                                true,  // Process younger gens, if any,
+                                       // as strong roots.
+                                false, // no scope; this is parallel code
+                                false, // not collecting perm generation.
                                 SharedHeap::SO_AllClasses,
-                                &par_scan_state.older_gen_closure(),
-                                &par_scan_state.to_space_root_closure());
+                                &par_scan_state.to_space_root_closure(),
+                                true,   // walk *all* scavengable nmethods
+                                &par_scan_state.older_gen_closure());
   par_scan_state.end_strong_roots();
 
   // "evacuate followers".
@@ -799,15 +801,16 @@
   ParNewGenTask tsk(this, _next_gen, reserved().end(), &thread_state_set);
   int n_workers = workers->total_workers();
   gch->set_par_threads(n_workers);
-  gch->change_strong_roots_parity();
   gch->rem_set()->prepare_for_younger_refs_iterate(true);
   // It turns out that even when we're using 1 thread, doing the work in a
   // separate thread causes wide variance in run times.  We can't help this
   // in the multi-threaded case, but we special-case n=1 here to get
   // repeatable measurements of the 1-thread overhead of the parallel code.
   if (n_workers > 1) {
+    GenCollectedHeap::StrongRootsScope srs(gch);
     workers->run_task(&tsk);
   } else {
+    GenCollectedHeap::StrongRootsScope srs(gch);
     tsk.work(0);
   }
   thread_state_set.reset();
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -962,6 +962,14 @@
   _old_gen->resize(desired_free_space);
 }
 
+ParallelScavengeHeap::ParStrongRootsScope::ParStrongRootsScope() {
+  // nothing particular
+}
+
+ParallelScavengeHeap::ParStrongRootsScope::~ParStrongRootsScope() {
+  // nothing particular
+}
+
 #ifndef PRODUCT
 void ParallelScavengeHeap::record_gen_tops_before_GC() {
   if (ZapUnusedHeapArea) {
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -234,6 +234,13 @@
 
   // Mangle the unused parts of all spaces in the heap
   void gen_mangle_unused_area() PRODUCT_RETURN;
+
+  // Call these in sequential code around the processing of strong roots.
+  class ParStrongRootsScope : public MarkingCodeBlobClosure::MarkScope {
+  public:
+    ParStrongRootsScope();
+    ~ParStrongRootsScope();
+  };
 };
 
 inline size_t ParallelScavengeHeap::set_alignment(size_t& var, size_t val)
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,12 +39,13 @@
   ParCompactionManager* cm =
     ParCompactionManager::gc_thread_compaction_manager(which);
   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
+  CodeBlobToOopClosure mark_and_push_in_blobs(&mark_and_push_closure, /*do_marking=*/ true);
 
   if (_java_thread != NULL)
-    _java_thread->oops_do(&mark_and_push_closure);
+    _java_thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
 
   if (_vm_thread != NULL)
-    _vm_thread->oops_do(&mark_and_push_closure);
+    _vm_thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
 
   // Do the real work
   cm->drain_marking_stacks(&mark_and_push_closure);
@@ -78,7 +79,8 @@
     case threads:
     {
       ResourceMark rm;
-      Threads::oops_do(&mark_and_push_closure);
+      CodeBlobToOopClosure each_active_code_blob(&mark_and_push_closure, /*do_marking=*/ true);
+      Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
     }
     break;
 
@@ -106,6 +108,11 @@
       vmSymbols::oops_do(&mark_and_push_closure);
       break;
 
+    case code_cache:
+      // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
+      //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));
+      break;
+
     default:
       fatal("Unknown root type");
   }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -92,7 +92,8 @@
     jvmti                 = 7,
     system_dictionary     = 8,
     vm_symbols            = 9,
-    reference_processing  = 10
+    reference_processing  = 10,
+    code_cache            = 11
   };
  private:
   RootType _root_type;
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -511,16 +511,22 @@
   assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
 
   // General strong roots.
-  Universe::oops_do(mark_and_push_closure());
-  ReferenceProcessor::oops_do(mark_and_push_closure());
-  JNIHandles::oops_do(mark_and_push_closure());   // Global (strong) JNI handles
-  Threads::oops_do(mark_and_push_closure());
-  ObjectSynchronizer::oops_do(mark_and_push_closure());
-  FlatProfiler::oops_do(mark_and_push_closure());
-  Management::oops_do(mark_and_push_closure());
-  JvmtiExport::oops_do(mark_and_push_closure());
-  SystemDictionary::always_strong_oops_do(mark_and_push_closure());
-  vmSymbols::oops_do(mark_and_push_closure());
+  {
+    ParallelScavengeHeap::ParStrongRootsScope psrs;
+    Universe::oops_do(mark_and_push_closure());
+    ReferenceProcessor::oops_do(mark_and_push_closure());
+    JNIHandles::oops_do(mark_and_push_closure());   // Global (strong) JNI handles
+    CodeBlobToOopClosure each_active_code_blob(mark_and_push_closure(), /*do_marking=*/ true);
+    Threads::oops_do(mark_and_push_closure(), &each_active_code_blob);
+    ObjectSynchronizer::oops_do(mark_and_push_closure());
+    FlatProfiler::oops_do(mark_and_push_closure());
+    Management::oops_do(mark_and_push_closure());
+    JvmtiExport::oops_do(mark_and_push_closure());
+    SystemDictionary::always_strong_oops_do(mark_and_push_closure());
+    vmSymbols::oops_do(mark_and_push_closure());
+    // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
+    //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure()));
+  }
 
   // Flush marking stack.
   follow_stack();
@@ -617,7 +623,7 @@
   Universe::oops_do(adjust_root_pointer_closure());
   ReferenceProcessor::oops_do(adjust_root_pointer_closure());
   JNIHandles::oops_do(adjust_root_pointer_closure());   // Global (strong) JNI handles
-  Threads::oops_do(adjust_root_pointer_closure());
+  Threads::oops_do(adjust_root_pointer_closure(), NULL);
   ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
   FlatProfiler::oops_do(adjust_root_pointer_closure());
   Management::oops_do(adjust_root_pointer_closure());
@@ -625,6 +631,7 @@
   // SO_AllClasses
   SystemDictionary::oops_do(adjust_root_pointer_closure());
   vmSymbols::oops_do(adjust_root_pointer_closure());
+  //CodeCache::scavenge_root_nmethods_oops_do(adjust_root_pointer_closure());
 
   // Now adjust pointers in remaining weak roots.  (All of which should
   // have been cleared if they pointed to non-surviving objects.)
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2322,6 +2322,7 @@
 
   {
     TraceTime tm_m("par mark", print_phases(), true, gclog_or_tty);
+    ParallelScavengeHeap::ParStrongRootsScope psrs;
 
     GCTaskQueue* q = GCTaskQueue::create();
 
@@ -2335,6 +2336,7 @@
     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary));
     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti));
     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::vm_symbols));
+    q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache));
 
     if (parallel_gc_threads > 1) {
       for (uint j = 0; j < parallel_gc_threads; j++) {
@@ -2408,7 +2410,7 @@
   Universe::oops_do(adjust_root_pointer_closure());
   ReferenceProcessor::oops_do(adjust_root_pointer_closure());
   JNIHandles::oops_do(adjust_root_pointer_closure());   // Global (strong) JNI handles
-  Threads::oops_do(adjust_root_pointer_closure());
+  Threads::oops_do(adjust_root_pointer_closure(), NULL);
   ObjectSynchronizer::oops_do(adjust_root_pointer_closure());
   FlatProfiler::oops_do(adjust_root_pointer_closure());
   Management::oops_do(adjust_root_pointer_closure());
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -799,8 +799,7 @@
     FollowRootClosure(ParCompactionManager* cm) : _compaction_manager(cm) { }
     virtual void do_oop(oop* p);
     virtual void do_oop(narrowOop* p);
-    virtual const bool do_nmethods() const { return true; }
-  };
+ };
 
   class FollowStackClosure: public VoidClosure {
    private:
@@ -817,6 +816,8 @@
     AdjustPointerClosure(bool is_root) : _is_root(is_root) { }
     virtual void do_oop(oop* p);
     virtual void do_oop(narrowOop* p);
+    // do not walk from thread stacks to the code cache on this phase
+    virtual void do_code_blob(CodeBlob* cb) const { }
   };
 
   // Closure for verifying update of pointers.  Does not
@@ -1063,7 +1064,6 @@
     MarkAndPushClosure(ParCompactionManager* cm) : _compaction_manager(cm) { }
     virtual void do_oop(oop* p);
     virtual void do_oop(narrowOop* p);
-    virtual const bool do_nmethods() const { return true; }
   };
 
   PSParallelCompact();
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -358,6 +358,7 @@
     PSPromotionManager* promotion_manager = PSPromotionManager::vm_thread_promotion_manager();
     {
       // TraceTime("Roots");
+      ParallelScavengeHeap::ParStrongRootsScope psrs;
 
       GCTaskQueue* q = GCTaskQueue::create();
 
@@ -376,6 +377,7 @@
       q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::management));
       q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::system_dictionary));
       q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jvmti));
+      q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::code_cache));
 
       ParallelTaskTerminator terminator(
         gc_task_manager()->workers(),
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -66,7 +66,7 @@
     case threads:
     {
       ResourceMark rm;
-      Threads::oops_do(&roots_closure);
+      Threads::oops_do(&roots_closure, NULL);
     }
     break;
 
@@ -90,6 +90,14 @@
       JvmtiExport::oops_do(&roots_closure);
       break;
 
+
+    case code_cache:
+      {
+        CodeBlobToOopClosure each_scavengable_code_blob(&roots_closure, /*do_marking=*/ true);
+        CodeCache::scavenge_root_nmethods_do(&each_scavengable_code_blob);
+      }
+      break;
+
     default:
       fatal("Unknown root type");
   }
@@ -107,12 +115,13 @@
 
   PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which);
   PSScavengeRootsClosure roots_closure(pm);
+  CodeBlobToOopClosure roots_in_blobs(&roots_closure, /*do_marking=*/ true);
 
   if (_java_thread != NULL)
-    _java_thread->oops_do(&roots_closure);
+    _java_thread->oops_do(&roots_closure, &roots_in_blobs);
 
   if (_vm_thread != NULL)
-    _vm_thread->oops_do(&roots_closure);
+    _vm_thread->oops_do(&roots_closure, &roots_in_blobs);
 
   // Do the real work
   pm->drain_stacks(false);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -54,7 +54,8 @@
     flat_profiler         = 5,
     system_dictionary     = 6,
     management            = 7,
-    jvmti                 = 8
+    jvmti                 = 8,
+    code_cache            = 9
   };
  private:
   RootType _root_type;
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -93,6 +93,7 @@
 }
 
 MarkSweep::FollowRootClosure  MarkSweep::follow_root_closure;
+CodeBlobToOopClosure MarkSweep::follow_code_root_closure(&MarkSweep::follow_root_closure, /*do_marking=*/ true);
 
 void MarkSweep::FollowRootClosure::do_oop(oop* p)       { follow_root(p); }
 void MarkSweep::FollowRootClosure::do_oop(narrowOop* p) { follow_root(p); }
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -58,14 +58,12 @@
    public:
     virtual void do_oop(oop* p);
     virtual void do_oop(narrowOop* p);
-    virtual const bool do_nmethods() const { return true; }
   };
 
   class MarkAndPushClosure: public OopClosure {
    public:
     virtual void do_oop(oop* p);
     virtual void do_oop(narrowOop* p);
-    virtual const bool do_nmethods() const { return true; }
     virtual const bool should_remember_mdo() const { return true; }
     virtual void remember_mdo(DataLayout* p) { MarkSweep::revisit_mdo(p); }
   };
@@ -173,6 +171,7 @@
  public:
   // Public closures
   static FollowRootClosure    follow_root_closure;
+  static CodeBlobToOopClosure follow_code_root_closure; // => follow_root_closure
   static MarkAndPushClosure   mark_and_push_closure;
   static FollowStackClosure   follow_stack_closure;
   static AdjustPointerClosure adjust_root_pointer_closure;
--- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -263,6 +263,14 @@
     return p == NULL || is_permanent(p);
   }
 
+  // An object is scavengable if its location may move during a scavenge.
+  // (A scavenge is a GC which is not a full GC.)
+  // Currently, this just means it is not perm (and not null).
+  // This could change if we rethink what's in perm-gen.
+  bool is_scavengable(const void *p) const {
+    return !is_in_permanent_or_null(p);
+  }
+
   // Returns "TRUE" if "p" is a method oop in the
   // current heap, with high probability. This predicate
   // is not stable, in general.
--- a/hotspot/src/share/vm/memory/defNewGeneration.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -555,12 +555,14 @@
          "save marks have not been newly set.");
 
   gch->gen_process_strong_roots(_level,
-                                true, // Process younger gens, if any, as
-                                      // strong roots.
-                                false,// not collecting permanent generation.
+                                true,  // Process younger gens, if any,
+                                       // as strong roots.
+                                true,  // activate StrongRootsScope
+                                false, // not collecting perm generation.
                                 SharedHeap::SO_AllClasses,
-                                &fsc_with_gc_barrier,
-                                &fsc_with_no_gc_barrier);
+                                &fsc_with_no_gc_barrier,
+                                true,   // walk *all* scavengable nmethods
+                                &fsc_with_gc_barrier);
 
   // "evacuate followers".
   evacuate_followers.do_void();
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -677,13 +677,23 @@
 void GenCollectedHeap::
 gen_process_strong_roots(int level,
                          bool younger_gens_as_roots,
+                         bool activate_scope,
                          bool collecting_perm_gen,
                          SharedHeap::ScanningOption so,
-                         OopsInGenClosure* older_gens,
-                         OopsInGenClosure* not_older_gens) {
+                         OopsInGenClosure* not_older_gens,
+                         bool do_code_roots,
+                         OopsInGenClosure* older_gens) {
   // General strong roots.
-  SharedHeap::process_strong_roots(collecting_perm_gen, so,
-                                   not_older_gens, older_gens);
+
+  if (!do_code_roots) {
+    SharedHeap::process_strong_roots(activate_scope, collecting_perm_gen, so,
+                                     not_older_gens, NULL, older_gens);
+  } else {
+    bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active());
+    CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking);
+    SharedHeap::process_strong_roots(activate_scope, collecting_perm_gen, so,
+                                     not_older_gens, &code_roots, older_gens);
+  }
 
   if (younger_gens_as_roots) {
     if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
@@ -706,8 +716,9 @@
 }
 
 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure,
+                                              CodeBlobClosure* code_roots,
                                               OopClosure* non_root_closure) {
-  SharedHeap::process_weak_roots(root_closure, non_root_closure);
+  SharedHeap::process_weak_roots(root_closure, code_roots, non_root_closure);
   // "Local" "weak" refs
   for (int i = 0; i < _n_gens; i++) {
     _gens[i]->ref_processor()->weak_oops_do(root_closure);
--- a/hotspot/src/share/vm/memory/genCollectedHeap.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -408,16 +408,22 @@
   // "SO_SystemClasses" to all the "system" classes and loaders;
   // "SO_Symbols_and_Strings" applies the closure to all entries in
   // SymbolsTable and StringTable.
-  void gen_process_strong_roots(int level, bool younger_gens_as_roots,
+  void gen_process_strong_roots(int level,
+                                bool younger_gens_as_roots,
+                                // The remaining arguments are in an order
+                                // consistent with SharedHeap::process_strong_roots:
+                                bool activate_scope,
                                 bool collecting_perm_gen,
                                 SharedHeap::ScanningOption so,
-                                OopsInGenClosure* older_gens,
-                                OopsInGenClosure* not_older_gens);
+                                OopsInGenClosure* not_older_gens,
+                                bool do_code_roots,
+                                OopsInGenClosure* older_gens);
 
   // Apply "blk" to all the weak roots of the system.  These include
   // JNI weak roots, the code cache, system dictionary, symbol table,
   // string table, and referents of reachable weak refs.
   void gen_process_weak_roots(OopClosure* root_closure,
+                              CodeBlobClosure* code_roots,
                               OopClosure* non_root_closure);
 
   // Set the saved marks of generations, if that makes sense.
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -244,9 +244,12 @@
 
   gch->gen_process_strong_roots(level,
                                 false, // Younger gens are not roots.
+                                true,  // activate StrongRootsScope
                                 true,  // Collecting permanent generation.
                                 SharedHeap::SO_SystemClasses,
-                                &follow_root_closure, &follow_root_closure);
+                                &follow_root_closure,
+                                true,   // walk code active on stacks
+                                &follow_root_closure);
 
   // Process reference objects found during marking
   {
@@ -338,14 +341,19 @@
 
   gch->gen_process_strong_roots(level,
                                 false, // Younger gens are not roots.
+                                true,  // activate StrongRootsScope
                                 true,  // Collecting permanent generation.
                                 SharedHeap::SO_AllClasses,
                                 &adjust_root_pointer_closure,
+                                false, // do not walk code
                                 &adjust_root_pointer_closure);
 
   // Now adjust pointers in remaining weak roots.  (All of which should
   // have been cleared if they pointed to non-surviving objects.)
+  CodeBlobToOopClosure adjust_code_pointer_closure(&adjust_pointer_closure,
+                                                   /*do_marking=*/ false);
   gch->gen_process_weak_roots(&adjust_root_pointer_closure,
+                              &adjust_code_pointer_closure,
                               &adjust_pointer_closure);
 
   adjust_marks();
--- a/hotspot/src/share/vm/memory/iterator.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/iterator.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -46,3 +46,42 @@
 }
 #endif
 
+
+MarkingCodeBlobClosure::MarkScope::MarkScope(bool activate)
+  : _active(activate)
+{
+  if (_active)  nmethod::oops_do_marking_prologue();
+}
+
+MarkingCodeBlobClosure::MarkScope::~MarkScope() {
+  if (_active)  nmethod::oops_do_marking_epilogue();
+}
+
+void MarkingCodeBlobClosure::do_code_blob(CodeBlob* cb) {
+  if (!cb->is_nmethod())  return;
+  nmethod* nm = (nmethod*) cb;
+  if (!nm->test_set_oops_do_mark()) {
+    NOT_PRODUCT(if (TraceScavenge)  nm->print_on(tty, "oops_do, 1st visit\n"));
+    do_newly_marked_nmethod(nm);
+  } else {
+    NOT_PRODUCT(if (TraceScavenge)  nm->print_on(tty, "oops_do, skipped on 2nd visit\n"));
+  }
+}
+
+void CodeBlobToOopClosure::do_newly_marked_nmethod(nmethod* nm) {
+  nm->oops_do(_cl, /*do_strong_roots_only=*/ true);
+}
+
+void CodeBlobToOopClosure::do_code_blob(CodeBlob* cb) {
+  if (!_do_marking) {
+    NOT_PRODUCT(if (TraceScavenge && Verbose && cb->is_nmethod())  ((nmethod*)cb)->print_on(tty, "oops_do, unmarked visit\n"));
+    // This assert won't work, since there are lots of mini-passes
+    // (mostly in debug mode) that co-exist with marking phases.
+    //assert(!(cb->is_nmethod() && ((nmethod*)cb)->test_oops_do_mark()), "found marked nmethod during mark-free phase");
+    cb->oops_do(_cl);
+  } else {
+    MarkingCodeBlobClosure::do_code_blob(cb);
+  }
+}
+
+
--- a/hotspot/src/share/vm/memory/iterator.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/iterator.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,6 +24,8 @@
 
 // The following classes are C++ `closures` for iterating over objects, roots and spaces
 
+class CodeBlob;
+class nmethod;
 class ReferenceProcessor;
 class DataLayout;
 
@@ -69,9 +71,6 @@
   virtual const bool should_remember_mdo() const { return false; }
   virtual void remember_mdo(DataLayout* v) { /* do nothing */ }
 
-  // If "true", invoke on nmethods (when scanning compiled frames).
-  virtual const bool do_nmethods() const { return false; }
-
   // The methods below control how object iterations invoking this closure
   // should be performed:
 
@@ -176,6 +175,51 @@
 };
 
 
+// CodeBlobClosure is used for iterating through code blobs
+// in the code cache or on thread stacks
+
+class CodeBlobClosure : public Closure {
+ public:
+  // Called for each code blob.
+  virtual void do_code_blob(CodeBlob* cb) = 0;
+};
+
+
+class MarkingCodeBlobClosure : public CodeBlobClosure {
+ public:
+  // Called for each code blob, but at most once per unique blob.
+  virtual void do_newly_marked_nmethod(nmethod* nm) = 0;
+
+  virtual void do_code_blob(CodeBlob* cb);
+    // = { if (!nmethod(cb)->test_set_oops_do_mark())  do_newly_marked_nmethod(cb); }
+
+  class MarkScope : public StackObj {
+  protected:
+    bool _active;
+  public:
+    MarkScope(bool activate = true);
+      // = { if (active) nmethod::oops_do_marking_prologue(); }
+    ~MarkScope();
+      // = { if (active) nmethod::oops_do_marking_epilogue(); }
+  };
+};
+
+
+// Applies an oop closure to all ref fields in code blobs
+// iterated over in an object iteration.
+class CodeBlobToOopClosure: public MarkingCodeBlobClosure {
+  OopClosure* _cl;
+  bool _do_marking;
+public:
+  virtual void do_newly_marked_nmethod(nmethod* cb);
+    // = { cb->oops_do(_cl); }
+  virtual void do_code_blob(CodeBlob* cb);
+    // = { if (_do_marking)  super::do_code_blob(cb); else cb->oops_do(_cl); }
+  CodeBlobToOopClosure(OopClosure* cl, bool do_marking)
+    : _cl(cl), _do_marking(do_marking) {}
+};
+
+
 
 // MonitorClosure is used for iterating over monitors in the monitors cache
 
--- a/hotspot/src/share/vm/memory/sharedHeap.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/sharedHeap.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -100,12 +100,27 @@
          "Not in range.");
 }
 
-void SharedHeap::process_strong_roots(bool collecting_perm_gen,
+SharedHeap::StrongRootsScope::StrongRootsScope(SharedHeap* outer, bool activate)
+  : MarkScope(activate)
+{
+  if (_active) {
+    outer->change_strong_roots_parity();
+  }
+}
+
+SharedHeap::StrongRootsScope::~StrongRootsScope() {
+  // nothing particular
+}
+
+void SharedHeap::process_strong_roots(bool activate_scope,
+                                      bool collecting_perm_gen,
                                       ScanningOption so,
                                       OopClosure* roots,
+                                      CodeBlobClosure* code_roots,
                                       OopsInGenClosure* perm_blk) {
+  StrongRootsScope srs(this, activate_scope);
   // General strong roots.
-  if (n_par_threads() == 0) change_strong_roots_parity();
+  assert(_strong_roots_parity != 0, "must have called prologue code");
   if (!_process_strong_tasks->is_task_claimed(SH_PS_Universe_oops_do)) {
     Universe::oops_do(roots);
     ReferenceProcessor::oops_do(roots);
@@ -117,9 +132,9 @@
     JNIHandles::oops_do(roots);
   // All threads execute this; the individual threads are task groups.
   if (ParallelGCThreads > 0) {
-    Threads::possibly_parallel_oops_do(roots);
+    Threads::possibly_parallel_oops_do(roots, code_roots);
   } else {
-    Threads::oops_do(roots);
+    Threads::oops_do(roots, code_roots);
   }
   if (!_process_strong_tasks-> is_task_claimed(SH_PS_ObjectSynchronizer_oops_do))
     ObjectSynchronizer::oops_do(roots);
@@ -156,11 +171,29 @@
   }
 
   if (!_process_strong_tasks->is_task_claimed(SH_PS_CodeCache_oops_do)) {
-     if (so & SO_CodeCache) {
-       CodeCache::oops_do(roots);
-     }
+    if (so & SO_CodeCache) {
+      // (Currently, CMSCollector uses this to do intermediate-strength collections.)
+      assert(collecting_perm_gen, "scanning all of code cache");
+      assert(code_roots != NULL, "must supply closure for code cache");
+      if (code_roots != NULL) {
+        CodeCache::blobs_do(code_roots);
+      }
+    } else if (so & (SO_SystemClasses|SO_AllClasses)) {
+      if (!collecting_perm_gen) {
+        // If we are collecting from class statics, but we are not going to
+        // visit all of the CodeCache, collect from the non-perm roots if any.
+        // This makes the code cache function temporarily as a source of strong
+        // roots for oops, until the next major collection.
+        //
+        // If collecting_perm_gen is true, we require that this phase will call
+        // CodeCache::do_unloading.  This will kill off nmethods with expired
+        // weak references, such as stale invokedynamic targets.
+        CodeCache::scavenge_root_nmethods_do(code_roots);
+      }
+    }
     // Verify if the code cache contents are in the perm gen
-    NOT_PRODUCT(CodeCache::oops_do(&assert_is_perm_closure));
+    NOT_PRODUCT(CodeBlobToOopClosure assert_code_is_perm(&assert_is_perm_closure, /*do_marking=*/ false));
+    NOT_PRODUCT(CodeCache::asserted_non_scavengable_nmethods_do(&assert_code_is_perm));
   }
 
   // Roots that should point only into permanent generation.
@@ -220,11 +253,12 @@
 // just skip adjusting any shared entries in the string table.
 
 void SharedHeap::process_weak_roots(OopClosure* root_closure,
+                                    CodeBlobClosure* code_roots,
                                     OopClosure* non_root_closure) {
   // Global (weak) JNI handles
   JNIHandles::weak_oops_do(&always_true, root_closure);
 
-  CodeCache::oops_do(non_root_closure);
+  CodeCache::blobs_do(code_roots);
   SymbolTable::oops_do(root_closure);
   if (UseSharedSpaces && !DumpSharedSpaces) {
     SkipAdjustingSharedStrings skip_closure(root_closure);
--- a/hotspot/src/share/vm/memory/sharedHeap.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/memory/sharedHeap.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -165,9 +165,21 @@
   //   c) to never return a distinguished value (zero) with which such
   //      task-claiming variables may be initialized, to indicate "never
   //      claimed".
+ private:
   void change_strong_roots_parity();
+ public:
   int strong_roots_parity() { return _strong_roots_parity; }
 
+  // Call these in sequential code around process_strong_roots.
+  // strong_roots_prologue calls change_strong_roots_parity, if
+  // parallel tasks are enabled.
+  class StrongRootsScope : public MarkingCodeBlobClosure::MarkScope {
+  public:
+    StrongRootsScope(SharedHeap* outer, bool activate = true);
+    ~StrongRootsScope();
+  };
+  friend class StrongRootsScope;
+
   enum ScanningOption {
     SO_None                = 0x0,
     SO_AllClasses          = 0x1,
@@ -198,15 +210,18 @@
   // "SO_Symbols" applies the closure to all entries in SymbolsTable;
   // "SO_Strings" applies the closure to all entries in StringTable;
   // "SO_CodeCache" applies the closure to all elements of the CodeCache.
-  void process_strong_roots(bool collecting_perm_gen,
+  void process_strong_roots(bool activate_scope,
+                            bool collecting_perm_gen,
                             ScanningOption so,
                             OopClosure* roots,
+                            CodeBlobClosure* code_roots,
                             OopsInGenClosure* perm_blk);
 
   // Apply "blk" to all the weak roots of the system.  These include
   // JNI weak roots, the code cache, system dictionary, symbol table,
   // string table.
   void process_weak_roots(OopClosure* root_closure,
+                          CodeBlobClosure* code_roots,
                           OopClosure* non_root_closure);
 
 
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2152,7 +2152,7 @@
   // This is a short non-blocking critical region, so the no safepoint check is ok.
   OsrList_lock->lock_without_safepoint_check();
   assert(n->is_osr_method(), "wrong kind of nmethod");
-  n->set_link(osr_nmethods_head());
+  n->set_osr_link(osr_nmethods_head());
   set_osr_nmethods_head(n);
   // Remember to unlock again
   OsrList_lock->unlock();
@@ -2168,17 +2168,17 @@
   // Search for match
   while(cur != NULL && cur != n) {
     last = cur;
-    cur = cur->link();
+    cur = cur->osr_link();
   }
   if (cur == n) {
     if (last == NULL) {
       // Remove first element
-      set_osr_nmethods_head(osr_nmethods_head()->link());
+      set_osr_nmethods_head(osr_nmethods_head()->osr_link());
     } else {
-      last->set_link(cur->link());
+      last->set_osr_link(cur->osr_link());
     }
   }
-  n->set_link(NULL);
+  n->set_osr_link(NULL);
   // Remember to unlock again
   OsrList_lock->unlock();
 }
@@ -2195,7 +2195,7 @@
       OsrList_lock->unlock();
       return osr;
     }
-    osr = osr->link();
+    osr = osr->osr_link();
   }
   OsrList_lock->unlock();
   return NULL;
--- a/hotspot/src/share/vm/oops/oop.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/oops/oop.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -330,6 +330,7 @@
 
   bool is_perm() const;
   bool is_perm_or_null() const;
+  bool is_scavengable() const;
   bool is_shared() const;
   bool is_shared_readonly() const;
   bool is_shared_readwrite() const;
--- a/hotspot/src/share/vm/oops/oop.inline2.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/oops/oop.inline2.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,3 +34,7 @@
 inline bool oopDesc::is_perm_or_null() const {
   return this == NULL || is_perm();
 }
+
+inline bool oopDesc::is_scavengable() const {
+  return Universe::heap()->is_scavengable(this);
+}
--- a/hotspot/src/share/vm/opto/connode.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/connode.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -1085,6 +1085,9 @@
   switch (op) {
   case Op_SubX:
     x = in(1)->in(1);
+    // Avoid ideal transformations ping-pong between this and AddP for raw pointers.
+    if (phase->find_intptr_t_con(x, -1) == 0)
+      break;
     y = in(1)->in(2);
     if (fits_in_int(phase->type(y), true)) {
       return addP_of_X2P(phase, x, y, true);
--- a/hotspot/src/share/vm/opto/escape.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/escape.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -524,12 +524,15 @@
   // inlining) which was not eliminated during parsing since the exactness
   // of the allocation type was not propagated to the subclass type check.
   //
+  // Or the type 't' could be not related to 'base_t' at all.
+  // It could happened when CHA type is different from MDO type on a dead path
+  // (for example, from instanceof check) which is not collapsed during parsing.
+  //
   // Do nothing for such AddP node and don't process its users since
   // this code branch will go away.
   //
   if (!t->is_known_instance() &&
-      !t->klass()->equals(base_t->klass()) &&
-      t->klass()->is_subtype_of(base_t->klass())) {
+      !base_t->klass()->is_subtype_of(t->klass())) {
      return false; // bail out
   }
 
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -1450,7 +1450,7 @@
 
     case BarrierSet::CardTableModRef:
     case BarrierSet::CardTableExtension:
-      write_barrier_post(store, obj, adr, val, use_precise);
+      write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
       break;
 
     case BarrierSet::ModRef:
@@ -3165,6 +3165,7 @@
 void GraphKit::write_barrier_post(Node* oop_store,
                                   Node* obj,
                                   Node* adr,
+                                  uint  adr_idx,
                                   Node* val,
                                   bool use_precise) {
   // No store check needed if we're storing a NULL or an old object
@@ -3214,7 +3215,7 @@
     __ store(__ ctrl(), card_adr, zero, bt, adr_type);
   } else {
     // Specialized path for CM store barrier
-    __ storeCM(__ ctrl(), card_adr, zero, oop_store, bt, adr_type);
+    __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type);
   }
 
   // Final sync IdealKit and GraphKit.
@@ -3314,6 +3315,7 @@
 void GraphKit::g1_mark_card(IdealKit& ideal,
                             Node* card_adr,
                             Node* oop_store,
+                            uint oop_alias_idx,
                             Node* index,
                             Node* index_adr,
                             Node* buffer,
@@ -3323,7 +3325,7 @@
   Node* no_base = __ top();
   BasicType card_bt = T_BYTE;
   // Smash zero into card. MUST BE ORDERED WRT TO STORE
-  __ storeCM(__ ctrl(), card_adr, zero, oop_store, card_bt, Compile::AliasIdxRaw);
+  __ storeCM(__ ctrl(), card_adr, zero, oop_store, oop_alias_idx, card_bt, Compile::AliasIdxRaw);
 
   //  Now do the queue work
   __ if_then(index, BoolTest::ne, zero); {
@@ -3435,13 +3437,13 @@
         Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
 
         __ if_then(card_val, BoolTest::ne, zero); {
-          g1_mark_card(ideal, card_adr, oop_store, index, index_adr, buffer, tf);
+          g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
         } __ end_if();
       } __ end_if();
     } __ end_if();
   } else {
     // Object.clone() instrinsic uses this path.
-    g1_mark_card(ideal, card_adr, oop_store, index, index_adr, buffer, tf);
+    g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
   }
 
   // Final sync IdealKit and GraphKit.
--- a/hotspot/src/share/vm/opto/graphKit.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/graphKit.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -603,7 +603,8 @@
   void sync_kit(IdealKit& ideal);
 
   // vanilla/CMS post barrier
-  void write_barrier_post(Node *store, Node* obj, Node* adr, Node* val, bool use_precise);
+  void write_barrier_post(Node *store, Node* obj,
+                          Node* adr,  uint adr_idx, Node* val, bool use_precise);
 
   // G1 pre/post barriers
   void g1_write_barrier_pre(Node* obj,
@@ -622,7 +623,8 @@
                              bool use_precise);
   // Helper function for g1
   private:
-  void g1_mark_card(IdealKit& ideal, Node* card_adr, Node* store,  Node* index, Node* index_adr,
+  void g1_mark_card(IdealKit& ideal, Node* card_adr, Node* store, uint oop_alias_idx,
+                    Node* index, Node* index_adr,
                     Node* buffer, const TypeFunc* tf);
 
   public:
--- a/hotspot/src/share/vm/opto/idealKit.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/idealKit.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -378,7 +378,7 @@
 
 // Card mark store. Must be ordered so that it will come after the store of
 // the oop.
-Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store,
+Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store, int oop_adr_idx,
                         BasicType bt,
                         int adr_idx) {
   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
@@ -388,7 +388,7 @@
 
   // Add required edge to oop_store, optimizer does not support precedence edges.
   // Convert required edge to precedence edge before allocation.
-  Node* st = new (C, 5) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store);
+  Node* st = new (C, 5) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);
 
   st = transform(st);
   set_memory(st, adr_idx);
--- a/hotspot/src/share/vm/opto/idealKit.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/idealKit.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -216,6 +216,7 @@
                 Node* adr,
                 Node* val,
                 Node* oop_store,
+                int oop_adr_idx,
                 BasicType bt,
                 int adr_idx);
 
--- a/hotspot/src/share/vm/opto/library_call.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -133,6 +133,7 @@
     return generate_method_call(method_id, true, false);
   }
 
+  Node* make_string_method_node(int opcode, Node* str1, Node* cnt1, Node* str2, Node* cnt2);
   bool inline_string_compareTo();
   bool inline_string_indexOf();
   Node* string_indexOf(Node* string_object, ciTypeArray* target_array, jint offset, jint cache_i, jint md2_i);
@@ -796,6 +797,64 @@
 }
 
 
+//------------------------------make_string_method_node------------------------
+// Helper method for String intrinsic finctions.
+Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1, Node* cnt1, Node* str2, Node* cnt2) {
+  const int value_offset  = java_lang_String::value_offset_in_bytes();
+  const int count_offset  = java_lang_String::count_offset_in_bytes();
+  const int offset_offset = java_lang_String::offset_offset_in_bytes();
+
+  Node* no_ctrl = NULL;
+
+  ciInstanceKlass* klass = env()->String_klass();
+  const TypeInstPtr* string_type =
+        TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
+
+  const TypeAryPtr* value_type =
+        TypeAryPtr::make(TypePtr::NotNull,
+                         TypeAry::make(TypeInt::CHAR,TypeInt::POS),
+                         ciTypeArrayKlass::make(T_CHAR), true, 0);
+
+  // Get start addr of string and substring
+  Node* str1_valuea  = basic_plus_adr(str1, str1, value_offset);
+  Node* str1_value   = make_load(no_ctrl, str1_valuea, value_type, T_OBJECT, string_type->add_offset(value_offset));
+  Node* str1_offseta = basic_plus_adr(str1, str1, offset_offset);
+  Node* str1_offset  = make_load(no_ctrl, str1_offseta, TypeInt::INT, T_INT, string_type->add_offset(offset_offset));
+  Node* str1_start   = array_element_address(str1_value, str1_offset, T_CHAR);
+
+  // Pin loads from String::equals() argument since it could be NULL.
+  Node* str2_ctrl = (opcode == Op_StrEquals) ? control() : no_ctrl;
+  Node* str2_valuea  = basic_plus_adr(str2, str2, value_offset);
+  Node* str2_value   = make_load(str2_ctrl, str2_valuea, value_type, T_OBJECT, string_type->add_offset(value_offset));
+  Node* str2_offseta = basic_plus_adr(str2, str2, offset_offset);
+  Node* str2_offset  = make_load(str2_ctrl, str2_offseta, TypeInt::INT, T_INT, string_type->add_offset(offset_offset));
+  Node* str2_start   = array_element_address(str2_value, str2_offset, T_CHAR);
+
+  Node* result = NULL;
+  switch (opcode) {
+  case Op_StrIndexOf:
+    result = new (C, 6) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
+                                       str1_start, cnt1, str2_start, cnt2);
+    break;
+  case Op_StrComp:
+    result = new (C, 6) StrCompNode(control(), memory(TypeAryPtr::CHARS),
+                                    str1_start, cnt1, str2_start, cnt2);
+    break;
+  case Op_StrEquals:
+    result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
+                                      str1_start, str2_start, cnt1);
+    break;
+  default:
+    ShouldNotReachHere();
+    return NULL;
+  }
+
+  // All these intrinsics have checks.
+  C->set_has_split_ifs(true); // Has chance for split-if optimization
+
+  return _gvn.transform(result);
+}
+
 //------------------------------inline_string_compareTo------------------------
 bool LibraryCallKit::inline_string_compareTo() {
 
@@ -824,16 +883,16 @@
   ciInstanceKlass* klass = env()->String_klass();
   const TypeInstPtr* string_type =
     TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
-
-  Node* compare =
-    _gvn.transform(new (C, 7) StrCompNode(
-                        control(),
-                        memory(TypeAryPtr::CHARS),
-                        memory(string_type->add_offset(value_offset)),
-                        memory(string_type->add_offset(count_offset)),
-                        memory(string_type->add_offset(offset_offset)),
-                        receiver,
-                        argument));
+  Node* no_ctrl = NULL;
+
+  // Get counts for string and argument
+  Node* receiver_cnta = basic_plus_adr(receiver, receiver, count_offset);
+  Node* receiver_cnt  = make_load(no_ctrl, receiver_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+
+  Node* argument_cnta = basic_plus_adr(argument, argument, count_offset);
+  Node* argument_cnt  = make_load(no_ctrl, argument_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+
+  Node* compare = make_string_method_node(Op_StrComp, receiver, receiver_cnt, argument, argument_cnt);
   push(compare);
   return true;
 }
@@ -865,45 +924,71 @@
     return true;
   }
 
+  // paths (plus control) merge
+  RegionNode* region = new (C, 5) RegionNode(5);
+  Node* phi = new (C, 5) PhiNode(region, TypeInt::BOOL);
+
+  // does source == target string?
+  Node* cmp = _gvn.transform(new (C, 3) CmpPNode(receiver, argument));
+  Node* bol = _gvn.transform(new (C, 2) BoolNode(cmp, BoolTest::eq));
+
+  Node* if_eq = generate_slow_guard(bol, NULL);
+  if (if_eq != NULL) {
+    // receiver == argument
+    phi->init_req(2, intcon(1));
+    region->init_req(2, if_eq);
+  }
+
   // get String klass for instanceOf
   ciInstanceKlass* klass = env()->String_klass();
 
-  // two paths (plus control) merge
-  RegionNode* region = new (C, 3) RegionNode(3);
-  Node* phi = new (C, 3) PhiNode(region, TypeInt::BOOL);
-
-  Node* inst = gen_instanceof(argument, makecon(TypeKlassPtr::make(klass)));
-  Node* cmp  = _gvn.transform(new (C, 3) CmpINode(inst, intcon(1)));
-  Node* bol  = _gvn.transform(new (C, 2) BoolNode(cmp, BoolTest::eq));
-
-  IfNode* iff = create_and_map_if(control(), bol, PROB_MAX, COUNT_UNKNOWN);
-
-  Node* if_true  = _gvn.transform(new (C, 1) IfTrueNode(iff));
-  set_control(if_true);
+  if (!stopped()) {
+    Node* inst = gen_instanceof(argument, makecon(TypeKlassPtr::make(klass)));
+    Node* cmp  = _gvn.transform(new (C, 3) CmpINode(inst, intcon(1)));
+    Node* bol  = _gvn.transform(new (C, 2) BoolNode(cmp, BoolTest::ne));
+
+    Node* inst_false = generate_guard(bol, NULL, PROB_MIN);
+    //instanceOf == true, fallthrough
+
+    if (inst_false != NULL) {
+      phi->init_req(3, intcon(0));
+      region->init_req(3, inst_false);
+    }
+  }
 
   const TypeInstPtr* string_type =
     TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
 
-  // instanceOf == true
-  Node* equals =
-    _gvn.transform(new (C, 7) StrEqualsNode(
-                        control(),
-                        memory(TypeAryPtr::CHARS),
-                        memory(string_type->add_offset(value_offset)),
-                        memory(string_type->add_offset(count_offset)),
-                        memory(string_type->add_offset(offset_offset)),
-                        receiver,
-                        argument));
-
-  phi->init_req(1, _gvn.transform(equals));
-  region->init_req(1, if_true);
-
-  //instanceOf == false, fallthrough
-  Node* if_false = _gvn.transform(new (C, 1) IfFalseNode(iff));
-  set_control(if_false);
-
-  phi->init_req(2, _gvn.transform(intcon(0)));
-  region->init_req(2, if_false);
+  Node* no_ctrl = NULL;
+  Node* receiver_cnt;
+  Node* argument_cnt;
+
+  if (!stopped()) {
+    // Get counts for string and argument
+    Node* receiver_cnta = basic_plus_adr(receiver, receiver, count_offset);
+    receiver_cnt  = make_load(no_ctrl, receiver_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+
+    // Pin load from argument string since it could be NULL.
+    Node* argument_cnta = basic_plus_adr(argument, argument, count_offset);
+    argument_cnt  = make_load(control(), argument_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+
+    // Check for receiver count != argument count
+    Node* cmp = _gvn.transform( new(C, 3) CmpINode(receiver_cnt, argument_cnt) );
+    Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::ne) );
+    Node* if_ne = generate_slow_guard(bol, NULL);
+    if (if_ne != NULL) {
+      phi->init_req(4, intcon(0));
+      region->init_req(4, if_ne);
+    }
+  }
+
+  // Check for count == 0 is done by mach node StrEquals.
+
+  if (!stopped()) {
+    Node* equals = make_string_method_node(Op_StrEquals, receiver, receiver_cnt, argument, argument_cnt);
+    phi->init_req(1, equals);
+    region->init_req(1, control());
+  }
 
   // post merge
   set_control(_gvn.transform(region));
@@ -924,10 +1009,8 @@
   Node *argument1 = pop();
 
   Node* equals =
-    _gvn.transform(new (C, 3) AryEqNode(control(),
-                                        argument1,
-                                        argument2)
-                   );
+    _gvn.transform(new (C, 4) AryEqNode(control(), memory(TypeAryPtr::CHARS),
+                                        argument1, argument2) );
   push(equals);
   return true;
 }
@@ -1108,19 +1191,40 @@
       return true;
     }
 
+    // Make the merge point
+    RegionNode* result_rgn = new (C, 3) RegionNode(3);
+    Node*       result_phi = new (C, 3) PhiNode(result_rgn, TypeInt::INT);
+    Node* no_ctrl  = NULL;
+
     ciInstanceKlass* klass = env()->String_klass();
     const TypeInstPtr* string_type =
       TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
 
-    result =
-      _gvn.transform(new (C, 7)
-                     StrIndexOfNode(control(),
-                                    memory(TypeAryPtr::CHARS),
-                                    memory(string_type->add_offset(value_offset)),
-                                    memory(string_type->add_offset(count_offset)),
-                                    memory(string_type->add_offset(offset_offset)),
-                                    receiver,
-                                    argument));
+    // Get counts for string and substr
+    Node* source_cnta = basic_plus_adr(receiver, receiver, count_offset);
+    Node* source_cnt  = make_load(no_ctrl, source_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+
+    Node* substr_cnta = basic_plus_adr(argument, argument, count_offset);
+    Node* substr_cnt  = make_load(no_ctrl, substr_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+
+    // Check for substr count > string count
+    Node* cmp = _gvn.transform( new(C, 3) CmpINode(substr_cnt, source_cnt) );
+    Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::gt) );
+    Node* if_gt = generate_slow_guard(bol, NULL);
+    if (if_gt != NULL) {
+      result_phi->init_req(2, intcon(-1));
+      result_rgn->init_req(2, if_gt);
+    }
+
+    if (!stopped()) {
+      result = make_string_method_node(Op_StrIndexOf, receiver, source_cnt, argument, substr_cnt);
+      result_phi->init_req(1, result);
+      result_rgn->init_req(1, control());
+    }
+    set_control(_gvn.transform(result_rgn));
+    record_for_igvn(result_rgn);
+    result = _gvn.transform(result_phi);
+
   } else { //Use LibraryCallKit::string_indexOf
     // don't intrinsify is argument isn't a constant string.
     if (!argument->is_Con()) {
--- a/hotspot/src/share/vm/opto/matcher.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2032,6 +2032,23 @@
         n->del_req(3);
         break;
       }
+      case Op_StrEquals: {
+        Node *pair1 = new (C, 3) BinaryNode(n->in(2),n->in(3));
+        n->set_req(2,pair1);
+        n->set_req(3,n->in(4));
+        n->del_req(4);
+        break;
+      }
+      case Op_StrComp:
+      case Op_StrIndexOf: {
+        Node *pair1 = new (C, 3) BinaryNode(n->in(2),n->in(3));
+        n->set_req(2,pair1);
+        Node *pair2 = new (C, 3) BinaryNode(n->in(4),n->in(5));
+        n->set_req(3,pair2);
+        n->del_req(5);
+        n->del_req(4);
+        break;
+      }
       default:
         break;
       }
--- a/hotspot/src/share/vm/opto/memnode.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2313,6 +2313,22 @@
   return this;
 }
 
+//=============================================================================
+//------------------------------Ideal---------------------------------------
+Node *StoreCMNode::Ideal(PhaseGVN *phase, bool can_reshape){
+  Node* progress = StoreNode::Ideal(phase, can_reshape);
+  if (progress != NULL) return progress;
+
+  Node* my_store = in(MemNode::OopStore);
+  if (my_store->is_MergeMem()) {
+    Node* mem = my_store->as_MergeMem()->memory_at(oop_alias_idx());
+    set_req(MemNode::OopStore, mem);
+    return this;
+  }
+
+  return NULL;
+}
+
 //------------------------------Value-----------------------------------------
 const Type *StoreCMNode::Value( PhaseTransform *phase ) const {
   // Either input is TOP ==> the result is TOP
@@ -2498,7 +2514,7 @@
 //=============================================================================
 // Do we match on this edge? No memory edges
 uint StrCompNode::match_edge(uint idx) const {
-  return idx == 5 || idx == 6;
+  return idx == 2 || idx == 3; // StrComp (Binary str1 cnt1) (Binary str2 cnt2)
 }
 
 //------------------------------Ideal------------------------------------------
@@ -2508,9 +2524,10 @@
   return remove_dead_region(phase, can_reshape) ? this : NULL;
 }
 
+//=============================================================================
 // Do we match on this edge? No memory edges
 uint StrEqualsNode::match_edge(uint idx) const {
-  return idx == 5 || idx == 6;
+  return idx == 2 || idx == 3; // StrEquals (Binary str1 str2) cnt
 }
 
 //------------------------------Ideal------------------------------------------
@@ -2523,7 +2540,7 @@
 //=============================================================================
 // Do we match on this edge? No memory edges
 uint StrIndexOfNode::match_edge(uint idx) const {
-  return idx == 5 || idx == 6;
+  return idx == 2 || idx == 3; // StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)
 }
 
 //------------------------------Ideal------------------------------------------
@@ -2533,6 +2550,11 @@
   return remove_dead_region(phase, can_reshape) ? this : NULL;
 }
 
+//=============================================================================
+// Do we match on this edge? No memory edges
+uint AryEqNode::match_edge(uint idx) const {
+  return idx == 2 || idx == 3; // StrEquals ary1 ary2
+}
 //------------------------------Ideal------------------------------------------
 // Return a node which is more "ideal" than the current node.  Strip out
 // control copies
--- a/hotspot/src/share/vm/opto/memnode.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/memnode.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -582,12 +582,16 @@
 // The last StoreCM before a SafePoint must be preserved and occur after its "oop" store
 // Preceeding equivalent StoreCMs may be eliminated.
 class StoreCMNode : public StoreNode {
+ private:
+  int _oop_alias_idx;   // The alias_idx of OopStore
 public:
-  StoreCMNode( Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, Node *oop_store ) : StoreNode(c,mem,adr,at,val,oop_store) {}
+  StoreCMNode( Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, Node *oop_store, int oop_alias_idx ) : StoreNode(c,mem,adr,at,val,oop_store), _oop_alias_idx(oop_alias_idx) {}
   virtual int Opcode() const;
   virtual Node *Identity( PhaseTransform *phase );
+  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
   virtual const Type *Value( PhaseTransform *phase ) const;
   virtual BasicType memory_type() const { return T_VOID; } // unspecific
+  int oop_alias_idx() const { return _oop_alias_idx; }
 };
 
 //------------------------------LoadPLockedNode---------------------------------
@@ -744,22 +748,15 @@
 //------------------------------StrComp-------------------------------------
 class StrCompNode: public Node {
 public:
-  StrCompNode(Node *control,
-              Node* char_array_mem,
-              Node* value_mem,
-              Node* count_mem,
-              Node* offset_mem,
-              Node* s1, Node* s2): Node(control,
-                                        char_array_mem,
-                                        value_mem,
-                                        count_mem,
-                                        offset_mem,
-                                        s1, s2) {};
+  StrCompNode(Node* control, Node* char_array_mem,
+              Node* s1, Node* c1,
+              Node* s2, Node* c2): Node(control, char_array_mem,
+                                        s1, c1,
+                                        s2, c2) {};
   virtual int Opcode() const;
   virtual bool depends_only_on_test() const { return false; }
   virtual const Type* bottom_type() const { return TypeInt::INT; }
-  // a StrCompNode (conservatively) aliases with everything:
-  virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
+  virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
   virtual uint match_edge(uint idx) const;
   virtual uint ideal_reg() const { return Op_RegI; }
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -768,22 +765,13 @@
 //------------------------------StrEquals-------------------------------------
 class StrEqualsNode: public Node {
 public:
-  StrEqualsNode(Node *control,
-                Node* char_array_mem,
-                Node* value_mem,
-                Node* count_mem,
-                Node* offset_mem,
-                Node* s1, Node* s2): Node(control,
-                                          char_array_mem,
-                                          value_mem,
-                                          count_mem,
-                                          offset_mem,
-                                          s1, s2) {};
+  StrEqualsNode(Node* control, Node* char_array_mem,
+                Node* s1, Node* s2, Node* c): Node(control, char_array_mem,
+                                                   s1, s2, c) {};
   virtual int Opcode() const;
   virtual bool depends_only_on_test() const { return false; }
   virtual const Type* bottom_type() const { return TypeInt::BOOL; }
-  // a StrEqualsNode (conservatively) aliases with everything:
-  virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
+  virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
   virtual uint match_edge(uint idx) const;
   virtual uint ideal_reg() const { return Op_RegI; }
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -792,22 +780,15 @@
 //------------------------------StrIndexOf-------------------------------------
 class StrIndexOfNode: public Node {
 public:
-  StrIndexOfNode(Node *control,
-                 Node* char_array_mem,
-                 Node* value_mem,
-                 Node* count_mem,
-                 Node* offset_mem,
-                 Node* s1, Node* s2): Node(control,
-                                           char_array_mem,
-                                           value_mem,
-                                           count_mem,
-                                           offset_mem,
-                                           s1, s2) {};
+  StrIndexOfNode(Node* control, Node* char_array_mem,
+                 Node* s1, Node* c1,
+                 Node* s2, Node* c2): Node(control, char_array_mem,
+                                           s1, c1,
+                                           s2, c2) {};
   virtual int Opcode() const;
   virtual bool depends_only_on_test() const { return false; }
   virtual const Type* bottom_type() const { return TypeInt::INT; }
-  // a StrIndexOfNode (conservatively) aliases with everything:
-  virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
+  virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
   virtual uint match_edge(uint idx) const;
   virtual uint ideal_reg() const { return Op_RegI; }
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -816,11 +797,13 @@
 //------------------------------AryEq---------------------------------------
 class AryEqNode: public Node {
 public:
-  AryEqNode(Node *control, Node* s1, Node* s2): Node(control, s1, s2) {};
+  AryEqNode(Node* control, Node* char_array_mem,
+            Node* s1, Node* s2): Node(control, char_array_mem, s1, s2) {};
   virtual int Opcode() const;
   virtual bool depends_only_on_test() const { return false; }
   virtual const Type* bottom_type() const { return TypeInt::BOOL; }
   virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
+  virtual uint match_edge(uint idx) const;
   virtual uint ideal_reg() const { return Op_RegI; }
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 };
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/output.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -611,7 +611,7 @@
       assert(cik->is_instance_klass() ||
              cik->is_array_klass(), "Not supported allocation.");
       sv = new ObjectValue(spobj->_idx,
-                           new ConstantOopWriteValue(cik->encoding()));
+                           new ConstantOopWriteValue(cik->constant_encoding()));
       Compile::set_sv_for_object_node(objs, sv);
 
       uint first_ind = spobj->first_index();
@@ -702,13 +702,13 @@
   case Type::AryPtr:
   case Type::InstPtr:
   case Type::KlassPtr:          // fall through
-    array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->encoding()));
+    array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding()));
     break;
   case Type::NarrowOop:
     if (t == TypeNarrowOop::NULL_PTR) {
       array->append(new ConstantOopWriteValue(NULL));
     } else {
-      array->append(new ConstantOopWriteValue(t->make_ptr()->isa_oopptr()->const_oop()->encoding()));
+      array->append(new ConstantOopWriteValue(t->make_ptr()->isa_oopptr()->const_oop()->constant_encoding()));
     }
     break;
   case Type::Int:
@@ -871,7 +871,7 @@
           assert(cik->is_instance_klass() ||
                  cik->is_array_klass(), "Not supported allocation.");
           ObjectValue* sv = new ObjectValue(spobj->_idx,
-                                new ConstantOopWriteValue(cik->encoding()));
+                                new ConstantOopWriteValue(cik->constant_encoding()));
           Compile::set_sv_for_object_node(objs, sv);
 
           uint first_ind = spobj->first_index();
@@ -890,7 +890,7 @@
         }
       } else {
         const TypePtr *tp = obj_node->bottom_type()->make_ptr();
-        scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->encoding());
+        scval = new ConstantOopWriteValue(tp->is_instptr()->const_oop()->constant_encoding());
       }
 
       OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node);
--- a/hotspot/src/share/vm/opto/parse.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/parse.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -469,7 +469,7 @@
 
   // loading from a constant field or the constant pool
   // returns false if push failed (non-perm field constants only, not ldcs)
-  bool push_constant(ciConstant con);
+  bool push_constant(ciConstant con, bool require_constant = false);
 
   // implementation of object creation bytecodes
   void do_new();
--- a/hotspot/src/share/vm/opto/parse1.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/parse1.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -229,7 +229,9 @@
     }
   }
 
-  MethodLivenessResult live_locals = method()->liveness_at_bci(osr_bci());
+  // Use the raw liveness computation to make sure that unexpected
+  // values don't propagate into the OSR frame.
+  MethodLivenessResult live_locals = method()->raw_liveness_at_bci(osr_bci());
   if (!live_locals.is_valid()) {
     // Degenerate or breakpointed method.
     C->record_method_not_compilable("OSR in empty or breakpointed method");
--- a/hotspot/src/share/vm/opto/parse2.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/parse2.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -1325,7 +1325,8 @@
           }
         }
       }
-      push_constant(constant);
+      bool pushed = push_constant(constant, true);
+      guarantee(pushed, "must be possible to push this constant");
     }
 
     break;
--- a/hotspot/src/share/vm/opto/parse3.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/parse3.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -267,7 +267,7 @@
 }
 
 
-bool Parse::push_constant(ciConstant constant) {
+bool Parse::push_constant(ciConstant constant, bool require_constant) {
   switch (constant.basic_type()) {
   case T_BOOLEAN:  push( intcon(constant.as_boolean()) ); break;
   case T_INT:      push( intcon(constant.as_int())     ); break;
@@ -279,13 +279,16 @@
   case T_LONG:     push_pair( longcon(constant.as_long()) ); break;
   case T_ARRAY:
   case T_OBJECT: {
-    // the oop is in perm space if the ciObject "has_encoding"
+    // cases:
+    //   can_be_constant    = (oop not scavengable || ScavengeRootsInCode != 0)
+    //   should_be_constant = (oop not scavengable || ScavengeRootsInCode >= 2)
+    // An oop is not scavengable if it is in the perm gen.
     ciObject* oop_constant = constant.as_object();
     if (oop_constant->is_null_object()) {
       push( zerocon(T_OBJECT) );
       break;
-    } else if (oop_constant->has_encoding()) {
-      push( makecon(TypeOopPtr::make_from_constant(oop_constant)) );
+    } else if (require_constant || oop_constant->should_be_constant()) {
+      push( makecon(TypeOopPtr::make_from_constant(oop_constant, require_constant)) );
       break;
     } else {
       // we cannot inline the oop, but we can use it later to narrow a type
--- a/hotspot/src/share/vm/opto/superword.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/superword.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -457,10 +457,6 @@
         } else if (out->Opcode() == Op_StoreCM && out->in(MemNode::OopStore) == n) {
           // StoreCM has an input edge used as a precedence edge.
           // Maybe an issue when oop stores are vectorized.
-        } else if( out->is_MergeMem() && prev &&
-                   prev->Opcode() == Op_StoreCM && out == prev->in(MemNode::OopStore)) {
-          // Oop store is a MergeMem! This should not happen. Temporarily remove the assertion
-          // for this case because it could not be superwordized anyway.
         } else {
           assert(out == prev || prev == NULL, "no branches off of store slice");
         }
@@ -477,6 +473,12 @@
 // Can s1 and s2 be in a pack with s1 immediately preceding s2 and
 // s1 aligned at "align"
 bool SuperWord::stmts_can_pack(Node* s1, Node* s2, int align) {
+
+  // Do not use superword for non-primitives
+  if((s1->is_Mem() && !is_java_primitive(s1->as_Mem()->memory_type())) ||
+     (s2->is_Mem() && !is_java_primitive(s2->as_Mem()->memory_type())))
+    return false;
+
   if (isomorphic(s1, s2)) {
     if (independent(s1, s2)) {
       if (!exists_at(s1, 0) && !exists_at(s2, 1)) {
--- a/hotspot/src/share/vm/opto/type.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/type.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -296,7 +296,7 @@
                                            false, 0, oopDesc::mark_offset_in_bytes());
   TypeInstPtr::KLASS   = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass(),
                                            false, 0, oopDesc::klass_offset_in_bytes());
-  TypeOopPtr::BOTTOM  = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot);
+  TypeOopPtr::BOTTOM  = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
 
   TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
   TypeNarrowOop::BOTTOM   = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
@@ -492,8 +492,13 @@
 bool Type::interface_vs_oop(const Type *t) const {
   bool result = false;
 
-  const TypeInstPtr* this_inst = this->isa_instptr();
-  const TypeInstPtr*    t_inst =    t->isa_instptr();
+  const TypePtr* this_ptr = this->make_ptr(); // In case it is narrow_oop
+  const TypePtr*    t_ptr =    t->make_ptr();
+  if( this_ptr == NULL || t_ptr == NULL )
+    return result;
+
+  const TypeInstPtr* this_inst = this_ptr->isa_instptr();
+  const TypeInstPtr*    t_inst =    t_ptr->isa_instptr();
   if( this_inst && this_inst->is_loaded() && t_inst && t_inst->is_loaded() ) {
     bool this_interface = this_inst->klass()->is_interface();
     bool    t_interface =    t_inst->klass()->is_interface();
@@ -2249,7 +2254,7 @@
 const Type *TypeOopPtr::cast_to_ptr_type(PTR ptr) const {
   assert(_base == OopPtr, "subclass must override cast_to_ptr_type");
   if( ptr == _ptr ) return this;
-  return make(ptr, _offset);
+  return make(ptr, _offset, _instance_id);
 }
 
 //-----------------------------cast_to_instance_id----------------------------
@@ -2319,8 +2324,10 @@
       if (ptr == Null)  return TypePtr::make(AnyPtr, ptr, offset);
       // else fall through:
     case TopPTR:
-    case AnyNull:
-      return make(ptr, offset);
+    case AnyNull: {
+      int instance_id = meet_instance_id(InstanceTop);
+      return make(ptr, offset, instance_id);
+    }
     case BotPTR:
     case NotNull:
       return TypePtr::make(AnyPtr, ptr, offset);
@@ -2411,14 +2418,13 @@
 
 //------------------------------make_from_constant-----------------------------
 // Make a java pointer from an oop constant
-const TypeOopPtr* TypeOopPtr::make_from_constant(ciObject* o) {
+const TypeOopPtr* TypeOopPtr::make_from_constant(ciObject* o, bool require_constant) {
   if (o->is_method_data() || o->is_method()) {
     // Treat much like a typeArray of bytes, like below, but fake the type...
-    assert(o->has_encoding(), "must be a perm space object");
     const Type* etype = (Type*)get_const_basic_type(T_BYTE);
     const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS);
     ciKlass *klass = ciTypeArrayKlass::make((BasicType) T_BYTE);
-    assert(o->has_encoding(), "method data oops should be tenured");
+    assert(o->can_be_constant(), "method data oops should be tenured");
     const TypeAryPtr* arr = TypeAryPtr::make(TypePtr::Constant, o, arr0, klass, true, 0);
     return arr;
   } else {
@@ -2427,8 +2433,9 @@
     ciKlass *klass = o->klass();
     if (klass->is_instance_klass()) {
       // Element is an instance
-      if (!o->has_encoding()) {  // not a perm-space constant
-        // %%% remove this restriction by rewriting non-perm ConPNodes in a later phase
+      if (require_constant) {
+        if (!o->can_be_constant())  return NULL;
+      } else if (!o->should_be_constant()) {
         return TypeInstPtr::make(TypePtr::NotNull, klass, true, NULL, 0);
       }
       return TypeInstPtr::make(o);
@@ -2440,8 +2447,9 @@
       // We used to pass NotNull in here, asserting that the sub-arrays
       // are all not-null.  This is not true in generally, as code can
       // slam NULLs down in the subarrays.
-      if (!o->has_encoding()) {  // not a perm-space constant
-        // %%% remove this restriction by rewriting non-perm ConPNodes in a later phase
+      if (require_constant) {
+        if (!o->can_be_constant())  return NULL;
+      } else if (!o->should_be_constant()) {
         return TypeAryPtr::make(TypePtr::NotNull, arr0, klass, true, 0);
       }
       const TypeAryPtr* arr = TypeAryPtr::make(TypePtr::Constant, o, arr0, klass, true, 0);
@@ -2453,8 +2461,9 @@
       const TypeAry* arr0 = TypeAry::make(etype, TypeInt::make(o->as_array()->length()));
       // We used to pass NotNull in here, asserting that the array pointer
       // is not-null. That was not true in general.
-      if (!o->has_encoding()) {  // not a perm-space constant
-        // %%% remove this restriction by rewriting non-perm ConPNodes in a later phase
+      if (require_constant) {
+        if (!o->can_be_constant())  return NULL;
+      } else if (!o->should_be_constant()) {
         return TypeAryPtr::make(TypePtr::NotNull, arr0, klass, true, 0);
       }
       const TypeAryPtr* arr = TypeAryPtr::make(TypePtr::Constant, o, arr0, klass, true, 0);
@@ -2483,7 +2492,7 @@
     ShouldNotReachHere();
   }
 
-  return (intptr_t)const_oop()->encoding();
+  return (intptr_t)const_oop()->constant_encoding();
 }
 
 
@@ -2591,7 +2600,7 @@
 
 //------------------------------add_offset-------------------------------------
 const TypePtr *TypeOopPtr::add_offset( intptr_t offset ) const {
-  return make( _ptr, xadd_offset(offset) );
+  return make( _ptr, xadd_offset(offset), _instance_id);
 }
 
 //------------------------------meet_instance_id--------------------------------
@@ -2694,6 +2703,7 @@
 const TypeInstPtr *TypeInstPtr::xmeet_unloaded(const TypeInstPtr *tinst) const {
     int off = meet_offset(tinst->offset());
     PTR ptr = meet_ptr(tinst->ptr());
+    int instance_id = meet_instance_id(tinst->instance_id());
 
     const TypeInstPtr *loaded    = is_loaded() ? this  : tinst;
     const TypeInstPtr *unloaded  = is_loaded() ? tinst : this;
@@ -2714,7 +2724,7 @@
       assert(loaded->ptr() != TypePtr::Null, "insanity check");
       //
       if(      loaded->ptr() == TypePtr::TopPTR ) { return unloaded; }
-      else if (loaded->ptr() == TypePtr::AnyNull) { return TypeInstPtr::make( ptr, unloaded->klass() ); }
+      else if (loaded->ptr() == TypePtr::AnyNull) { return TypeInstPtr::make( ptr, unloaded->klass(), false, NULL, off, instance_id ); }
       else if (loaded->ptr() == TypePtr::BotPTR ) { return TypeInstPtr::BOTTOM; }
       else if (loaded->ptr() == TypePtr::Constant || loaded->ptr() == TypePtr::NotNull) {
         if (unloaded->ptr() == TypePtr::BotPTR  ) { return TypeInstPtr::BOTTOM;  }
@@ -3338,14 +3348,19 @@
       ciObject* o = const_oop();
       if( _ptr == Constant ) {
         if( tap->const_oop() != NULL && !o->equals(tap->const_oop()) ) {
+          xk = (klass() == tap->klass());
           ptr = NotNull;
           o = NULL;
           instance_id = InstanceBot;
+        } else {
+          xk = true;
         }
       } else if( above_centerline(_ptr) ) {
         o = tap->const_oop();
+        xk = true;
+      } else {
+        xk = this->_klass_is_exact;
       }
-      xk = true;
       return TypeAryPtr::make( ptr, o, tary, tap->_klass, xk, off, instance_id );
     }
     case NotNull:
--- a/hotspot/src/share/vm/opto/type.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/type.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -711,10 +711,13 @@
     return make_from_klass_common(klass, false, false);
   }
   // Creates a singleton type given an object.
-  static const TypeOopPtr* make_from_constant(ciObject* o);
+  // If the object cannot be rendered as a constant,
+  // may return a non-singleton type.
+  // If require_constant, produce a NULL if a singleton is not possible.
+  static const TypeOopPtr* make_from_constant(ciObject* o, bool require_constant = false);
 
   // Make a generic (unclassed) pointer to an oop.
-  static const TypeOopPtr* make(PTR ptr, int offset, int instance_id = InstanceBot);
+  static const TypeOopPtr* make(PTR ptr, int offset, int instance_id);
 
   ciObject* const_oop()    const { return _const_oop; }
   virtual ciKlass* klass() const { return _klass;     }
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -3126,6 +3126,12 @@
   // exceptions) will be visible.
   blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
   Universe::oops_do(&blk);
+
+  // If there are any non-perm roots in the code cache, visit them.
+  blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
+  CodeBlobToOopClosure look_in_blobs(&blk, false);
+  CodeCache::scavenge_root_nmethods_do(&look_in_blobs);
+
   return true;
 }
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -2648,16 +2648,22 @@
 
   if (EnableInvokeDynamic && !EnableMethodHandles) {
     if (!FLAG_IS_DEFAULT(EnableMethodHandles)) {
-      warning("forcing EnableMethodHandles true to allow EnableInvokeDynamic");
+      warning("forcing EnableMethodHandles true because EnableInvokeDynamic is true");
     }
     EnableMethodHandles = true;
   }
   if (EnableMethodHandles && !AnonymousClasses) {
     if (!FLAG_IS_DEFAULT(AnonymousClasses)) {
-      warning("forcing AnonymousClasses true to enable EnableMethodHandles");
+      warning("forcing AnonymousClasses true because EnableMethodHandles is true");
     }
     AnonymousClasses = true;
   }
+  if ((EnableMethodHandles || AnonymousClasses) && ScavengeRootsInCode == 0) {
+    if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
+      warning("forcing ScavengeRootsInCode non-zero because EnableMethodHandles or AnonymousClasses is true");
+    }
+    ScavengeRootsInCode = 1;
+  }
 
   if (PrintGCDetails) {
     // Turn on -verbose:gc options as well
--- a/hotspot/src/share/vm/runtime/frame.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/frame.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -1043,7 +1043,7 @@
   finder.oops_do();
 }
 
-void frame::oops_code_blob_do(OopClosure* f, const RegisterMap* reg_map) {
+void frame::oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* reg_map) {
   assert(_cb != NULL, "sanity check");
   if (_cb->oop_maps() != NULL) {
     OopMapSet::oops_do(this, reg_map, f);
@@ -1058,21 +1058,9 @@
   // oops referenced from nmethods active on thread stacks so as to
   // prevent them from being collected. However, this visit should be
   // restricted to certain phases of the collection only. The
-  // closure answers whether it wants nmethods to be traced.
-  // (All CodeBlob subtypes other than NMethod currently have
-  // an empty oops_do() method.
-  if (f->do_nmethods()) {
-    _cb->oops_do(f);
-  }
-}
-
-void frame::nmethods_code_blob_do() {
-  assert(_cb != NULL, "sanity check");
-
-  // If we see an activation belonging to a non_entrant nmethod, we mark it.
-  if (_cb->is_nmethod() && ((nmethod *)_cb)->is_not_entrant()) {
-    ((nmethod*)_cb)->mark_as_seen_on_stack();
-  }
+  // closure decides how it wants nmethods to be traced.
+  if (cf != NULL)
+    cf->do_code_blob(_cb);
 }
 
 class CompiledArgumentOopFinder: public SignatureInfo {
@@ -1201,18 +1189,18 @@
 }
 
 
-void frame::oops_do_internal(OopClosure* f, RegisterMap* map, bool use_interpreter_oop_map_cache) {
+void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) {
          if (is_interpreted_frame())    { oops_interpreted_do(f, map, use_interpreter_oop_map_cache);
   } else if (is_entry_frame())          { oops_entry_do      (f, map);
-  } else if (CodeCache::contains(pc())) { oops_code_blob_do  (f, map);
+  } else if (CodeCache::contains(pc())) { oops_code_blob_do  (f, cf, map);
   } else {
     ShouldNotReachHere();
   }
 }
 
-void frame::nmethods_do() {
+void frame::nmethods_do(CodeBlobClosure* cf) {
   if (_cb != NULL && _cb->is_nmethod()) {
-    nmethods_code_blob_do();
+    cf->do_code_blob(_cb);
   }
 }
 
@@ -1358,7 +1346,7 @@
     }
   }
   COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), "must be empty before verify");)
-  oops_do_internal(&VerifyOopClosure::verify_oop, (RegisterMap*)map, false);
+  oops_do_internal(&VerifyOopClosure::verify_oop, NULL, (RegisterMap*)map, false);
 }
 
 
--- a/hotspot/src/share/vm/runtime/frame.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -384,16 +384,14 @@
   void oops_interpreted_arguments_do(symbolHandle signature, bool is_static, OopClosure* f);
 
   // Iteration of oops
-  void oops_do_internal(OopClosure* f, RegisterMap* map, bool use_interpreter_oop_map_cache);
+  void oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache);
   void oops_entry_do(OopClosure* f, const RegisterMap* map);
-  void oops_code_blob_do(OopClosure* f, const RegisterMap* map);
+  void oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* map);
   int adjust_offset(methodOop method, int index); // helper for above fn
-  // Iteration of nmethods
-  void nmethods_code_blob_do();
  public:
   // Memory management
-  void oops_do(OopClosure* f, RegisterMap* map) { oops_do_internal(f, map, true); }
-  void nmethods_do();
+  void oops_do(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cf, map, true); }
+  void nmethods_do(CodeBlobClosure* cf);
 
   void gc_prologue();
   void gc_epilogue();
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -714,6 +714,11 @@
   diagnostic(bool, TraceNMethodInstalls, false,                             \
              "Trace nmethod intallation")                                   \
                                                                             \
+  diagnostic(intx, ScavengeRootsInCode, 0,                                  \
+             "0: do not allow scavengable oops in the code cache; "         \
+             "1: allow scavenging from the code cache; "                    \
+             "2: emit as many constants as the compiler can see")           \
+                                                                            \
   diagnostic(bool, TraceOSRBreakpoint, false,                               \
              "Trace OSR Breakpoint ")                                       \
                                                                             \
--- a/hotspot/src/share/vm/runtime/sweeper.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,17 @@
 jint      NMethodSweeper::_not_entrant_seen_on_stack = 0;
 bool      NMethodSweeper::_rescan = false;
 
+class MarkActivationClosure: public CodeBlobClosure {
+public:
+  virtual void do_code_blob(CodeBlob* cb) {
+    // If we see an activation belonging to a non_entrant nmethod, we mark it.
+    if (cb->is_nmethod() && ((nmethod*)cb)->is_not_entrant()) {
+      ((nmethod*)cb)->mark_as_seen_on_stack();
+    }
+  }
+};
+static MarkActivationClosure mark_activation_closure;
+
 void NMethodSweeper::sweep() {
   assert(SafepointSynchronize::is_at_safepoint(), "must be executed at a safepoint");
   if (!MethodFlushing) return;
@@ -57,7 +68,7 @@
     if (PrintMethodFlushing) {
       tty->print_cr("### Sweep: stack traversal %d", _traversals);
     }
-    Threads::nmethods_do();
+    Threads::nmethods_do(&mark_activation_closure);
 
     // reset the flags since we started a scan from the beginning.
     _rescan = false;
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -683,14 +683,15 @@
   return false;
 }
 
-void Thread::oops_do(OopClosure* f) {
+void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   active_handles()->oops_do(f);
   // Do oop for ThreadShadow
   f->do_oop((oop*)&_pending_exception);
   handle_area()->oops_do(f);
 }
 
-void Thread::nmethods_do() {
+void Thread::nmethods_do(CodeBlobClosure* cf) {
+  // no nmethods in a generic thread...
 }
 
 void Thread::print_on(outputStream* st) const {
@@ -2316,12 +2317,12 @@
 }
 
 
-void JavaThread::oops_do(OopClosure* f) {
+void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   // The ThreadProfiler oops_do is done from FlatProfiler::oops_do
   // since there may be more than one thread using each ThreadProfiler.
 
   // Traverse the GCHandles
-  Thread::oops_do(f);
+  Thread::oops_do(f, cf);
 
   assert( (!has_last_Java_frame() && java_call_counter() == 0) ||
           (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!");
@@ -2347,7 +2348,7 @@
 
     // Traverse the execution stack
     for(StackFrameStream fst(this); !fst.is_done(); fst.next()) {
-      fst.current()->oops_do(f, fst.register_map());
+      fst.current()->oops_do(f, cf, fst.register_map());
     }
   }
 
@@ -2379,9 +2380,8 @@
   }
 }
 
-void JavaThread::nmethods_do() {
-  // Traverse the GCHandles
-  Thread::nmethods_do();
+void JavaThread::nmethods_do(CodeBlobClosure* cf) {
+  Thread::nmethods_do(cf);  // (super method is a no-op)
 
   assert( (!has_last_Java_frame() && java_call_counter() == 0) ||
           (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!");
@@ -2389,7 +2389,7 @@
   if (has_last_Java_frame()) {
     // Traverse the execution stack
     for(StackFrameStream fst(this); !fst.is_done(); fst.next()) {
-      fst.current()->nmethods_do();
+      fst.current()->nmethods_do(cf);
     }
   }
 }
@@ -2463,7 +2463,7 @@
 
 void JavaThread::verify() {
   // Verify oops in the thread.
-  oops_do(&VerifyOopClosure::verify_oop);
+  oops_do(&VerifyOopClosure::verify_oop, NULL);
 
   // Verify the stack frames.
   frames_do(frame_verify);
@@ -3602,14 +3602,14 @@
 // uses the Threads_lock to gurantee this property. It also makes sure that
 // all threads gets blocked when exiting or starting).
 
-void Threads::oops_do(OopClosure* f) {
+void Threads::oops_do(OopClosure* f, CodeBlobClosure* cf) {
   ALL_JAVA_THREADS(p) {
-    p->oops_do(f);
+    p->oops_do(f, cf);
   }
-  VMThread::vm_thread()->oops_do(f);
+  VMThread::vm_thread()->oops_do(f, cf);
 }
 
-void Threads::possibly_parallel_oops_do(OopClosure* f) {
+void Threads::possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf) {
   // Introduce a mechanism allowing parallel threads to claim threads as
   // root groups.  Overhead should be small enough to use all the time,
   // even in sequential code.
@@ -3618,12 +3618,12 @@
   int cp = SharedHeap::heap()->strong_roots_parity();
   ALL_JAVA_THREADS(p) {
     if (p->claim_oops_do(is_par, cp)) {
-      p->oops_do(f);
+      p->oops_do(f, cf);
     }
   }
   VMThread* vmt = VMThread::vm_thread();
   if (vmt->claim_oops_do(is_par, cp))
-    vmt->oops_do(f);
+    vmt->oops_do(f, cf);
 }
 
 #ifndef SERIALGC
@@ -3644,11 +3644,11 @@
 }
 #endif // SERIALGC
 
-void Threads::nmethods_do() {
+void Threads::nmethods_do(CodeBlobClosure* cf) {
   ALL_JAVA_THREADS(p) {
-    p->nmethods_do();
+    p->nmethods_do(cf);
   }
-  VMThread::vm_thread()->nmethods_do();
+  VMThread::vm_thread()->nmethods_do(cf);
 }
 
 void Threads::gc_epilogue() {
--- a/hotspot/src/share/vm/runtime/thread.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -374,7 +374,8 @@
 
   // GC support
   // Apply "f->do_oop" to all root oops in "this".
-  void oops_do(OopClosure* f);
+  // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
+  void oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   // Handles the parallel case for the method below.
 private:
@@ -398,7 +399,7 @@
   }
 
   // Sweeper support
-  void nmethods_do();
+  void nmethods_do(CodeBlobClosure* cf);
 
   // Tells if adr belong to this thread. This is used
   // for checking if a lock is owned by the running thread.
@@ -1229,10 +1230,10 @@
   void frames_do(void f(frame*, const RegisterMap*));
 
   // Memory operations
-  void oops_do(OopClosure* f);
+  void oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   // Sweeper operations
-  void nmethods_do();
+  void nmethods_do(CodeBlobClosure* cf);
 
   // Memory management operations
   void gc_epilogue();
@@ -1620,9 +1621,9 @@
 
   // Apply "f->do_oop" to all root oops in all threads.
   // This version may only be called by sequential code.
-  static void oops_do(OopClosure* f);
+  static void oops_do(OopClosure* f, CodeBlobClosure* cf);
   // This version may be called by sequential or parallel code.
-  static void possibly_parallel_oops_do(OopClosure* f);
+  static void possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf);
   // This creates a list of GCTasks, one per thread.
   static void create_thread_roots_tasks(GCTaskQueue* q);
   // This creates a list of GCTasks, one per thread, for marking objects.
@@ -1630,13 +1631,13 @@
 
   // Apply "f->do_oop" to roots in all threads that
   // are part of compiled frames
-  static void compiled_frame_oops_do(OopClosure* f);
+  static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   static void convert_hcode_pointers();
   static void restore_hcode_pointers();
 
   // Sweeper
-  static void nmethods_do();
+  static void nmethods_do(CodeBlobClosure* cf);
 
   static void gc_epilogue();
   static void gc_prologue();
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -549,6 +549,7 @@
   /********************************/                                                                                                 \
                                                                                                                                      \
      static_field(CodeCache,                   _heap,                                         CodeHeap*)                             \
+     static_field(CodeCache,                   _scavenge_root_nmethods,                       nmethod*)                              \
                                                                                                                                      \
   /*******************************/                                                                                                  \
   /* CodeHeap (NOTE: incomplete) */                                                                                                  \
@@ -618,7 +619,9 @@
      static_field(nmethod,             _zombie_instruction_size,                      int)                                   \
   nonstatic_field(nmethod,             _method,                                       methodOop)                             \
   nonstatic_field(nmethod,             _entry_bci,                                    int)                                   \
-  nonstatic_field(nmethod,             _link,                                         nmethod*)                              \
+  nonstatic_field(nmethod,             _osr_link,                                     nmethod*)                              \
+  nonstatic_field(nmethod,             _scavenge_root_link,                           nmethod*)                              \
+  nonstatic_field(nmethod,             _scavenge_root_state,                          jbyte)                                 \
   nonstatic_field(nmethod,             _exception_offset,                             int)                                   \
   nonstatic_field(nmethod,             _deoptimize_offset,                            int)                                   \
   nonstatic_field(nmethod,             _orig_pc_offset,                               int)                                   \
--- a/hotspot/src/share/vm/runtime/vmThread.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -619,8 +619,8 @@
 }
 
 
-void VMThread::oops_do(OopClosure* f) {
-  Thread::oops_do(f);
+void VMThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
+  Thread::oops_do(f, cf);
   _vm_queue->oops_do(f);
 }
 
@@ -652,5 +652,5 @@
 #endif
 
 void VMThread::verify() {
-  oops_do(&VerifyOopClosure::verify_oop);
+  oops_do(&VerifyOopClosure::verify_oop, NULL);
 }
--- a/hotspot/src/share/vm/runtime/vmThread.hpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/runtime/vmThread.hpp	Wed Jul 05 17:01:52 2017 +0200
@@ -121,7 +121,7 @@
   static VMThread* vm_thread()                    { return _vm_thread; }
 
   // GC support
-  void oops_do(OopClosure* f);
+  void oops_do(OopClosure* f, CodeBlobClosure* cf);
 
   // Debugging
   void print_on(outputStream* st) const;
--- a/hotspot/src/share/vm/utilities/debug.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -702,11 +702,14 @@
   tty->print_cr("Searching strong roots:");
   Universe::oops_do(&lookFor, false);
   JNIHandles::oops_do(&lookFor);   // Global (strong) JNI handles
-  Threads::oops_do(&lookFor);
+  Threads::oops_do(&lookFor, NULL);
   ObjectSynchronizer::oops_do(&lookFor);
   //FlatProfiler::oops_do(&lookFor);
   SystemDictionary::oops_do(&lookFor);
 
+  tty->print_cr("Searching code cache:");
+  CodeCache::oops_do(&lookFor);
+
   tty->print_cr("Done.");
 }
 
--- a/hotspot/test/compiler/6823453/Test.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/test/compiler/6823453/Test.java	Wed Jul 05 17:01:52 2017 +0200
@@ -26,7 +26,7 @@
  * @test
  * @bug 6823453
  * @summary DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
- * @run main/othervm -Xcomp -XX:CompileOnly=Test -XX:+DeoptimizeALot Test
+ * @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:CompileOnly=Test -XX:+DeoptimizeALot Test
  */
 
 public class Test {
--- a/hotspot/test/compiler/6833129/Test.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/hotspot/test/compiler/6833129/Test.java	Wed Jul 05 17:01:52 2017 +0200
@@ -25,7 +25,7 @@
  * @test
  * @bug 6833129
  * @summary Object.clone() and Arrays.copyOf ignore coping with -XX:+DeoptimizeALot
- * @run main/othervm -Xbatch -XX:+DeoptimizeALot Test
+ * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeALot Test
  */
 
 public class Test{
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6875866/Test.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6875866
+ * @summary Intrinsic for String.indexOf() is broken on x86 with SSE4.2
+ *
+ * @run main/othervm -Xcomp Test
+ */
+
+public class Test {
+
+  static int IndexOfTest(String str) {
+    return str.indexOf("11111xx1x");
+  }
+
+  public static void main(String args[]) {
+    String str = "11111xx11111xx1x";
+    int idx = IndexOfTest(str);
+    System.out.println("IndexOf = " + idx);
+    if (idx != 7) {
+      System.exit(97);
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6877254/Test.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6877254
+ * @summary Implement StoreCMNode::Ideal to promote its OopStore above the MergeMem
+ *
+ * @run main/othervm -server -Xcomp -XX:+UseConcMarkSweepGC Test
+ */
+
+public class Test {
+    static byte var_1;
+    static String var_2 = "";
+    static byte var_3;
+    static float var_4 = 0;
+
+    public static void main(String[] args) {
+        int i = 0;
+
+        for (String var_tmp = var_2; i < 11; var_1 = 0, i++) {
+            var_2 = var_2;
+            var_4 *= (var_4 *= (var_3 = 0));
+        }
+
+        System.out.println("var_1 = " + var_1);
+        System.out.println("var_2 = " + var_2);
+        System.out.println("var_3 = " + var_3);
+        System.out.println("var_4 = " + var_4);
+    }
+}
--- a/jaxp/.hgtags	Wed Oct 07 14:14:45 2009 -0700
+++ b/jaxp/.hgtags	Wed Jul 05 17:01:52 2017 +0200
@@ -47,3 +47,4 @@
 c83f0106b78a85c7e614d27a328675460b2081cf jdk7-b70
 ff94d8ce0daded647bb326630e643d010357afce jdk7-b71
 37c805b6156fd492c12301688b54a6bcca39e729 jdk7-b72
+feb05980f9f2964e6bc2b3a8532f9b3054c2289b jdk7-b73
--- a/jaxws/.hgtags	Wed Oct 07 14:14:45 2009 -0700
+++ b/jaxws/.hgtags	Wed Jul 05 17:01:52 2017 +0200
@@ -47,3 +47,4 @@
 dd3c5f3ec28d5d5e5c0dc3229fdd52d85d04274d jdk7-b70
 03314cf56a7212bbb6c186dbc9f15aca988a48ec jdk7-b71
 4c990aa99bc037fd81dd1b1b269690e9bea8a0b4 jdk7-b72
+558985e26fe16f5a6ebb2edb9180a42e1c8e8202 jdk7-b73
--- a/jdk/.hgtags	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/.hgtags	Wed Jul 05 17:01:52 2017 +0200
@@ -47,3 +47,4 @@
 893bcca951b747ddcf6986362b877f0e1dbb835b jdk7-b70
 b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71
 460639b036f327282832a4fe52b7aa45688afd50 jdk7-b72
+f708138c9aca4b389872838fe6773872fce3609e jdk7-b73
--- a/jdk/make/common/shared/Defs-java.gmk	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/common/shared/Defs-java.gmk	Wed Jul 05 17:01:52 2017 +0200
@@ -165,6 +165,11 @@
   JAVADOC_CMD   = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%)
 endif
 
+#always use the bootstrap javah until bug-ID 6889255 is fixed.  These
+#five lines should be removed as part of that fix:
+JAVAH_CMD     = $(JAVA_TOOLS_DIR)/javah \
+		  $(JAVAHFLAGS)
+
 # Override of what javac to use (see deploy workspace)
 ifdef JAVAC
   JAVAC_CMD     = $(JAVAC)
--- a/jdk/make/sun/awt/FILES_export_windows.gmk	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/awt/FILES_export_windows.gmk	Wed Jul 05 17:01:52 2017 +0200
@@ -1,249 +1,250 @@
-#
-# Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the LICENSE file that accompanied this code.
-#
-# This code 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
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-# FILES_export definitions for Win32
-
-FILES_export = \
-	java/awt/AlphaComposite.java \
-	java/awt/MouseInfo.java \
-        java/awt/Graphics.java \
-        java/awt/Color.java \
-        java/awt/Image.java \
-        java/awt/Rectangle.java \
-        java/awt/Event.java \
-        java/awt/Font.java \
-        java/awt/FontMetrics.java \
-        java/awt/Toolkit.java \
-        java/awt/Component.java \
-        java/awt/Container.java \
-        java/awt/Canvas.java \
-        java/awt/Button.java \
-        java/awt/List.java \
-	java/awt/Adjustable.java \
-        java/awt/Scrollbar.java \
-        java/awt/ScrollPane.java \
-        java/awt/ScrollPaneAdjustable.java \
-        java/awt/Transparency.java \
-	java/awt/Window.java \
-        java/awt/TextField.java \
-        java/awt/Label.java \
-        java/awt/Choice.java \
-        java/awt/TextComponent.java \
-        java/awt/TextArea.java \
-        java/awt/MenuBar.java \
-        java/awt/Menu.java \
-	java/awt/Dialog.java \
-	java/awt/FileDialog.java \
-        java/awt/MenuItem.java \
-	java/awt/MenuComponent.java \
-        java/awt/Checkbox.java \
-        java/awt/CheckboxGroup.java \
-        java/awt/CheckboxMenuItem.java \
-        java/awt/Frame.java \
-	java/awt/Insets.java \
-	java/awt/Cursor.java \
-	java/awt/Dimension.java \
-	java/awt/PopupMenu.java \
-        java/awt/AWTEvent.java \
-        java/awt/AWTException.java \
-        java/awt/AWTKeyStroke.java \
-        java/awt/KeyboardFocusManager.java \
-	java/awt/DisplayMode.java \
-        java/awt/TrayIcon.java \
-	java/awt/datatransfer/StringSelection.java \
-	java/awt/datatransfer/Transferable.java \
-	java/awt/dnd/DnDConstants.java \
-	java/awt/event/ActionEvent.java \
-	java/awt/event/AdjustmentEvent.java \
-	java/awt/event/ComponentEvent.java \
-	java/awt/event/FocusEvent.java \
-	java/awt/event/ItemEvent.java \
-	java/awt/event/InputEvent.java \
-	java/awt/event/InvocationEvent.java \
-	java/awt/event/KeyEvent.java \
-	java/awt/event/MouseEvent.java \
-	java/awt/event/MouseWheelEvent.java \
-	java/awt/event/WindowEvent.java \
-	java/awt/event/InputMethodEvent.java \
-	java/awt/im/InputMethodHighlight.java \
-	java/awt/im/spi/InputMethod.java \
-	java/awt/font/TextHitInfo.java \
-	java/text/AttributedCharacterIterator.java \
-	java/text/AttributedString.java \
-        java/awt/geom/PathIterator.java \
-	java/awt/image/AffineTransformOp.java \
-	java/awt/image/ImageConsumer.java \
-	java/awt/image/ImageObserver.java \
-        java/awt/image/BufferedImage.java \
-        java/awt/image/ColorModel.java \
-        java/awt/image/ConvolveOp.java \
-        java/awt/image/DirectColorModel.java \
-        java/awt/image/IndexColorModel.java \
-        java/awt/image/Raster.java \
-        java/awt/color/ColorSpace.java \
-        java/awt/color/ICC_Profile.java \
-	java/awt/peer/ComponentPeer.java \
-	java/awt/peer/MenuComponentPeer.java \
-        java/io/InputStream.java
-
-FILES_export2 = \
-	sun/awt/im/InputMethodContext.java \
-	sun/awt/EmbeddedFrame.java \
-	sun/awt/KeyboardFocusManagerPeerImpl.java \
-	sun/awt/windows/WEmbeddedFrame.java \
-	sun/awt/windows/WEmbeddedFramePeer.java \
-        sun/awt/Win32GraphicsEnvironment.java \
-        sun/awt/Win32GraphicsDevice.java \
-        sun/awt/Win32GraphicsConfig.java \
-        sun/java2d/SunGraphicsEnvironment.java \
-        sun/java2d/SunGraphics2D.java \
-        sun/java2d/SurfaceData.java \
-        sun/awt/image/IntegerComponentRaster.java \
-        sun/awt/image/ImagingLib.java \
-	sun/awt/image/BufImgSurfaceData.java \
-	sun/awt/image/DataBufferNative.java \
-        sun/awt/shell/Win32ShellFolder2.java \
-	sun/java2d/windows/GDIBlitLoops.java \
-	sun/java2d/windows/GDIRenderer.java \
-	sun/java2d/windows/GDIWindowSurfaceData.java \
-        sun/java2d/windows/WindowsFlags.java \
-	sun/java2d/loops/Blit.java \
-	sun/java2d/loops/BlitBg.java \
-	sun/java2d/loops/ScaledBlit.java \
-	sun/java2d/loops/FillRect.java \
-	sun/java2d/loops/FillSpans.java \
-        sun/java2d/loops/DrawGlyphList.java \
-        sun/java2d/loops/DrawGlyphListAA.java \
-        sun/java2d/loops/DrawGlyphListLCD.java \
-	sun/java2d/loops/DrawLine.java \
-	sun/java2d/loops/DrawRect.java \
-	sun/java2d/loops/DrawPolygons.java \
-        sun/java2d/loops/DrawPath.java \
-        sun/java2d/loops/FillPath.java \
-	sun/java2d/loops/MaskBlit.java \
-	sun/java2d/loops/MaskFill.java \
-	sun/java2d/loops/TransformHelper.java \
-	sun/java2d/loops/GraphicsPrimitiveMgr.java \
-        sun/java2d/loops/GraphicsPrimitive.java \
-        sun/java2d/cmm/CMSManager.java \
-        sun/java2d/cmm/PCMM.java \
-        sun/java2d/cmm/ColorTransform.java \
-        sun/awt/ScrollPaneWheelScroller.java \
-        sun/awt/datatransfer/DataTransferer.java \
-	sun/awt/datatransfer/SunClipboard.java \
-	sun/awt/dnd/SunDragSourceContextPeer.java \
-        sun/awt/windows/WToolkitThreadBlockedHandler.java
-
-FILES_export3 = \
-        java/awt/CheckboxMenuItem.java \
-        java/awt/Menu.java \
-	java/awt/MenuBar.java \
-	java/awt/MenuComponent.java \
-        java/awt/MenuItem.java \
-	sun/awt/PlatformFont.java \
-	sun/awt/FontDescriptor.java \
-	sun/awt/CharsetString.java \
-	java/awt/image/DataBuffer.java \
-        sun/awt/image/GifImageDecoder.java \
-	sun/awt/image/ImageRepresentation.java \
-	sun/awt/windows/WCustomCursor.java \
-	sun/awt/windows/WDefaultFontCharset.java \
-	sun/awt/windows/WButtonPeer.java \
-	sun/awt/windows/WCanvasPeer.java \
-	sun/awt/windows/WCheckboxPeer.java \
-	sun/awt/windows/WCheckboxMenuItemPeer.java \
-	sun/awt/windows/WChoicePeer.java \
-	sun/awt/windows/WClipboard.java \
-	sun/awt/windows/WColor.java \
-	sun/awt/windows/WDataTransferer.java \
-	sun/awt/windows/WDesktopPeer.java \
-	sun/awt/windows/WDesktopProperties.java \
-	sun/awt/windows/WDialogPeer.java \
-	sun/awt/windows/WDragSourceContextPeer.java \
-	sun/awt/windows/WDropTargetContextPeer.java \
-	sun/awt/windows/WFileDialogPeer.java \
-	sun/awt/windows/WFontPeer.java \
-	sun/awt/windows/WFontMetrics.java \
-	sun/awt/windows/WFramePeer.java \
-	sun/awt/windows/WGlobalCursorManager.java \
-	sun/awt/windows/WInputMethod.java \
-	sun/awt/windows/WInputMethodDescriptor.java \
-        sun/awt/windows/WComponentPeer.java \
-        sun/awt/windows/WLabelPeer.java \
-        sun/awt/windows/WListPeer.java \
-	sun/awt/windows/WMenuBarPeer.java \
-	sun/awt/windows/WMenuItemPeer.java \
-	sun/awt/windows/WMenuPeer.java \
-	sun/awt/windows/WObjectPeer.java \
-	sun/awt/windows/WPopupMenuPeer.java \
-	sun/awt/windows/WPrintDialog.java \
-	sun/awt/windows/WPrintDialogPeer.java \
-	sun/awt/windows/WPrinterJob.java \
-        sun/awt/windows/WRobotPeer.java \
-        sun/awt/windows/WScrollbarPeer.java \
-        sun/awt/windows/WScrollPanePeer.java \
-        sun/awt/windows/WTextAreaPeer.java \
-        sun/awt/windows/WTextComponentPeer.java \
-        sun/awt/windows/WTextFieldPeer.java \
-	sun/awt/windows/WPanelPeer.java \
-        sun/awt/windows/WToolkit.java \
-        sun/awt/windows/WWindowPeer.java \
-        sun/awt/windows/ThemeReader.java \
-	sun/awt/windows/WBufferStrategy.java \
-	sun/awt/windows/WTrayIconPeer.java \
-	sun/awt/image/ImagingLib.java \
-	sun/awt/ExtendedKeyCodes.java \
-        sun/java2d/pipe/hw/AccelSurface.java \
-        sun/java2d/pipe/hw/AccelDeviceEventNotifier.java \
-        sun/java2d/pipe/hw/ContextCapabilities.java \
-        sun/java2d/pipe/BufferedContext.java \
-        sun/java2d/pipe/BufferedMaskBlit.java \
-        sun/java2d/pipe/BufferedOpCodes.java \
-        sun/java2d/pipe/BufferedPaints.java \
-        sun/java2d/pipe/BufferedRenderPipe.java \
-        sun/java2d/pipe/BufferedTextPipe.java \
-        sun/java2d/pipe/RenderBuffer.java \
-	sun/java2d/pipe/ShapeSpanIterator.java \
-	sun/java2d/pipe/SpanClipRenderer.java \
-	sun/java2d/pipe/RegionIterator.java \
-	sun/java2d/opengl/OGLBlitLoops.java \
-	sun/java2d/opengl/OGLContext.java \
-	sun/java2d/opengl/OGLMaskFill.java \
-	sun/java2d/opengl/OGLPaints.java \
-	sun/java2d/opengl/OGLRenderQueue.java \
-	sun/java2d/opengl/OGLRenderer.java \
-	sun/java2d/opengl/OGLSurfaceData.java \
-	sun/java2d/opengl/OGLTextRenderer.java \
-	sun/java2d/opengl/WGLGraphicsConfig.java \
-	sun/java2d/opengl/WGLSurfaceData.java \
-	sun/java2d/d3d/D3DBlitLoops.java \
-	sun/java2d/d3d/D3DGraphicsDevice.java \
-	sun/java2d/d3d/D3DSurfaceData.java \
-	sun/java2d/d3d/D3DMaskFill.java \
-	sun/java2d/d3d/D3DPaints.java \
-	sun/java2d/d3d/D3DRenderQueue.java \
-	sun/java2d/d3d/D3DRenderer.java \
-	sun/java2d/d3d/D3DTextRenderer.java \
-	sun/java2d/d3d/D3DContext.java
+#
+# Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code 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
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# FILES_export definitions for Win32
+
+FILES_export = \
+	java/awt/AlphaComposite.java \
+	java/awt/MouseInfo.java \
+        java/awt/Graphics.java \
+        java/awt/Color.java \
+        java/awt/Image.java \
+        java/awt/Rectangle.java \
+        java/awt/Event.java \
+        java/awt/Font.java \
+        java/awt/FontMetrics.java \
+        java/awt/Toolkit.java \
+        java/awt/Component.java \
+        java/awt/Container.java \
+        java/awt/Canvas.java \
+        java/awt/Button.java \
+        java/awt/List.java \
+	java/awt/Adjustable.java \
+        java/awt/Scrollbar.java \
+        java/awt/ScrollPane.java \
+        java/awt/ScrollPaneAdjustable.java \
+        java/awt/Transparency.java \
+	java/awt/Window.java \
+        java/awt/TextField.java \
+        java/awt/Label.java \
+        java/awt/Choice.java \
+        java/awt/TextComponent.java \
+        java/awt/TextArea.java \
+        java/awt/MenuBar.java \
+        java/awt/Menu.java \
+	java/awt/Dialog.java \
+	java/awt/FileDialog.java \
+        java/awt/MenuItem.java \
+	java/awt/MenuComponent.java \
+        java/awt/Checkbox.java \
+        java/awt/CheckboxGroup.java \
+        java/awt/CheckboxMenuItem.java \
+        java/awt/Frame.java \
+	java/awt/Insets.java \
+	java/awt/Cursor.java \
+	java/awt/Dimension.java \
+	java/awt/PopupMenu.java \
+        java/awt/AWTEvent.java \
+        java/awt/AWTException.java \
+        java/awt/AWTKeyStroke.java \
+        java/awt/KeyboardFocusManager.java \
+	java/awt/DisplayMode.java \
+        java/awt/TrayIcon.java \
+	java/awt/datatransfer/StringSelection.java \
+	java/awt/datatransfer/Transferable.java \
+	java/awt/dnd/DnDConstants.java \
+	java/awt/event/ActionEvent.java \
+	java/awt/event/AdjustmentEvent.java \
+	java/awt/event/ComponentEvent.java \
+	java/awt/event/FocusEvent.java \
+	java/awt/event/ItemEvent.java \
+	java/awt/event/InputEvent.java \
+	java/awt/event/InvocationEvent.java \
+	java/awt/event/KeyEvent.java \
+	java/awt/event/MouseEvent.java \
+	java/awt/event/MouseWheelEvent.java \
+	java/awt/event/WindowEvent.java \
+	java/awt/event/InputMethodEvent.java \
+	java/awt/im/InputMethodHighlight.java \
+	java/awt/im/spi/InputMethod.java \
+	java/awt/font/TextHitInfo.java \
+	java/text/AttributedCharacterIterator.java \
+	java/text/AttributedString.java \
+        java/awt/geom/PathIterator.java \
+	java/awt/image/AffineTransformOp.java \
+	java/awt/image/ImageConsumer.java \
+	java/awt/image/ImageObserver.java \
+        java/awt/image/BufferedImage.java \
+        java/awt/image/ColorModel.java \
+        java/awt/image/ConvolveOp.java \
+        java/awt/image/DirectColorModel.java \
+        java/awt/image/IndexColorModel.java \
+        java/awt/image/Raster.java \
+        java/awt/color/ColorSpace.java \
+        java/awt/color/ICC_Profile.java \
+	java/awt/peer/ComponentPeer.java \
+	java/awt/peer/MenuComponentPeer.java \
+        java/io/InputStream.java
+
+FILES_export2 = \
+	sun/awt/im/InputMethodContext.java \
+	sun/awt/EmbeddedFrame.java \
+	sun/awt/KeyboardFocusManagerPeerImpl.java \
+	sun/awt/windows/WEmbeddedFrame.java \
+	sun/awt/windows/WEmbeddedFramePeer.java \
+	sun/awt/Win32FontManager.java \
+        sun/awt/Win32GraphicsEnvironment.java \
+        sun/awt/Win32GraphicsDevice.java \
+        sun/awt/Win32GraphicsConfig.java \
+        sun/java2d/SunGraphicsEnvironment.java \
+        sun/java2d/SunGraphics2D.java \
+        sun/java2d/SurfaceData.java \
+        sun/awt/image/IntegerComponentRaster.java \
+        sun/awt/image/ImagingLib.java \
+	sun/awt/image/BufImgSurfaceData.java \
+	sun/awt/image/DataBufferNative.java \
+        sun/awt/shell/Win32ShellFolder2.java \
+	sun/java2d/windows/GDIBlitLoops.java \
+	sun/java2d/windows/GDIRenderer.java \
+	sun/java2d/windows/GDIWindowSurfaceData.java \
+        sun/java2d/windows/WindowsFlags.java \
+	sun/java2d/loops/Blit.java \
+	sun/java2d/loops/BlitBg.java \
+	sun/java2d/loops/ScaledBlit.java \
+	sun/java2d/loops/FillRect.java \
+	sun/java2d/loops/FillSpans.java \
+        sun/java2d/loops/DrawGlyphList.java \
+        sun/java2d/loops/DrawGlyphListAA.java \
+        sun/java2d/loops/DrawGlyphListLCD.java \
+	sun/java2d/loops/DrawLine.java \
+	sun/java2d/loops/DrawRect.java \
+	sun/java2d/loops/DrawPolygons.java \
+        sun/java2d/loops/DrawPath.java \
+        sun/java2d/loops/FillPath.java \
+	sun/java2d/loops/MaskBlit.java \
+	sun/java2d/loops/MaskFill.java \
+	sun/java2d/loops/TransformHelper.java \
+	sun/java2d/loops/GraphicsPrimitiveMgr.java \
+        sun/java2d/loops/GraphicsPrimitive.java \
+        sun/java2d/cmm/CMSManager.java \
+        sun/java2d/cmm/PCMM.java \
+        sun/java2d/cmm/ColorTransform.java \
+        sun/awt/ScrollPaneWheelScroller.java \
+        sun/awt/datatransfer/DataTransferer.java \
+	sun/awt/datatransfer/SunClipboard.java \
+	sun/awt/dnd/SunDragSourceContextPeer.java \
+        sun/awt/windows/WToolkitThreadBlockedHandler.java
+
+FILES_export3 = \
+        java/awt/CheckboxMenuItem.java \
+        java/awt/Menu.java \
+	java/awt/MenuBar.java \
+	java/awt/MenuComponent.java \
+        java/awt/MenuItem.java \
+	sun/awt/PlatformFont.java \
+	sun/awt/FontDescriptor.java \
+	sun/awt/CharsetString.java \
+	java/awt/image/DataBuffer.java \
+        sun/awt/image/GifImageDecoder.java \
+	sun/awt/image/ImageRepresentation.java \
+	sun/awt/windows/WCustomCursor.java \
+	sun/awt/windows/WDefaultFontCharset.java \
+	sun/awt/windows/WButtonPeer.java \
+	sun/awt/windows/WCanvasPeer.java \
+	sun/awt/windows/WCheckboxPeer.java \
+	sun/awt/windows/WCheckboxMenuItemPeer.java \
+	sun/awt/windows/WChoicePeer.java \
+	sun/awt/windows/WClipboard.java \
+	sun/awt/windows/WColor.java \
+	sun/awt/windows/WDataTransferer.java \
+	sun/awt/windows/WDesktopPeer.java \
+	sun/awt/windows/WDesktopProperties.java \
+	sun/awt/windows/WDialogPeer.java \
+	sun/awt/windows/WDragSourceContextPeer.java \
+	sun/awt/windows/WDropTargetContextPeer.java \
+	sun/awt/windows/WFileDialogPeer.java \
+	sun/awt/windows/WFontPeer.java \
+	sun/awt/windows/WFontMetrics.java \
+	sun/awt/windows/WFramePeer.java \
+	sun/awt/windows/WGlobalCursorManager.java \
+	sun/awt/windows/WInputMethod.java \
+	sun/awt/windows/WInputMethodDescriptor.java \
+        sun/awt/windows/WComponentPeer.java \
+        sun/awt/windows/WLabelPeer.java \
+        sun/awt/windows/WListPeer.java \
+	sun/awt/windows/WMenuBarPeer.java \
+	sun/awt/windows/WMenuItemPeer.java \
+	sun/awt/windows/WMenuPeer.java \
+	sun/awt/windows/WObjectPeer.java \
+	sun/awt/windows/WPopupMenuPeer.java \
+	sun/awt/windows/WPrintDialog.java \
+	sun/awt/windows/WPrintDialogPeer.java \
+	sun/awt/windows/WPrinterJob.java \
+        sun/awt/windows/WRobotPeer.java \
+        sun/awt/windows/WScrollbarPeer.java \
+        sun/awt/windows/WScrollPanePeer.java \
+        sun/awt/windows/WTextAreaPeer.java \
+        sun/awt/windows/WTextComponentPeer.java \
+        sun/awt/windows/WTextFieldPeer.java \
+	sun/awt/windows/WPanelPeer.java \
+        sun/awt/windows/WToolkit.java \
+        sun/awt/windows/WWindowPeer.java \
+        sun/awt/windows/ThemeReader.java \
+	sun/awt/windows/WBufferStrategy.java \
+	sun/awt/windows/WTrayIconPeer.java \
+	sun/awt/image/ImagingLib.java \
+	sun/awt/ExtendedKeyCodes.java \
+        sun/java2d/pipe/hw/AccelSurface.java \
+        sun/java2d/pipe/hw/AccelDeviceEventNotifier.java \
+        sun/java2d/pipe/hw/ContextCapabilities.java \
+        sun/java2d/pipe/BufferedContext.java \
+        sun/java2d/pipe/BufferedMaskBlit.java \
+        sun/java2d/pipe/BufferedOpCodes.java \
+        sun/java2d/pipe/BufferedPaints.java \
+        sun/java2d/pipe/BufferedRenderPipe.java \
+        sun/java2d/pipe/BufferedTextPipe.java \
+        sun/java2d/pipe/RenderBuffer.java \
+	sun/java2d/pipe/ShapeSpanIterator.java \
+	sun/java2d/pipe/SpanClipRenderer.java \
+	sun/java2d/pipe/RegionIterator.java \
+	sun/java2d/opengl/OGLBlitLoops.java \
+	sun/java2d/opengl/OGLContext.java \
+	sun/java2d/opengl/OGLMaskFill.java \
+	sun/java2d/opengl/OGLPaints.java \
+	sun/java2d/opengl/OGLRenderQueue.java \
+	sun/java2d/opengl/OGLRenderer.java \
+	sun/java2d/opengl/OGLSurfaceData.java \
+	sun/java2d/opengl/OGLTextRenderer.java \
+	sun/java2d/opengl/WGLGraphicsConfig.java \
+	sun/java2d/opengl/WGLSurfaceData.java \
+	sun/java2d/d3d/D3DBlitLoops.java \
+	sun/java2d/d3d/D3DGraphicsDevice.java \
+	sun/java2d/d3d/D3DSurfaceData.java \
+	sun/java2d/d3d/D3DMaskFill.java \
+	sun/java2d/d3d/D3DPaints.java \
+	sun/java2d/d3d/D3DRenderQueue.java \
+	sun/java2d/d3d/D3DRenderer.java \
+	sun/java2d/d3d/D3DTextRenderer.java \
+	sun/java2d/d3d/D3DContext.java
--- a/jdk/make/sun/awt/make.depend	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/awt/make.depend	Wed Jul 05 17:01:52 2017 +0200
@@ -1,351 +1,351 @@
-$(OBJDIR)/AccelGlyphCache.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/AlphaMacros.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AlphaMath.obj::	../../../src/share/native/sun/java2d/loops/AlphaMath.h
-
-$(OBJDIR)/Any3Byte.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Any4Byte.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AnyByte.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AnyInt.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AnyShort.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/awt_AWTEvent.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_BitmapUtil.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Brush.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Button.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Button.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WButtonPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Button.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Canvas.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Checkbox.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Checkbox.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Checkbox.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Choice.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Choice.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WChoicePeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Choice.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Clipboard.obj::	$(CLASSHDRDIR)/sun_awt_windows_WClipboard.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Color.obj::	$(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Component.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Container.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Cursor.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Cursor.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCustomCursor.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WGlobalCursorManager.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DataTransferer.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_datatransfer_DataTransferer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDataTransferer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Debug.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Desktop.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DesktopProperties.obj::	$(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_windows_WDesktopProperties.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Dialog.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Dimension.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DnDDS.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_dnd_SunDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DnDDT.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDropTargetContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DrawingSurface.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Event.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_FileDialog.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Font.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDefaultFontCharset.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFontPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Frame.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/java_lang_Integer.h $(CLASSHDRDIR)/sun_awt_EmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_GDIObject.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_IconCursor.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_ImageRep.obj::	$(CLASSHDRDIR)/sun_awt_image_ImageRepresentation.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/awt_ImagingLib.obj::	$(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_image_ConvolveOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
-
-$(OBJDIR)/awt_InputEvent.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_InputMethod.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethodDescriptor.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_InputTextInfor.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Insets.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_KeyboardFocusManager.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_KeyEvent.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Label.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Label.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WLabelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Label.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_List.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_MenuBar.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_MenuItem.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_CheckboxMenuItem.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Menu.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Mlib.obj::	$(CLASSHDRDIR)/java_awt_image_BufferedImage.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Mlib.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_MouseEvent.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_new.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Object.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Palette.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_CustomPaletteDef.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Panel.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_parseImage.obj::	$(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
-
-$(OBJDIR)/awt_Pen.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PopupMenu.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PrintControl.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PrintDialog.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialog.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PrintJob.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrinterJob.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Rectangle.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Rectangle.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Robot.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WRobotPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Robot.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Scrollbar.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_ScrollPane.obj::	$(CLASSHDRDIR)/java_awt_Adjustable.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_AdjustmentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_ScrollPaneAdjustable.h $(CLASSHDRDIR)/java_awt_ScrollPane.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollPanePeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_ScrollPane.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TextArea.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextArea.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextAreaPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextArea.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TextComponent.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TextField.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_TextField.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextFieldPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_TextField.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Toolkit.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_ComponentPeer.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TrayIcon.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ActionEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TrayIcon.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WTrayIconPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_TrayIcon.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Win32GraphicsConfig.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsConfig.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Win32GraphicsDevice.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsDevice.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Win32GraphicsEnv.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsEnvironment.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Window.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/BlitBg.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_BlitBg.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Blit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/BufferedMaskBlit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedMaskBlit.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/BufferedRenderPipe.obj::	$(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/BufImgSurfaceData.obj::	$(CLASSHDRDIR)/sun_awt_image_BufImgSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/BufImgSurfaceData.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/img_util_md.h
-
-$(OBJDIR)/ByteBinary1Bit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary1Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteBinary2Bit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary2Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteBinary4Bit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary4Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteGray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteIndexed.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/CmdIDList.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/ComCtl32Util.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DBlitLoops.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DBufImgOps.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DContext.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DShaders.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DGlyphCache.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DGraphicsDevice.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DGraphicsDevice.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DMaskBlit.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DMaskCache.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DMaskFill.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DMaskFill.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DPaints.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DPipelineManager.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBadHardware.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DRenderer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DRenderQueue.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DResourceManager.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DTextRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DVertexCacher.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/DataBufferNative.obj::	$(CLASSHDRDIR)/sun_awt_image_DataBufferNative.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_assert.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_mem.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_trace.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_util.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/Devices.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/Disposer.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/dither.obj::	../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/windows/native/sun/windows/colordata.h
-
-$(OBJDIR)/DllUtil.obj::	../../../src/windows/native/sun/windows/DllUtil.h
-
-$(OBJDIR)/DrawLine.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawLine.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/DrawPath.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/DrawPolygons.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPolygons.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/DrawRect.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FillPath.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FillRect.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FillSpans.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillSpans.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FourByteAbgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgr.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FourByteAbgrPre.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgrPre.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/GDIBlitLoops.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIBlitLoops.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/GDIHashtable.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/GDIRenderer.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/GDIWindowSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/gifdecoder.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/GraphicsPrimitiveMgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Hashtable.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/imageInitIDs.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/img_colors.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/img_globals.obj::	$(CLASSHDRDIR)/java_awt_image_DirectColorModel.h $(CLASSHDRDIR)/java_awt_image_IndexColorModel.h $(CLASSHDRDIR)/java_awt_Transparency.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/windows/javavm/export/jni_md.h
-
-$(OBJDIR)/Index12Gray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Index8Gray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/initIDs.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/IntArgbBm.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntArgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntArgbPre.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntBgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntRgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntRgbx.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/IntRgbx.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/MaskBlit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/MaskFill.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskFill.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/MouseInfo.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/ObjectList.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/OGLBlitLoops.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLBufImgOps.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLContext.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLFuncs.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLMaskBlit.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLMaskFill.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLMaskFill.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLPaints.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedPaints.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLRenderer.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLRenderQueue.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLTextRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLVertexCache.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/ProcessPath.obj::	$(CLASSHDRDIR)/java_awt_geom_PathIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Region.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/RenderBuffer.obj::	$(CLASSHDRDIR)/sun_java2d_pipe_RenderBuffer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/ScaledBlit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_ScaledBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ShapeSpanIterator.obj::	$(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_ShapeSpanIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/PathConsumer2D.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ShellFolder2.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/SpanClipRenderer.obj::	$(CLASSHDRDIR)/sun_java2d_pipe_RegionIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_SpanClipRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/SurfaceData.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/ThemeReader.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_ThemeReader.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/ThreeByteBgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Trace.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/TransformHelper.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort4444Argb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort555Rgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort555Rgbx.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgbx.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort565Rgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/UshortGray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/UshortIndexed.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/loops/UshortIndexed.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/WGLGraphicsConfig.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLGraphicsConfig.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
-
-$(OBJDIR)/WGLSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
-
-$(OBJDIR)/WindowsFlags.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/WPrinterJob.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+$(OBJDIR)/AccelGlyphCache.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/AlphaMacros.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AlphaMath.obj::	../../../src/share/native/sun/java2d/loops/AlphaMath.h
+
+$(OBJDIR)/Any3Byte.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Any4Byte.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AnyByte.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AnyInt.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AnyShort.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/awt_AWTEvent.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_BitmapUtil.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Brush.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Button.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Button.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WButtonPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Button.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Canvas.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Checkbox.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Checkbox.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Checkbox.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Choice.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Choice.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WChoicePeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Choice.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Clipboard.obj::	$(CLASSHDRDIR)/sun_awt_windows_WClipboard.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Color.obj::	$(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Component.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Container.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Cursor.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Cursor.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCustomCursor.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WGlobalCursorManager.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DataTransferer.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_datatransfer_DataTransferer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDataTransferer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Debug.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Desktop.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DesktopProperties.obj::	$(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_windows_WDesktopProperties.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Dialog.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Dimension.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DnDDS.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_dnd_SunDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DnDDT.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDropTargetContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DrawingSurface.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Event.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_FileDialog.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Font.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDefaultFontCharset.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFontPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Frame.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/java_lang_Integer.h $(CLASSHDRDIR)/sun_awt_EmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_GDIObject.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_IconCursor.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_ImageRep.obj::	$(CLASSHDRDIR)/sun_awt_image_ImageRepresentation.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/awt_ImagingLib.obj::	$(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_image_ConvolveOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
+
+$(OBJDIR)/awt_InputEvent.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_InputMethod.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethodDescriptor.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_InputTextInfor.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Insets.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_KeyboardFocusManager.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_KeyEvent.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Label.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Label.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WLabelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Label.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_List.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_MenuBar.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_MenuItem.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_CheckboxMenuItem.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Menu.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Mlib.obj::	$(CLASSHDRDIR)/java_awt_image_BufferedImage.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Mlib.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_MouseEvent.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_new.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Object.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Palette.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_CustomPaletteDef.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Panel.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_parseImage.obj::	$(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
+
+$(OBJDIR)/awt_Pen.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PopupMenu.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PrintControl.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PrintDialog.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialog.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PrintJob.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrinterJob.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Rectangle.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Rectangle.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Robot.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WRobotPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Robot.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Scrollbar.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_ScrollPane.obj::	$(CLASSHDRDIR)/java_awt_Adjustable.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_AdjustmentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_ScrollPaneAdjustable.h $(CLASSHDRDIR)/java_awt_ScrollPane.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollPanePeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_ScrollPane.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TextArea.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextArea.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextAreaPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextArea.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TextComponent.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TextField.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_TextField.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextFieldPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_TextField.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Toolkit.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_ComponentPeer.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TrayIcon.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ActionEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TrayIcon.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WTrayIconPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_TrayIcon.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Win32GraphicsConfig.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsConfig.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Win32GraphicsDevice.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsDevice.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Win32GraphicsEnv.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsEnvironment.h $(CLASSHDRDIR)/sun_awt_Win32FontManager.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Window.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/BlitBg.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_BlitBg.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Blit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/BufferedMaskBlit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedMaskBlit.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/BufferedRenderPipe.obj::	$(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/BufImgSurfaceData.obj::	$(CLASSHDRDIR)/sun_awt_image_BufImgSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/BufImgSurfaceData.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/img_util_md.h
+
+$(OBJDIR)/ByteBinary1Bit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary1Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteBinary2Bit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary2Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteBinary4Bit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary4Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteGray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteIndexed.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/CmdIDList.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/ComCtl32Util.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DBlitLoops.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DBufImgOps.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DContext.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DShaders.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DGlyphCache.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DGraphicsDevice.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DGraphicsDevice.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DMaskBlit.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DMaskCache.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DMaskFill.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DMaskFill.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DPaints.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DPipelineManager.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBadHardware.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DRenderer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DRenderQueue.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DResourceManager.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DTextRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DVertexCacher.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/DataBufferNative.obj::	$(CLASSHDRDIR)/sun_awt_image_DataBufferNative.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_assert.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_mem.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_trace.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_util.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/Devices.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/Disposer.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/dither.obj::	../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/windows/native/sun/windows/colordata.h
+
+$(OBJDIR)/DllUtil.obj::	../../../src/windows/native/sun/windows/DllUtil.h
+
+$(OBJDIR)/DrawLine.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawLine.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/DrawPath.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/DrawPolygons.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPolygons.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/DrawRect.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FillPath.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FillRect.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FillSpans.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillSpans.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FourByteAbgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgr.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FourByteAbgrPre.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgrPre.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/GDIBlitLoops.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIBlitLoops.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/GDIHashtable.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/GDIRenderer.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/GDIWindowSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/gifdecoder.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/GraphicsPrimitiveMgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Hashtable.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/imageInitIDs.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/img_colors.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/img_globals.obj::	$(CLASSHDRDIR)/java_awt_image_DirectColorModel.h $(CLASSHDRDIR)/java_awt_image_IndexColorModel.h $(CLASSHDRDIR)/java_awt_Transparency.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/windows/javavm/export/jni_md.h
+
+$(OBJDIR)/Index12Gray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Index8Gray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/initIDs.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/IntArgbBm.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntArgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntArgbPre.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntBgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntRgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntRgbx.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/IntRgbx.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/MaskBlit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/MaskFill.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskFill.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/MouseInfo.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/ObjectList.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/OGLBlitLoops.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLBufImgOps.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLContext.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLFuncs.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLMaskBlit.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLMaskFill.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLMaskFill.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLPaints.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedPaints.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLRenderer.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLRenderQueue.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLTextRenderer.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLVertexCache.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/ProcessPath.obj::	$(CLASSHDRDIR)/java_awt_geom_PathIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Region.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/RenderBuffer.obj::	$(CLASSHDRDIR)/sun_java2d_pipe_RenderBuffer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/ScaledBlit.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_ScaledBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ShapeSpanIterator.obj::	$(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_ShapeSpanIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/PathConsumer2D.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ShellFolder2.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/SpanClipRenderer.obj::	$(CLASSHDRDIR)/sun_java2d_pipe_RegionIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_SpanClipRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/SurfaceData.obj::	../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/ThemeReader.obj::	$(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_ThemeReader.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/ThreeByteBgr.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Trace.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/TransformHelper.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort4444Argb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort555Rgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort555Rgbx.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgbx.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort565Rgb.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/UshortGray.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/UshortIndexed.obj::	$(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/loops/UshortIndexed.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/WGLGraphicsConfig.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLGraphicsConfig.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
+
+$(OBJDIR)/WGLSurfaceData.obj::	$(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
+
+$(OBJDIR)/WindowsFlags.obj::	../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/WPrinterJob.obj::	$(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
--- a/jdk/make/sun/awt/mapfile-mawt-vers	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/awt/mapfile-mawt-vers	Wed Jul 05 17:01:52 2017 +0200
@@ -477,11 +477,11 @@
 
 		X11SurfaceData_GetOps;
 		getDefaultConfig;
-                Java_sun_font_FontManager_getFontConfig;
-                Java_sun_font_FontManager_getFontConfigAASettings;
-		Java_sun_font_FontManager_getFontPath;
-		Java_sun_font_FontManager_setNativeFontPath;
-		Java_sun_font_FontManager_populateFontFileNameMap;
+                Java_sun_font_FontConfigManager_getFontConfig;
+                Java_sun_font_FontConfigManager_getFontConfigAASettings;
+		Java_sun_awt_X11FontManager_getFontPath;
+		Java_sun_awt_X11FontManager_setNativeFontPath;
+		Java_sun_font_SunFontManager_populateFontFileNameMap;
 
 		# CDE private entry point
 		Java_sun_awt_motif_XsessionWMcommand;
--- a/jdk/make/sun/awt/mapfile-vers-linux	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/awt/mapfile-vers-linux	Wed Jul 05 17:01:52 2017 +0200
@@ -533,11 +533,11 @@
 
 		X11SurfaceData_GetOps;
 		getDefaultConfig;
-                Java_sun_font_FontManager_getFontConfig;
-                Java_sun_font_FontManager_getFontConfigAASettings;
-		Java_sun_font_FontManager_getFontPath;
-		Java_sun_font_FontManager_setNativeFontPath;
-		Java_sun_font_FontManager_populateFontFileNameMap;
+                Java_sun_font_FontConfigManager_getFontConfig;
+                Java_sun_font_FontConfigManager_getFontConfigAASettings;
+		Java_sun_awt_X11FontManager_getFontPath;
+		Java_sun_awt_X11FontManager_setNativeFontPath;
+		Java_sun_font_SunFontManager_populateFontFileNameMap;
 
 		# CDE private entry point
 		Java_sun_awt_motif_XsessionWMcommand;
--- a/jdk/make/sun/font/Makefile	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/font/Makefile	Wed Jul 05 17:01:52 2017 +0200
@@ -199,3 +199,7 @@
 CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows
 endif
 
+# Make the Layout Engine build standalone
+CPPFLAGS += -DLE_STANDALONE
+
+
--- a/jdk/make/sun/font/mapfile-vers	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/font/mapfile-vers	Wed Jul 05 17:01:52 2017 +0200
@@ -33,12 +33,7 @@
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
                 Java_sun_font_NullFontScaler_getGlyphImage;
-                Java_sun_font_FontManager_getPlatformFontVar;
-                Java_sun_font_FontManager_initIDs;
-                Java_sun_font_FontManager_getFont2D;
-                Java_sun_font_FontManager_setFont2D;
-                Java_sun_font_FontManager_isCreatedFont;
-                Java_sun_font_FontManager_setCreatedFont;
+                Java_sun_font_SunFontManager_initIDs;
                 Java_sun_font_StrikeCache_getGlyphCacheDescription;
                 Java_sun_font_StrikeCache_freeIntPointer;
                 Java_sun_font_StrikeCache_freeLongPointer;
--- a/jdk/make/sun/font/mapfile-vers.openjdk	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/font/mapfile-vers.openjdk	Wed Jul 05 17:01:52 2017 +0200
@@ -35,12 +35,7 @@
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
                 Java_sun_font_NullFontScaler_getGlyphImage;
-                Java_sun_font_FontManager_getPlatformFontVar;
-                Java_sun_font_FontManager_initIDs;
-                Java_sun_font_FontManager_getFont2D;
-                Java_sun_font_FontManager_setFont2D;
-                Java_sun_font_FontManager_isCreatedFont;
-                Java_sun_font_FontManager_setCreatedFont;
+                Java_sun_font_SunFontManager_initIDs;
                 Java_sun_font_StrikeCache_getGlyphCacheDescription;
                 Java_sun_font_StrikeCache_freeIntPointer;
                 Java_sun_font_StrikeCache_freeLongPointer;
--- a/jdk/make/sun/headless/mapfile-vers	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/headless/mapfile-vers	Wed Jul 05 17:01:52 2017 +0200
@@ -59,12 +59,10 @@
 
 		X11SurfaceData_GetOps;
 		Java_java_awt_Font_initIDs;
-                Java_sun_font_FontManager_getFontConfig;
-                Java_sun_font_FontManager_getFontConfigVersion;
-                Java_sun_font_FontManager_getFontConfigAASettings;
-		Java_sun_font_FontManager_getFontPath;
-		Java_sun_font_FontManager_setNativeFontPath;
-		Java_sun_font_FontManager_populateFontFileNameMap;
+                Java_sun_font_FontConfigManager_getFontConfig;
+                Java_sun_font_FontConfigManager_getFontConfigAASettings;
+                Java_sun_font_FontConfigManager_getFontConfigVersion;
+		Java_sun_awt_X11FontManager_getFontPath;
 
 		Java_sun_awt_FontDescriptor_initIDs;
 		Java_sun_awt_PlatformFont_initIDs;
--- a/jdk/make/sun/jkernel/Makefile	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/jkernel/Makefile	Wed Jul 05 17:01:52 2017 +0200
@@ -35,10 +35,6 @@
 #
 _OPT = $(CC_HIGHEST_OPT)
 
-# This re-directs all the class files to a separate location
-CLASSDESTDIR = $(TEMPDIR)/classes
-
-
 #
 # Java source files
 #
--- a/jdk/make/sun/xawt/mapfile-vers	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/make/sun/xawt/mapfile-vers	Wed Jul 05 17:01:52 2017 +0200
@@ -182,12 +182,11 @@
         Java_java_awt_ScrollPane_initIDs;
         Java_java_awt_TextField_initIDs;
         Java_java_awt_TrayIcon_initIDs;
-        Java_sun_font_FontManager_getFontConfig;
-        Java_sun_font_FontManager_getFontConfigVersion;
-        Java_sun_font_FontManager_getFontConfigAASettings;
-	Java_sun_font_FontManager_getFontPath;
-	Java_sun_font_FontManager_setNativeFontPath;
-	Java_sun_font_FontManager_populateFontFileNameMap;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_font_FontConfigManager_getFontConfigVersion;
+	Java_sun_awt_X11FontManager_getFontPath;
+	Java_sun_font_X11FontManager_setNativeFontPath;
         Java_sun_awt_X11GraphicsEnvironment_initDisplay;
         Java_sun_awt_X11GraphicsEnvironment_initGLX;
         Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,7 +29,9 @@
 import java.awt.geom.AffineTransform;
 import javax.swing.plaf.FontUIResource;
 import java.util.StringTokenizer;
-import sun.font.FontManager;
+
+import sun.font.FontConfigManager;
+import sun.font.FontUtilities;
 
 /**
  * @author Shannon Hickey
@@ -193,13 +195,13 @@
         }
 
         String fcFamilyLC = family.toLowerCase();
-        if (FontManager.mapFcName(fcFamilyLC) != null) {
+        if (FontUtilities.mapFcName(fcFamilyLC) != null) {
             /* family is a Fc/Pango logical font which we need to expand. */
-           return FontManager.getFontConfigFUIR(fcFamilyLC, style, size);
+           return FontUtilities.getFontConfigFUIR(fcFamilyLC, style, size);
         } else {
             /* It's a physical font which we will create with a fallback */
             Font font = new FontUIResource(family, style, size);
-            return FontManager.getCompositeFontUIResource(font);
+            return FontUtilities.getCompositeFontUIResource(font);
         }
     }
 
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Wed Jul 05 17:01:52 2017 +0200
@@ -63,7 +63,7 @@
 import sun.awt.SunToolkit;
 import sun.awt.OSInfo;
 import sun.awt.shell.ShellFolder;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
 import sun.security.action.GetPropertyAction;
 
 import sun.swing.DefaultLayoutStyle;
@@ -2289,13 +2289,14 @@
                                                   font.getStyle(), size);
                     }
                 }
-                if (FontManager.fontSupportsDefaultEncoding(font)) {
+
+                if (FontUtilities.fontSupportsDefaultEncoding(font)) {
                     if (!(font instanceof UIResource)) {
                         font = new FontUIResource(font);
                     }
                 }
                 else {
-                    font = FontManager.getCompositeFontUIResource(font);
+                    font = FontUtilities.getCompositeFontUIResource(font);
                 }
                 return font;
 
--- a/jdk/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,10 @@
         try {
             String serverName;
             Principal principal = getPeerPrincipal(session);
-            if (principal instanceof KerberosPrincipal) {
+            // X.500 principal or Kerberos principal.
+            // (Use ciphersuite check to determine whether Kerberos is present.)
+            if (session.getCipherSuite().startsWith("TLS_KRB5") &&
+                    principal instanceof KerberosPrincipal) {
                 serverName =
                     HostnameChecker.getServerName((KerberosPrincipal)principal);
             } else {
--- a/jdk/src/share/classes/java/awt/AWTEvent.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/AWTEvent.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,9 +30,8 @@
 import java.awt.peer.ComponentPeer;
 import java.awt.peer.LightweightPeer;
 import java.lang.reflect.Field;
-import java.util.logging.Logger;
-import java.util.logging.Level;
 import sun.awt.AWTAccessor;
+import sun.util.logging.PlatformLogger;
 
 /**
  * The root event class for all AWT events.
@@ -76,7 +75,7 @@
  * @since 1.1
  */
 public abstract class AWTEvent extends EventObject {
-    private static final Logger log = Logger.getLogger("java.awt.AWTEvent");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AWTEvent");
     private byte bdata[];
 
     /**
@@ -252,12 +251,12 @@
                                     field.setAccessible(true);
                                     return field;
                                 } catch (SecurityException e) {
-                                    if (log.isLoggable(Level.FINE)) {
-                                        log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
+                                    if (log.isLoggable(PlatformLogger.FINE)) {
+                                        log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
                                     }
                                 } catch (NoSuchFieldException e) {
-                                    if (log.isLoggable(Level.FINE)) {
-                                        log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
+                                    if (log.isLoggable(PlatformLogger.FINE)) {
+                                        log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
                                     }
                                 }
                                 return null;
@@ -549,8 +548,8 @@
                     boolean b = field.getBoolean(this);
                     field.setBoolean(that, b);
                 } catch(IllegalAccessException e) {
-                    if (log.isLoggable(Level.FINE)) {
-                        log.log(Level.FINE, "AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
+                    if (log.isLoggable(PlatformLogger.FINE)) {
+                        log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
                     }
                 }
             }
@@ -564,8 +563,8 @@
                 try {
                     field.setBoolean(this, false);
                 } catch(IllegalAccessException e) {
-                    if (log.isLoggable(Level.FINE)) {
-                        log.log(Level.FINE, "AWTEvent.dispatched() got IllegalAccessException ", e);
+                    if (log.isLoggable(PlatformLogger.FINE)) {
+                        log.fine("AWTEvent.dispatched() got IllegalAccessException ", e);
                     }
                 }
             }
--- a/jdk/src/share/classes/java/awt/AttributeValue.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/AttributeValue.java	Wed Jul 05 17:01:52 2017 +0200
@@ -25,21 +25,21 @@
 
 package java.awt;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 abstract class AttributeValue {
-    private static final Logger log = Logger.getLogger("java.awt.AttributeValue");
-
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AttributeValue");
     private final int value;
     private final String[] names;
 
     protected AttributeValue(int value, String[] names) {
-        if (log.isLoggable(Level.FINEST)) {
-            log.log(Level.FINEST, "value = " + value + ", names = " + names);
+        if (log.isLoggable(PlatformLogger.FINEST)) {
+            log.finest("value = " + value + ", names = " + names);
         }
-        if (log.isLoggable(Level.FINER)) {
+
+        if (log.isLoggable(PlatformLogger.FINER)) {
             if ((value < 0) || (names == null) || (value >= names.length)) {
-                log.log(Level.FINER, "Assertion failed");
+                log.finer("Assertion failed");
             }
         }
         this.value = value;
--- a/jdk/src/share/classes/java/awt/Component.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Component.java	Wed Jul 05 17:01:52 2017 +0200
@@ -60,7 +60,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import javax.accessibility.*;
-import java.util.logging.*;
 import java.applet.Applet;
 
 import sun.security.action.GetPropertyAction;
@@ -74,6 +73,9 @@
 import sun.awt.EmbeddedFrame;
 import sun.awt.dnd.SunDropTargetEvent;
 import sun.awt.im.CompositionArea;
+import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.SunFontManager;
 import sun.java2d.SunGraphics2D;
 import sun.java2d.pipe.Region;
 import sun.awt.image.VSyncedBSManager;
@@ -81,6 +83,7 @@
 import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*;
 import sun.awt.RequestFocusController;
 import sun.java2d.SunGraphicsEnvironment;
+import sun.util.logging.PlatformLogger;
 
 /**
  * A <em>component</em> is an object having a graphical representation
@@ -91,7 +94,17 @@
  * the nonmenu-related Abstract Window Toolkit components. Class
  * <code>Component</code> can also be extended directly to create a
  * lightweight component. A lightweight component is a component that is
- * not associated with a native opaque window.
+ * not associated with a native window. On the contrary, a heavyweight
+ * component is associated with a native window. The {@link #isLightweight()}
+ * method may be used to distinguish between the two kinds of the components.
+ * <p>
+ * Lightweight and heavyweight components may be mixed in a single component
+ * hierarchy. However, for correct operating of such a mixed hierarchy of
+ * components, the whole hierarchy must be valid. When the hierarchy gets
+ * invalidated, like after changing the bounds of components, or
+ * adding/removing components to/from containers, the whole hierarchy must be
+ * validated afterwards by means of the {@link Container#validate()} method
+ * invoked on the top-most invalid container of the hierarchy.
  * <p>
  * <h3>Serialization</h3>
  * It is important to note that only AWT listeners which conform
@@ -175,10 +188,10 @@
                                            Serializable
 {
 
-    private static final Logger log = Logger.getLogger("java.awt.Component");
-    private static final Logger eventLog = Logger.getLogger("java.awt.event.Component");
-    private static final Logger focusLog = Logger.getLogger("java.awt.focus.Component");
-    private static final Logger mixingLog = Logger.getLogger("java.awt.mixing.Component");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Component");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Component");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.Component");
+    private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Component");
 
     /**
      * The peer of the component. The peer implements the component's
@@ -1489,9 +1502,14 @@
     /**
      * Shows or hides this component depending on the value of parameter
      * <code>b</code>.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param b  if <code>true</code>, shows this component;
      * otherwise, hides this component
      * @see #isVisible
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setVisible(boolean b) {
@@ -1750,10 +1768,15 @@
 
     /**
      * Sets the font of this component.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param f the font to become this component's font;
      *          if this parameter is <code>null</code> then this
      *          component will inherit the font of its parent
      * @see #getFont
+     * @see #invalidate
      * @since JDK1.0
      * @beaninfo
      *       bound: true
@@ -1827,8 +1850,13 @@
 
     /**
      * Sets the locale of this component.  This is a bound property.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param l the locale to become this component's locale
      * @see #getLocale
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setLocale(Locale l) {
@@ -1948,12 +1976,17 @@
      * Moves this component to a new location. The top-left corner of
      * the new location is specified by the <code>x</code> and <code>y</code>
      * parameters in the coordinate space of this component's parent.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param x the <i>x</i>-coordinate of the new location's
      *          top-left corner in the parent's coordinate space
      * @param y the <i>y</i>-coordinate of the new location's
      *          top-left corner in the parent's coordinate space
      * @see #getLocation
      * @see #setBounds
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setLocation(int x, int y) {
@@ -1976,11 +2009,16 @@
      * Moves this component to a new location. The top-left corner of
      * the new location is specified by point <code>p</code>. Point
      * <code>p</code> is given in the parent's coordinate space.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param p the point defining the top-left corner
      *          of the new location, given in the coordinate space of this
      *          component's parent
      * @see #getLocation
      * @see #setBounds
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setLocation(Point p) {
@@ -2015,10 +2053,15 @@
     /**
      * Resizes this component so that it has width <code>width</code>
      * and height <code>height</code>.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param width the new width of this component in pixels
      * @param height the new height of this component in pixels
      * @see #getSize
      * @see #setBounds
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setSize(int width, int height) {
@@ -2040,10 +2083,15 @@
     /**
      * Resizes this component so that it has width <code>d.width</code>
      * and height <code>d.height</code>.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param d the dimension specifying the new size
      *          of this component
      * @see #setSize
      * @see #setBounds
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setSize(Dimension d) {
@@ -2086,6 +2134,10 @@
      * Moves and resizes this component. The new location of the top-left
      * corner is specified by <code>x</code> and <code>y</code>, and the
      * new size is specified by <code>width</code> and <code>height</code>.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param x the new <i>x</i>-coordinate of this component
      * @param y the new <i>y</i>-coordinate of this component
      * @param width the new <code>width</code> of this component
@@ -2096,6 +2148,7 @@
      * @see #setLocation(Point)
      * @see #setSize(int, int)
      * @see #setSize(Dimension)
+     * @see #invalidate
      * @since JDK1.1
      */
     public void setBounds(int x, int y, int width, int height) {
@@ -2228,12 +2281,17 @@
      * position is specified by <code>r.x</code> and <code>r.y</code>,
      * and its new size is specified by <code>r.width</code> and
      * <code>r.height</code>
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param r the new bounding rectangle for this component
      * @see       #getBounds
      * @see       #setLocation(int, int)
      * @see       #setLocation(Point)
      * @see       #setSize(int, int)
      * @see       #setSize(Dimension)
+     * @see #invalidate
      * @since     JDK1.1
      */
     public void setBounds(Rectangle r) {
@@ -2848,8 +2906,12 @@
      * @since     JDK1.0
      */
     public FontMetrics getFontMetrics(Font font) {
-        // REMIND: PlatformFont flag should be obsolete soon...
-        if (sun.font.FontManager.usePlatformFontMetrics()) {
+        // This is an unsupported hack, but left in for a customer.
+        // Do not remove.
+        FontManager fm = FontManagerFactory.getInstance();
+        if (fm instanceof SunFontManager
+            && ((SunFontManager) fm).usePlatformFontMetrics()) {
+
             if (peer != null &&
                 !(peer instanceof LightweightPeer)) {
                 return peer.getFontMetrics(font);
@@ -4471,13 +4533,13 @@
         // Check that this component belongs to this app-context
         AppContext compContext = appContext;
         if (compContext != null && !compContext.equals(AppContext.getAppContext())) {
-            if (eventLog.isLoggable(Level.FINE)) {
-                eventLog.log(Level.FINE, "Event " + e + " is being dispatched on the wrong AppContext");
-            }
-        }
-
-        if (eventLog.isLoggable(Level.FINEST)) {
-            eventLog.log(Level.FINEST, "{0}", e);
+            if (eventLog.isLoggable(PlatformLogger.FINE)) {
+                eventLog.fine("Event " + e + " is being dispatched on the wrong AppContext");
+            }
+        }
+
+        if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+            eventLog.finest("{0}", e);
         }
 
         /*
@@ -4512,8 +4574,8 @@
                 return;
             }
         }
-        if ((e instanceof FocusEvent) && focusLog.isLoggable(Level.FINEST)) {
-            focusLog.log(Level.FINEST, "" + e);
+        if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) {
+            focusLog.finest("" + e);
         }
         // MouseWheel may need to be retargeted here so that
         // AWTEventListener sees the event go to the correct
@@ -4570,8 +4632,8 @@
                 if (inputContext != null) {
                     inputContext.dispatchEvent(e);
                     if (e.isConsumed()) {
-                        if ((e instanceof FocusEvent) && focusLog.isLoggable(Level.FINEST)) {
-                            focusLog.log(Level.FINEST, "3579: Skipping " + e);
+                        if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) {
+                            focusLog.finest("3579: Skipping " + e);
                         }
                         return;
                     }
@@ -4605,8 +4667,8 @@
               if (p != null) {
                   p.preProcessKeyEvent((KeyEvent)e);
                   if (e.isConsumed()) {
-                        if (focusLog.isLoggable(Level.FINEST)) {
-                            focusLog.log(Level.FINEST, "Pre-process consumed event");
+                        if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                            focusLog.finest("Pre-process consumed event");
                         }
                       return;
                   }
@@ -4738,9 +4800,9 @@
                                   // position relative to its parent.
         MouseWheelEvent newMWE;
 
-        if (eventLog.isLoggable(Level.FINEST)) {
-            eventLog.log(Level.FINEST, "dispatchMouseWheelToAncestor");
-            eventLog.log(Level.FINEST, "orig event src is of " + e.getSource().getClass());
+        if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+            eventLog.finest("dispatchMouseWheelToAncestor");
+            eventLog.finest("orig event src is of " + e.getSource().getClass());
         }
 
         /* parent field for Window refers to the owning Window.
@@ -4761,8 +4823,8 @@
                 }
             }
 
-            if (eventLog.isLoggable(Level.FINEST)) {
-                eventLog.log(Level.FINEST, "new event src is " + anc.getClass());
+            if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+                eventLog.finest("new event src is " + anc.getClass());
             }
 
             if (anc != null && anc.eventEnabled(e)) {
@@ -5257,11 +5319,11 @@
     // Should only be called while holding the tree lock
     int numListening(long mask) {
         // One mask or the other, but not neither or both.
-        if (eventLog.isLoggable(Level.FINE)) {
+        if (eventLog.isLoggable(PlatformLogger.FINE)) {
             if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) &&
                 (mask != AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK))
             {
-                eventLog.log(Level.FINE, "Assertion failed");
+                eventLog.fine("Assertion failed");
             }
         }
         if ((mask == AWTEvent.HIERARCHY_EVENT_MASK &&
@@ -5298,9 +5360,9 @@
               break;
           case HierarchyEvent.ANCESTOR_MOVED:
           case HierarchyEvent.ANCESTOR_RESIZED:
-              if (eventLog.isLoggable(Level.FINE)) {
+              if (eventLog.isLoggable(PlatformLogger.FINE)) {
                   if (changeFlags != 0) {
-                      eventLog.log(Level.FINE, "Assertion (changeFlags == 0) failed");
+                      eventLog.fine("Assertion (changeFlags == 0) failed");
                   }
               }
               if (hierarchyBoundsListener != null ||
@@ -5314,8 +5376,8 @@
               break;
           default:
               // assert false
-              if (eventLog.isLoggable(Level.FINE)) {
-                  eventLog.log(Level.FINE, "This code must never be reached");
+              if (eventLog.isLoggable(PlatformLogger.FINE)) {
+                  eventLog.fine("This code must never be reached");
               }
               break;
         }
@@ -6618,8 +6680,13 @@
      * native screen resource.
      * This method is called internally by the toolkit and should
      * not be called directly by programs.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @see       #isDisplayable
      * @see       #removeNotify
+     * @see #invalidate
      * @since JDK1.0
      */
     public void addNotify() {
@@ -7376,8 +7443,8 @@
                                      CausedFocusEvent.Cause cause)
     {
         if (!isRequestFocusAccepted(temporary, focusedWindowChangeAllowed, cause)) {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "requestFocus is not accepted");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("requestFocus is not accepted");
             }
             return false;
         }
@@ -7388,8 +7455,8 @@
         Component window = this;
         while ( (window != null) && !(window instanceof Window)) {
             if (!window.isVisible()) {
-                if (focusLog.isLoggable(Level.FINEST)) {
-                    focusLog.log(Level.FINEST, "component is recurively invisible");
+                if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                    focusLog.finest("component is recurively invisible");
                 }
                 return false;
             }
@@ -7400,15 +7467,15 @@
         Component heavyweight = (peer instanceof LightweightPeer)
             ? getNativeContainer() : this;
         if (heavyweight == null || !heavyweight.isVisible()) {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Component is not a part of visible hierarchy");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Component is not a part of visible hierarchy");
             }
             return false;
         }
         peer = heavyweight.peer;
         if (peer == null) {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Peer is null");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Peer is null");
             }
             return false;
         }
@@ -7420,12 +7487,12 @@
         if (!success) {
             KeyboardFocusManager.getCurrentKeyboardFocusManager
                 (appContext).dequeueKeyEvents(time, this);
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Peer request failed");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Peer request failed");
             }
         } else {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Pass for " + this);
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Pass for " + this);
             }
         }
         return success;
@@ -7436,24 +7503,24 @@
                                            CausedFocusEvent.Cause cause)
     {
         if (!isFocusable() || !isVisible()) {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Not focusable or not visible");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Not focusable or not visible");
             }
             return false;
         }
 
         ComponentPeer peer = this.peer;
         if (peer == null) {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "peer is null");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("peer is null");
             }
             return false;
         }
 
         Window window = getContainingWindow();
         if (window == null || !((Window)window).isFocusableWindow()) {
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Component doesn't have toplevel");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Component doesn't have toplevel");
             }
             return false;
         }
@@ -7474,8 +7541,8 @@
             // Controller is supposed to verify focus transfers and for this it
             // should know both from and to components.  And it shouldn't verify
             // transfers from when these components are equal.
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "focus owner is null or this");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("focus owner is null or this");
             }
             return true;
         }
@@ -7487,8 +7554,8 @@
             // most recent focus owner.  But most recent focus owner can be
             // changed by requestFocsuXXX() call only, so this transfer has
             // been already approved.
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "cause is activation");
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("cause is activation");
             }
             return true;
         }
@@ -7498,8 +7565,8 @@
                                                                           temporary,
                                                                           focusedWindowChangeAllowed,
                                                                           cause);
-        if (focusLog.isLoggable(Level.FINEST)) {
-            focusLog.log(Level.FINEST, "RequestFocusController returns {0}", ret);
+        if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+            focusLog.finest("RequestFocusController returns {0}", ret);
         }
 
         return ret;
@@ -7590,7 +7657,7 @@
     }
 
     boolean transferFocus(boolean clearOnFailure) {
-        if (focusLog.isLoggable(Level.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             focusLog.finer("clearOnFailure = " + clearOnFailure);
         }
         Component toFocus = getNextFocusCandidate();
@@ -7599,12 +7666,12 @@
             res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
         }
         if (clearOnFailure && !res) {
-            if (focusLog.isLoggable(Level.FINER)) {
+            if (focusLog.isLoggable(PlatformLogger.FINER)) {
                 focusLog.finer("clear global focus owner");
             }
             KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
         }
-        if (focusLog.isLoggable(Level.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             focusLog.finer("returning result: " + res);
         }
         return res;
@@ -7619,19 +7686,19 @@
             comp = rootAncestor;
             rootAncestor = comp.getFocusCycleRootAncestor();
         }
-        if (focusLog.isLoggable(Level.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             focusLog.finer("comp = " + comp + ", root = " + rootAncestor);
         }
         Component candidate = null;
         if (rootAncestor != null) {
             FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
             Component toFocus = policy.getComponentAfter(rootAncestor, comp);
-            if (focusLog.isLoggable(Level.FINER)) {
+            if (focusLog.isLoggable(PlatformLogger.FINER)) {
                 focusLog.finer("component after is " + toFocus);
             }
             if (toFocus == null) {
                 toFocus = policy.getDefaultComponent(rootAncestor);
-                if (focusLog.isLoggable(Level.FINER)) {
+                if (focusLog.isLoggable(PlatformLogger.FINER)) {
                     focusLog.finer("default component is " + toFocus);
                 }
             }
@@ -7643,7 +7710,7 @@
             }
             candidate = toFocus;
         }
-        if (focusLog.isLoggable(Level.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             focusLog.finer("Focus transfer candidate: " + candidate);
         }
         return candidate;
@@ -7680,12 +7747,12 @@
             }
         }
         if (!res) {
-            if (focusLog.isLoggable(Level.FINER)) {
+            if (focusLog.isLoggable(PlatformLogger.FINER)) {
                 focusLog.finer("clear global focus owner");
             }
             KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
         }
-        if (focusLog.isLoggable(Level.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             focusLog.finer("returning result: " + res);
         }
         return res;
@@ -8586,8 +8653,13 @@
      * To set the orientation of an entire component
      * hierarchy, use
      * {@link #applyComponentOrientation applyComponentOrientation}.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      *
      * @see ComponentOrientation
+     * @see #invalidate
      *
      * @author Laura Werner, IBM
      * @beaninfo
@@ -8623,12 +8695,17 @@
     /**
      * Sets the <code>ComponentOrientation</code> property of this component
      * and all components contained within it.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      *
      * @param orientation the new component orientation of this component and
      *        the components contained within it.
      * @exception NullPointerException if <code>orientation</code> is null.
      * @see #setComponentOrientation
      * @see #getComponentOrientation
+     * @see #invalidate
      * @since 1.4
      */
     public void applyComponentOrientation(ComponentOrientation orientation) {
@@ -9441,7 +9518,7 @@
         checkTreeLock();
 
         if (!areBoundsValid()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
             }
             return;
@@ -9477,7 +9554,7 @@
                     }
                     this.compoundShape = shape;
                     Point compAbsolute = getLocationOnWindow();
-                    if (mixingLog.isLoggable(Level.FINER)) {
+                    if (mixingLog.isLoggable(PlatformLogger.FINER)) {
                         mixingLog.fine("this = " + this +
                                 "; compAbsolute=" + compAbsolute + "; shape=" + shape);
                     }
@@ -9611,7 +9688,7 @@
         checkTreeLock();
         Region s = getNormalShape();
 
-        if (mixingLog.isLoggable(Level.FINE)) {
+        if (mixingLog.isLoggable(PlatformLogger.FINE)) {
             mixingLog.fine("this = " + this + "; normalShape=" + s);
         }
 
@@ -9645,7 +9722,7 @@
             }
         }
 
-        if (mixingLog.isLoggable(Level.FINE)) {
+        if (mixingLog.isLoggable(PlatformLogger.FINE)) {
             mixingLog.fine("currentShape=" + s);
         }
 
@@ -9655,12 +9732,12 @@
     void applyCurrentShape() {
         checkTreeLock();
         if (!areBoundsValid()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
             }
             return; // Because applyCompoundShape() ignores such components anyway
         }
-        if (mixingLog.isLoggable(Level.FINE)) {
+        if (mixingLog.isLoggable(PlatformLogger.FINE)) {
             mixingLog.fine("this = " + this);
         }
         applyCompoundShape(calculateCurrentShape());
@@ -9669,7 +9746,7 @@
     final void subtractAndApplyShape(Region s) {
         checkTreeLock();
 
-        if (mixingLog.isLoggable(Level.FINE)) {
+        if (mixingLog.isLoggable(PlatformLogger.FINE)) {
             mixingLog.fine("this = " + this + "; s=" + s);
         }
 
@@ -9716,7 +9793,7 @@
 
     void mixOnShowing() {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this);
             }
             if (!isMixingNeeded()) {
@@ -9734,7 +9811,7 @@
         // We cannot be sure that the peer exists at this point, so we need the argument
         //    to find out whether the hiding component is (well, actually was) a LW or a HW.
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this + "; isLightweight = " + isLightweight);
             }
             if (!isMixingNeeded()) {
@@ -9748,7 +9825,7 @@
 
     void mixOnReshaping() {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this);
             }
             if (!isMixingNeeded()) {
@@ -9767,7 +9844,7 @@
             boolean becameHigher = newZorder < oldZorder;
             Container parent = getContainer();
 
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this +
                     "; oldZorder=" + oldZorder + "; newZorder=" + newZorder + "; parent=" + parent);
             }
@@ -9811,13 +9888,13 @@
 
     final boolean isMixingNeeded() {
         if (SunToolkit.getSunAwtDisableMixing()) {
-            if (mixingLog.isLoggable(Level.FINEST)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINEST)) {
                 mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
             }
             return false;
         }
         if (!areBoundsValid()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
             }
             return false;
@@ -9825,7 +9902,7 @@
         Window window = getContainingWindow();
         if (window != null) {
             if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants()) {
-                if (mixingLog.isLoggable(Level.FINE)) {
+                if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                     mixingLog.fine("containing window = " + window +
                             "; has h/w descendants = " + window.hasHeavyweightDescendants() +
                             "; has l/w descendants = " + window.hasLightweightDescendants());
@@ -9833,8 +9910,8 @@
                 return false;
             }
         } else {
-            if (mixingLog.isLoggable(Level.FINE)) {
-                mixingLog.finest("this = " + this + "; containing window is null");
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
+                mixingLog.fine("this = " + this + "; containing window is null");
             }
             return false;
         }
--- a/jdk/src/share/classes/java/awt/Container.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Container.java	Wed Jul 05 17:01:52 2017 +0200
@@ -46,10 +46,10 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import java.util.logging.*;
-
 import javax.accessibility.*;
 
+import sun.util.logging.PlatformLogger;
+
 import sun.awt.AppContext;
 import sun.awt.CausedFocusEvent;
 import sun.awt.PeerEvent;
@@ -85,8 +85,8 @@
  */
 public class Container extends Component {
 
-    private static final Logger log = Logger.getLogger("java.awt.Container");
-    private static final Logger eventLog = Logger.getLogger("java.awt.event.Container");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Container");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Container");
 
     private static final Component[] EMPTY_ARRAY = new Component[0];
 
@@ -201,7 +201,7 @@
     private transient int numOfHWComponents = 0;
     private transient int numOfLWComponents = 0;
 
-    private static final Logger mixingLog = Logger.getLogger("java.awt.mixing.Container");
+    private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Container");
 
     /**
      * @serialField ncomponents                     int
@@ -381,16 +381,15 @@
      * Appends the specified component to the end of this container.
      * This is a convenience method for {@link #addImpl}.
      * <p>
-     * Note: If a component has been added to a container that
-     * has been displayed, <code>validate</code> must be
-     * called on that container to display the new component.
-     * If multiple components are being added, you can improve
-     * efficiency by calling <code>validate</code> only once,
-     * after all the components have been added.
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * display the added component.
      *
      * @param     comp   the component to be added
      * @exception NullPointerException if {@code comp} is {@code null}
      * @see #addImpl
+     * @see #invalidate
      * @see #validate
      * @see javax.swing.JComponent#revalidate()
      * @return    the component argument
@@ -406,8 +405,15 @@
      * <p>
      * This method is obsolete as of 1.1.  Please use the
      * method <code>add(Component, Object)</code> instead.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * display the added component.
+     *
      * @exception NullPointerException if {@code comp} is {@code null}
      * @see #add(Component, Object)
+     * @see #invalidate
      */
     public Component add(String name, Component comp) {
         addImpl(comp, name, -1);
@@ -419,12 +425,11 @@
      * position.
      * This is a convenience method for {@link #addImpl}.
      * <p>
-     * Note: If a component has been added to a container that
-     * has been displayed, <code>validate</code> must be
-     * called on that container to display the new component.
-     * If multiple components are being added, you can improve
-     * efficiency by calling <code>validate</code> only once,
-     * after all the components have been added.
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * display the added component.
+     *
      *
      * @param     comp   the component to be added
      * @param     index    the position at which to insert the component,
@@ -435,6 +440,7 @@
      * @return    the component <code>comp</code>
      * @see #addImpl
      * @see #remove
+     * @see #invalidate
      * @see #validate
      * @see javax.swing.JComponent#revalidate()
      */
@@ -700,6 +706,9 @@
      * This property is guaranteed to apply only to lightweight
      * non-<code>Container</code> components.
      * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     * <p>
      * <b>Note</b>: Not all platforms support changing the z-order of
      * heavyweight components from one container into another without
      * the call to <code>removeNotify</code>. There is no way to detect
@@ -723,6 +732,7 @@
      * @exception IllegalArgumentException if adding a <code>Window</code>
      *            to a container
      * @see #getComponentZOrder(java.awt.Component)
+     * @see #invalidate
      * @since 1.5
      */
     public void setComponentZOrder(Component comp, int index) {
@@ -923,18 +933,18 @@
      * this container's layout using the specified constraints object.
      * This is a convenience method for {@link #addImpl}.
      * <p>
-     * Note: If a component has been added to a container that
-     * has been displayed, <code>validate</code> must be
-     * called on that container to display the new component.
-     * If multiple components are being added, you can improve
-     * efficiency by calling <code>validate</code> only once,
-     * after all the components have been added.
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * display the added component.
+     *
      *
      * @param     comp the component to be added
      * @param     constraints an object expressing
      *                  layout contraints for this component
      * @exception NullPointerException if {@code comp} is {@code null}
      * @see #addImpl
+     * @see #invalidate
      * @see #validate
      * @see javax.swing.JComponent#revalidate()
      * @see       LayoutManager
@@ -951,12 +961,11 @@
      * the specified constraints object.
      * This is a convenience method for {@link #addImpl}.
      * <p>
-     * Note: If a component has been added to a container that
-     * has been displayed, <code>validate</code> must be
-     * called on that container to display the new component.
-     * If multiple components are being added, you can improve
-     * efficiency by calling <code>validate</code> only once,
-     * after all the components have been added.
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * display the added component.
+     *
      *
      * @param comp the component to be added
      * @param constraints an object expressing layout contraints for this
@@ -967,6 +976,7 @@
      * @exception IllegalArgumentException if {@code index} is invalid (see
      *            {@link #addImpl} for details)
      * @see #addImpl
+     * @see #invalidate
      * @see #validate
      * @see javax.swing.JComponent#revalidate()
      * @see #remove
@@ -1014,6 +1024,11 @@
      * <code>super.addImpl(comp, constraints, index)</code>
      * </blockquote>
      * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * display the added component.
+     *
      * @param     comp       the component to be added
      * @param     constraints an object expressing layout constraints
      *                 for this component
@@ -1033,6 +1048,7 @@
      * @see       #add(Component)
      * @see       #add(Component, int)
      * @see       #add(Component, java.lang.Object)
+     * @see #invalidate
      * @see       LayoutManager
      * @see       LayoutManager2
      * @since     JDK1.1
@@ -1145,19 +1161,18 @@
      * This method also notifies the layout manager to remove the
      * component from this container's layout via the
      * <code>removeLayoutComponent</code> method.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * reflect the changes.
      *
-     * <p>
-     * Note: If a component has been removed from a container that
-     * had been displayed, {@link #validate} must be
-     * called on that container to reflect changes.
-     * If multiple components are being removed, you can improve
-     * efficiency by calling {@link #validate} only once,
-     * after all the components have been removed.
      *
      * @param     index   the index of the component to be removed
      * @throws ArrayIndexOutOfBoundsException if {@code index} is not in
      *         range {@code [0, getComponentCount()-1]}
      * @see #add
+     * @see #invalidate
      * @see #validate
      * @see #getComponentCount
      * @since JDK1.1
@@ -1209,17 +1224,15 @@
      * This method also notifies the layout manager to remove the
      * component from this container's layout via the
      * <code>removeLayoutComponent</code> method.
-     *
      * <p>
-     * Note: If a component has been removed from a container that
-     * had been displayed, {@link #validate} must be
-     * called on that container to reflect changes.
-     * If multiple components are being removed, you can improve
-     * efficiency by calling {@link #validate} only once,
-     * after all the components have been removed.
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * reflect the changes.
      *
      * @param comp the component to be removed
      * @see #add
+     * @see #invalidate
      * @see #validate
      * @see #remove(int)
      */
@@ -1239,8 +1252,15 @@
      * This method also notifies the layout manager to remove the
      * components from this container's layout via the
      * <code>removeLayoutComponent</code> method.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy. If the container has already been
+     * displayed, the hierarchy must be validated thereafter in order to
+     * reflect the changes.
+     *
      * @see #add
      * @see #remove
+     * @see #invalidate
      */
     public void removeAll() {
         synchronized (getTreeLock()) {
@@ -1287,33 +1307,33 @@
         int superListening = super.numListening(mask);
 
         if (mask == AWTEvent.HIERARCHY_EVENT_MASK) {
-            if (eventLog.isLoggable(Level.FINE)) {
+            if (eventLog.isLoggable(PlatformLogger.FINE)) {
                 // Verify listeningChildren is correct
                 int sum = 0;
                 for (Component comp : component) {
                     sum += comp.numListening(mask);
                 }
                 if (listeningChildren != sum) {
-                    eventLog.log(Level.FINE, "Assertion (listeningChildren == sum) failed");
+                    eventLog.fine("Assertion (listeningChildren == sum) failed");
                 }
             }
             return listeningChildren + superListening;
         } else if (mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) {
-            if (eventLog.isLoggable(Level.FINE)) {
+            if (eventLog.isLoggable(PlatformLogger.FINE)) {
                 // Verify listeningBoundsChildren is correct
                 int sum = 0;
                 for (Component comp : component) {
                     sum += comp.numListening(mask);
                 }
                 if (listeningBoundsChildren != sum) {
-                    eventLog.log(Level.FINE, "Assertion (listeningBoundsChildren == sum) failed");
+                    eventLog.fine("Assertion (listeningBoundsChildren == sum) failed");
                 }
             }
             return listeningBoundsChildren + superListening;
         } else {
             // assert false;
-            if (eventLog.isLoggable(Level.FINE)) {
-                eventLog.log(Level.FINE, "This code must never be reached");
+            if (eventLog.isLoggable(PlatformLogger.FINE)) {
+                eventLog.fine("This code must never be reached");
             }
             return superListening;
         }
@@ -1321,13 +1341,13 @@
 
     // Should only be called while holding tree lock
     void adjustListeningChildren(long mask, int num) {
-        if (eventLog.isLoggable(Level.FINE)) {
+        if (eventLog.isLoggable(PlatformLogger.FINE)) {
             boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK ||
                                 mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK ||
                                 mask == (AWTEvent.HIERARCHY_EVENT_MASK |
                                          AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK));
             if (!toAssert) {
-                eventLog.log(Level.FINE, "Assertion failed");
+                eventLog.fine("Assertion failed");
             }
         }
 
@@ -1362,14 +1382,14 @@
 
     // Should only be called while holding tree lock
     int countHierarchyMembers() {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             // Verify descendantsCount is correct
             int sum = 0;
             for (Component comp : component) {
                 sum += comp.countHierarchyMembers();
             }
             if (descendantsCount != sum) {
-                log.log(Level.FINE, "Assertion (descendantsCount == sum) failed");
+                log.fine("Assertion (descendantsCount == sum) failed");
             }
         }
         return descendantsCount + 1;
@@ -1432,9 +1452,14 @@
 
     /**
      * Sets the layout manager for this container.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param mgr the specified layout manager
      * @see #doLayout
      * @see #getLayout
+     * @see #invalidate
      */
     public void setLayout(LayoutManager mgr) {
         layoutMgr = mgr;
@@ -1502,9 +1527,17 @@
      * <p>If this {@code Container} is not valid, this method invokes
      * the {@code validateTree} method and marks this {@code Container}
      * as valid. Otherwise, no action is performed.
+     * <p>
+     * Note that the {@code invalidate()} method may invalidate not only the
+     * component it is called upon, but also the parents of the component.
+     * Therefore, to restore the validity of the hierarchy, the {@code
+     * validate()} method must be invoked on the top-most invalid container of
+     * the hierarchy. For performance reasons a developer may postpone the
+     * validation of the hierarchy till a bunch of layout-related operations
+     * completes, e.g. after adding all the children to the container.
      *
      * @see #add(java.awt.Component)
-     * @see Component#invalidate
+     * @see #invalidate
      * @see javax.swing.JComponent#revalidate()
      * @see #validateTree
      */
@@ -1588,8 +1621,13 @@
 
     /**
      * Sets the font of this container.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
+     *
      * @param f The font to become this container's font.
      * @see Component#getFont
+     * @see #invalidate
      * @since JDK1.0
      */
     public void setFont(Font f) {
@@ -3386,12 +3424,16 @@
     /**
      * Sets the <code>ComponentOrientation</code> property of this container
      * and all components contained within it.
+     * <p>
+     * This method changes layout-related information, and therefore,
+     * invalidates the component hierarchy.
      *
      * @param o the new component orientation of this container and
      *        the components contained within it.
      * @exception NullPointerException if <code>orientation</code> is null.
      * @see Component#setComponentOrientation
      * @see Component#getComponentOrientation
+     * @see #invalidate
      * @since 1.4
      */
     public void applyComponentOrientation(ComponentOrientation o) {
@@ -3924,7 +3966,7 @@
 
     final void recursiveSubtractAndApplyShape(Region shape, int fromZorder, int toZorder) {
         checkTreeLock();
-        if (mixingLog.isLoggable(Level.FINE)) {
+        if (mixingLog.isLoggable(PlatformLogger.FINE)) {
             mixingLog.fine("this = " + this +
                 "; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder);
         }
@@ -3961,7 +4003,7 @@
 
     final void recursiveApplyCurrentShape(int fromZorder, int toZorder) {
         checkTreeLock();
-        if (mixingLog.isLoggable(Level.FINE)) {
+        if (mixingLog.isLoggable(PlatformLogger.FINE)) {
             mixingLog.fine("this = " + this +
                 "; fromZ=" + fromZorder + "; toZ=" + toZorder);
         }
@@ -4065,20 +4107,20 @@
     @Override
     void mixOnShowing() {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this);
             }
 
-            if (!isMixingNeeded()) {
-                return;
-            }
-
             boolean isLightweight = isLightweight();
 
             if (isLightweight && isRecursivelyVisibleUpToHeavyweightContainer()) {
                 recursiveShowHeavyweightChildren();
             }
 
+            if (!isMixingNeeded()) {
+                return;
+            }
+
             if (!isLightweight || (isLightweight && hasHeavyweightDescendants())) {
                 recursiveApplyCurrentShape();
             }
@@ -4090,7 +4132,7 @@
     @Override
     void mixOnHiding(boolean isLightweight) {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this +
                         "; isLightweight=" + isLightweight);
             }
@@ -4104,7 +4146,7 @@
     @Override
     void mixOnReshaping() {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this);
             }
 
@@ -4139,7 +4181,7 @@
     @Override
     void mixOnZOrderChanging(int oldZorder, int newZorder) {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this +
                     "; oldZ=" + oldZorder + "; newZ=" + newZorder);
             }
@@ -4160,7 +4202,7 @@
     @Override
     void mixOnValidating() {
         synchronized (getTreeLock()) {
-            if (mixingLog.isLoggable(Level.FINE)) {
+            if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                 mixingLog.fine("this = " + this);
             }
 
@@ -4206,7 +4248,7 @@
      */
     private static final int  LWD_MOUSE_DRAGGED_OVER = 1500;
 
-    private static final Logger eventLog = Logger.getLogger("java.awt.event.LightweightDispatcher");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
 
     LightweightDispatcher(Container nativeContainer) {
         this.nativeContainer = nativeContainer;
@@ -4348,10 +4390,10 @@
             // This may send it somewhere that doesn't have MouseWheelEvents
             // enabled.  In this case, Component.dispatchEventImpl() will
             // retarget the event to a parent that DOES have the events enabled.
-            if (eventLog.isLoggable(Level.FINEST) && (mouseOver != null)) {
-                eventLog.log(Level.FINEST, "retargeting mouse wheel to " +
-                             mouseOver.getName() + ", " +
-                             mouseOver.getClass());
+            if (eventLog.isLoggable(PlatformLogger.FINEST) && (mouseOver != null)) {
+                eventLog.finest("retargeting mouse wheel to " +
+                                mouseOver.getName() + ", " +
+                                mouseOver.getClass());
             }
             retargetMouseEvent(mouseOver, id, e);
         break;
--- a/jdk/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Wed Jul 05 17:01:52 2017 +0200
@@ -24,9 +24,9 @@
  */
 package java.awt;
 
-import java.util.logging.*;
 import java.util.List;
 import java.util.ArrayList;
+import sun.util.logging.PlatformLogger;
 
 /**
  * A FocusTraversalPolicy that determines traversal order based on the order
@@ -60,7 +60,7 @@
 public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
     implements java.io.Serializable
 {
-    private static final Logger log = Logger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
 
     final private int FORWARD_TRAVERSAL = 0;
     final private int BACKWARD_TRAVERSAL = 1;
@@ -165,7 +165,7 @@
                 if (getImplicitDownCycleTraversal()) {
                     retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont);
 
-                    if (retComp != null && log.isLoggable(Level.FINE)) {
+                    if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
                         log.fine("### Transfered focus down-cycle to " + retComp +
                                  " in the focus cycle root " + cont);
                     }
@@ -177,7 +177,7 @@
                            cont.getFocusTraversalPolicy().getDefaultComponent(cont) :
                            cont.getFocusTraversalPolicy().getLastComponent(cont));
 
-                if (retComp != null && log.isLoggable(Level.FINE)) {
+                if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont);
                 }
             }
@@ -208,7 +208,7 @@
      *         aComponent is null
      */
     public Component getComponentAfter(Container aContainer, Component aComponent) {
-        if (log.isLoggable(Level.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent);
 
         if (aContainer == null || aComponent == null) {
             throw new IllegalArgumentException("aContainer and aComponent cannot be null");
@@ -236,7 +236,7 @@
             // See if the component is inside of policy provider.
             Container provider = getTopmostProvider(aContainer, aComponent);
             if (provider != null) {
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("### Asking FTP " + provider + " for component after " + aComponent);
                 }
 
@@ -247,7 +247,7 @@
                 // Null result means that we overstepped the limit of the FTP's cycle.
                 // In that case we must quit the cycle, otherwise return the component found.
                 if (afterComp != null) {
-                    if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + afterComp);
+                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + afterComp);
                     return afterComp;
                 }
                 aComponent = provider;
@@ -255,12 +255,12 @@
 
             List<Component> cycle = getFocusTraversalCycle(aContainer);
 
-            if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
 
             int index = getComponentIndex(cycle, aComponent);
 
             if (index < 0) {
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
                 }
                 return getFirstComponent(aContainer);
@@ -325,7 +325,7 @@
             // See if the component is inside of policy provider.
             Container provider = getTopmostProvider(aContainer, aComponent);
             if (provider != null) {
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("### Asking FTP " + provider + " for component after " + aComponent);
                 }
 
@@ -336,7 +336,7 @@
                 // Null result means that we overstepped the limit of the FTP's cycle.
                 // In that case we must quit the cycle, otherwise return the component found.
                 if (beforeComp != null) {
-                    if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + beforeComp);
+                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + beforeComp);
                     return beforeComp;
                 }
                 aComponent = provider;
@@ -349,12 +349,12 @@
 
             List<Component> cycle = getFocusTraversalCycle(aContainer);
 
-            if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
 
             int index = getComponentIndex(cycle, aComponent);
 
             if (index < 0) {
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
                 }
                 return getLastComponent(aContainer);
@@ -401,7 +401,7 @@
     public Component getFirstComponent(Container aContainer) {
         List<Component> cycle;
 
-        if (log.isLoggable(Level.FINE)) log.fine("### Getting first component in " + aContainer);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting first component in " + aContainer);
         if (aContainer == null) {
             throw new IllegalArgumentException("aContainer cannot be null");
 
@@ -420,10 +420,10 @@
             }
 
             if (cycle.size() == 0) {
-                if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
                 return null;
             }
-            if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
 
             for (Component comp : cycle) {
                 if (accept(comp)) {
@@ -451,7 +451,7 @@
      */
     public Component getLastComponent(Container aContainer) {
         List<Component> cycle;
-        if (log.isLoggable(Level.FINE)) log.fine("### Getting last component in " + aContainer);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting last component in " + aContainer);
 
         if (aContainer == null) {
             throw new IllegalArgumentException("aContainer cannot be null");
@@ -470,10 +470,10 @@
             }
 
             if (cycle.size() == 0) {
-                if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
                 return null;
             }
-            if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
 
             for (int i= cycle.size() - 1; i >= 0; i--) {
                 Component comp = cycle.get(i);
--- a/jdk/src/share/classes/java/awt/Cursor.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Cursor.java	Wed Jul 05 17:01:52 2017 +0200
@@ -36,9 +36,9 @@
 import java.util.Properties;
 import java.util.StringTokenizer;
 
-import java.util.logging.*;
+import java.security.AccessController;
 
-import java.security.AccessController;
+import sun.util.logging.PlatformLogger;
 
 /**
  * A class to encapsulate the bitmap representation of the mouse cursor.
@@ -191,7 +191,7 @@
      */
     private static final long serialVersionUID = 8028237497568985504L;
 
-    private static final Logger log = Logger.getLogger("java.awt.Cursor");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Cursor");
 
     static {
         /* ensure that the necessary native libraries are loaded */
@@ -298,8 +298,8 @@
             String key    = prefix + DotFileSuffix;
 
             if (!systemCustomCursorProperties.containsKey(key)) {
-                if (log.isLoggable(Level.FINER)) {
-                    log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null");
+                if (log.isLoggable(PlatformLogger.FINER)) {
+                    log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
                 }
                 return null;
             }
@@ -353,8 +353,8 @@
             }
 
             if (cursor == null) {
-                if (log.isLoggable(Level.FINER)) {
-                    log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null");
+                if (log.isLoggable(PlatformLogger.FINER)) {
+                    log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
                 }
             } else {
                 systemCustomCursors.put(name, cursor);
--- a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -35,8 +35,7 @@
 import java.util.ListIterator;
 import java.util.Set;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
@@ -62,7 +61,7 @@
  * @since 1.4
  */
 public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
-    private static final Logger focusLog = Logger.getLogger("java.awt.focus.DefaultKeyboardFocusManager");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.DefaultKeyboardFocusManager");
 
     // null weak references to not create too many objects
     private static final WeakReference<Window> NULL_WINDOW_WR =
@@ -275,7 +274,7 @@
      *         <code>false</code> otherwise
      */
     public boolean dispatchEvent(AWTEvent e) {
-        if (focusLog.isLoggable(Level.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e);
+        if (focusLog.isLoggable(PlatformLogger.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e);
         switch (e.getID()) {
             case WindowEvent.WINDOW_GAINED_FOCUS: {
                 WindowEvent we = (WindowEvent)e;
@@ -378,9 +377,9 @@
 
                     // The component which last has the focus when this window was focused
                     // should receive focus first
-                    if (focusLog.isLoggable(Level.FINER)) {
-                        focusLog.log(Level.FINER, "tempLost {0}, toFocus {1}",
-                                     new Object[]{tempLost, toFocus});
+                    if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                        focusLog.finer("tempLost {0}, toFocus {1}",
+                                       tempLost, toFocus);
                     }
                     if (tempLost != null) {
                         tempLost.requestFocusInWindow(CausedFocusEvent.Cause.ACTIVATION);
@@ -447,8 +446,8 @@
                 Component oldFocusOwner = getGlobalFocusOwner();
                 Component newFocusOwner = fe.getComponent();
                 if (oldFocusOwner == newFocusOwner) {
-                    if (focusLog.isLoggable(Level.FINE)) {
-                        focusLog.log(Level.FINE, "Skipping {0} because focus owner is the same", new Object[] {e});
+                    if (focusLog.isLoggable(PlatformLogger.FINE)) {
+                        focusLog.fine("Skipping {0} because focus owner is the same", e);
                     }
                     // We can't just drop the event - there could be
                     // type-ahead markers associated with it.
@@ -565,16 +564,16 @@
                 FocusEvent fe = (FocusEvent)e;
                 Component currentFocusOwner = getGlobalFocusOwner();
                 if (currentFocusOwner == null) {
-                    if (focusLog.isLoggable(Level.FINE)) focusLog.log(Level.FINE, "Skipping {0} because focus owner is null",
-                                                                        new Object[] {e});
+                    if (focusLog.isLoggable(PlatformLogger.FINE))
+                        focusLog.fine("Skipping {0} because focus owner is null", e);
                     break;
                 }
                 // Ignore cases where a Component loses focus to itself.
                 // If we make a mistake because of retargeting, then the
                 // FOCUS_GAINED handler will correct it.
                 if (currentFocusOwner == fe.getOppositeComponent()) {
-                    if (focusLog.isLoggable(Level.FINE)) focusLog.log(Level.FINE, "Skipping {0} because current focus owner is equal to opposite",
-                                                                      new Object[] {e});
+                    if (focusLog.isLoggable(PlatformLogger.FINE))
+                        focusLog.fine("Skipping {0} because current focus owner is equal to opposite", e);
                     break;
                 }
 
@@ -642,9 +641,10 @@
                 Window losingFocusWindow = we.getWindow();
                 Window activeWindow = getGlobalActiveWindow();
                 Window oppositeWindow = we.getOppositeWindow();
-                if (focusLog.isLoggable(Level.FINE)) focusLog.log(Level.FINE, "Active {0}, Current focused {1}, losing focus {2} opposite {3}",
-                                                                  new Object[] {activeWindow, currentFocusedWindow,
-                                                                                losingFocusWindow, oppositeWindow});
+                if (focusLog.isLoggable(PlatformLogger.FINE))
+                    focusLog.fine("Active {0}, Current focused {1}, losing focus {2} opposite {3}",
+                                  activeWindow, currentFocusedWindow,
+                                  losingFocusWindow, oppositeWindow);
                 if (currentFocusedWindow == null) {
                     break;
                 }
@@ -828,7 +828,7 @@
                         }
                     }
                     if (ke != null) {
-                        focusLog.log(Level.FINER, "Pumping approved event {0}", new Object[] {ke});
+                        focusLog.finer("Pumping approved event {0}", ke);
                         enqueuedKeyEvents.removeFirst();
                     }
                 }
@@ -843,14 +843,14 @@
      * Dumps the list of type-ahead queue markers to stderr
      */
     void dumpMarkers() {
-        if (focusLog.isLoggable(Level.FINEST)) {
-            focusLog.log(Level.FINEST, ">>> Markers dump, time: {0}", System.currentTimeMillis());
+        if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+            focusLog.finest(">>> Markers dump, time: {0}", System.currentTimeMillis());
             synchronized (this) {
                 if (typeAheadMarkers.size() != 0) {
                     Iterator iter = typeAheadMarkers.iterator();
                     while (iter.hasNext()) {
                         TypeAheadMarker marker = (TypeAheadMarker)iter.next();
-                        focusLog.log(Level.FINEST, "    {0}", marker);
+                        focusLog.finest("    {0}", marker);
                     }
                 }
             }
@@ -878,7 +878,7 @@
                         // The fix is rolled out.
 
                         if (ke.getWhen() > marker.after) {
-                            focusLog.log(Level.FINER, "Storing event {0} because of marker {1}", new Object[] {ke, marker});
+                            focusLog.finer("Storing event {0} because of marker {1}", ke, marker);
                             enqueuedKeyEvents.addLast(ke);
                             return true;
                         }
@@ -890,7 +890,7 @@
             }
 
             case FocusEvent.FOCUS_GAINED:
-                focusLog.log(Level.FINEST, "Markers before FOCUS_GAINED on {0}", new Object[] {target});
+                focusLog.finest("Markers before FOCUS_GAINED on {0}", target);
                 dumpMarkers();
                 // Search the marker list for the first marker tied to
                 // the Component which just gained focus. Then remove
@@ -919,10 +919,10 @@
                         }
                     } else {
                         // Exception condition - event without marker
-                        focusLog.log(Level.FINER, "Event without marker {0}", e);
+                        focusLog.finer("Event without marker {0}", e);
                     }
                 }
-                focusLog.log(Level.FINEST, "Markers after FOCUS_GAINED");
+                focusLog.finest("Markers after FOCUS_GAINED");
                 dumpMarkers();
 
                 redispatchEvent(target, e);
@@ -1159,8 +1159,8 @@
             return;
         }
 
-        focusLog.log(Level.FINER, "Enqueue at {0} for {1}",
-                     new Object[] {after, untilFocused});
+        focusLog.finer("Enqueue at {0} for {1}",
+                       after, untilFocused);
 
         int insertionIndex = 0,
             i = typeAheadMarkers.size();
@@ -1199,8 +1199,8 @@
             return;
         }
 
-        focusLog.log(Level.FINER, "Dequeue at {0} for {1}",
-                     new Object[] {after, untilFocused});
+        focusLog.finer("Dequeue at {0} for {1}",
+                       after, untilFocused);
 
         TypeAheadMarker marker;
         ListIterator iter = typeAheadMarkers.listIterator
--- a/jdk/src/share/classes/java/awt/Dialog.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Dialog.java	Wed Jul 05 17:01:52 2017 +0200
@@ -856,7 +856,7 @@
         if (type == ModalityType.TOOLKIT_MODAL) {
             SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
-                sm.checkPermission(SecurityConstants.TOOLKIT_MODALITY_PERMISSION);
+                sm.checkPermission(SecurityConstants.AWT.TOOLKIT_MODALITY_PERMISSION);
             }
         }
         modalityType = type;
--- a/jdk/src/share/classes/java/awt/EventDispatchThread.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/EventDispatchThread.java	Wed Jul 05 17:01:52 2017 +0200
@@ -36,7 +36,7 @@
 import sun.awt.SunToolkit;
 
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
 import sun.awt.EventQueueDelegate;
@@ -61,7 +61,7 @@
  * @since 1.1
  */
 class EventDispatchThread extends Thread {
-    private static final Logger eventLog = Logger.getLogger("java.awt.event.EventDispatchThread");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
 
     private EventQueue theQueue;
     private boolean doDispatch = true;
@@ -275,8 +275,8 @@
             }
             while (eventOK == false);
 
-            if (eventLog.isLoggable(Level.FINEST)) {
-                eventLog.log(Level.FINEST, "Dispatching: " + event);
+            if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+                eventLog.finest("Dispatching: " + event);
             }
 
             Object handle = null;
@@ -308,8 +308,8 @@
     }
 
     private void processException(Throwable e) {
-        if (eventLog.isLoggable(Level.FINE)) {
-            eventLog.log(Level.FINE, "Processing exception: " + e);
+        if (eventLog.isLoggable(PlatformLogger.FINE)) {
+            eventLog.fine("Processing exception: " + e);
         }
         getUncaughtExceptionHandler().uncaughtException(this, e);
         // don't rethrow the exception to avoid EDT recreation
--- a/jdk/src/share/classes/java/awt/EventQueue.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/EventQueue.java	Wed Jul 05 17:01:52 2017 +0200
@@ -36,7 +36,7 @@
 import java.security.PrivilegedAction;
 
 import java.util.EmptyStackException;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.AppContext;
 import sun.awt.AWTAutoShutdown;
@@ -153,7 +153,7 @@
 
     private final String name = "AWT-EventQueue-" + nextThreadNum();
 
-    private static final Logger eventLog = Logger.getLogger("java.awt.event.EventQueue");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventQueue");
 
     static {
         AWTAccessor.setEventQueueAccessor(
@@ -707,8 +707,8 @@
      * @since           1.2
      */
     public synchronized void push(EventQueue newEventQueue) {
-        if (eventLog.isLoggable(Level.FINE)) {
-            eventLog.log(Level.FINE, "EventQueue.push(" + newEventQueue + ")");
+        if (eventLog.isLoggable(PlatformLogger.FINE)) {
+            eventLog.fine("EventQueue.push(" + newEventQueue + ")");
         }
 
         if (nextQueue != null) {
@@ -722,8 +722,8 @@
                 try {
                     newEventQueue.postEventPrivate(getNextEvent());
                 } catch (InterruptedException ie) {
-                    if (eventLog.isLoggable(Level.FINE)) {
-                        eventLog.log(Level.FINE, "Interrupted push", ie);
+                    if (eventLog.isLoggable(PlatformLogger.FINE)) {
+                        eventLog.fine("Interrupted push", ie);
                     }
                 }
             }
@@ -766,8 +766,8 @@
      * @since           1.2
      */
     protected void pop() throws EmptyStackException {
-        if (eventLog.isLoggable(Level.FINE)) {
-            eventLog.log(Level.FINE, "EventQueue.pop(" + this + ")");
+        if (eventLog.isLoggable(PlatformLogger.FINE)) {
+            eventLog.fine("EventQueue.pop(" + this + ")");
         }
 
         // To prevent deadlock, we lock on the previous EventQueue before
@@ -790,8 +790,8 @@
                 try {
                     previousQueue.postEventPrivate(getNextEvent());
                 } catch (InterruptedException ie) {
-                    if (eventLog.isLoggable(Level.FINE)) {
-                        eventLog.log(Level.FINE, "Interrupted pop", ie);
+                    if (eventLog.isLoggable(PlatformLogger.FINE)) {
+                        eventLog.fine("Interrupted pop", ie);
                     }
                 }
             }
@@ -843,7 +843,8 @@
 
     final void initDispatchThread() {
         synchronized (this) {
-            if (dispatchThread == null && !threadGroup.isDestroyed()) {
+            AppContext appContext = AppContext.getAppContext();
+            if (dispatchThread == null && !threadGroup.isDestroyed() && !appContext.isDisposed()) {
                 dispatchThread = (EventDispatchThread)
                     AccessController.doPrivileged(new PrivilegedAction() {
                         public Object run() {
--- a/jdk/src/share/classes/java/awt/Font.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Font.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,7 +30,6 @@
 import java.awt.font.LineMetrics;
 import java.awt.font.TextAttribute;
 import java.awt.font.TextLayout;
-import java.awt.font.TransformAttribute;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
@@ -42,21 +41,21 @@
 import java.text.AttributedCharacterIterator.Attribute;
 import java.text.CharacterIterator;
 import java.text.StringCharacterIterator;
-import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Locale;
 import java.util.Map;
 import sun.font.StandardGlyphVector;
-import sun.java2d.FontSupport;
 
 import sun.font.AttributeMap;
 import sun.font.AttributeValues;
-import sun.font.EAttribute;
 import sun.font.CompositeFont;
 import sun.font.CreatedFontTracker;
 import sun.font.Font2D;
 import sun.font.Font2DHandle;
+import sun.font.FontAccess;
 import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
 import sun.font.GlyphLayout;
 import sun.font.FontLineMetrics;
 import sun.font.CoreMetrics;
@@ -223,10 +222,29 @@
  */
 public class Font implements java.io.Serializable
 {
+    private static class FontAccessImpl extends FontAccess {
+        public Font2D getFont2D(Font font) {
+            return font.getFont2D();
+        }
+
+        public void setFont2D(Font font, Font2DHandle handle) {
+            font.font2DHandle = handle;
+        }
+
+        public void setCreatedFont(Font font) {
+            font.createdFont = true;
+        }
+
+        public boolean isCreatedFont(Font font) {
+            return font.createdFont;
+        }
+    }
+
     static {
         /* ensure that the necessary native libraries are loaded */
         Toolkit.loadLibraries();
         initIDs();
+        FontAccess.setFontAccess(new FontAccessImpl());
     }
 
     /**
@@ -464,16 +482,17 @@
     }
 
     private Font2D getFont2D() {
-        if (FontManager.usingPerAppContextComposites &&
+        FontManager fm = FontManagerFactory.getInstance();
+        if (fm.usingPerAppContextComposites() &&
             font2DHandle != null &&
             font2DHandle.font2D instanceof CompositeFont &&
             ((CompositeFont)(font2DHandle.font2D)).isStdComposite()) {
-            return FontManager.findFont2D(name, style,
+            return fm.findFont2D(name, style,
                                           FontManager.LOGICAL_FALLBACK);
         } else if (font2DHandle == null) {
             font2DHandle =
-                FontManager.findFont2D(name, style,
-                                       FontManager.LOGICAL_FALLBACK).handle;
+                fm.findFont2D(name, style,
+                              FontManager.LOGICAL_FALLBACK).handle;
         }
         /* Do not cache the de-referenced font2D. It must be explicitly
          * de-referenced to pick up a valid font in the event that the
@@ -570,8 +589,8 @@
         if (created) {
             if (handle.font2D instanceof CompositeFont &&
                 handle.font2D.getStyle() != style) {
-                this.font2DHandle =
-                    FontManager.getNewComposite(null, style, handle);
+                FontManager fm = FontManagerFactory.getInstance();
+                this.font2DHandle = fm.getNewComposite(null, style, handle);
             } else {
                 this.font2DHandle = handle;
             }
@@ -586,9 +605,9 @@
         /* Font2D instances created by this method track their font file
          * so that when the Font2D is GC'd it can also remove the file.
          */
-        this.font2DHandle =
-            FontManager.createFont2D(fontFile, fontFormat,
-                                     isCopy, tracker).handle;
+        FontManager fm = FontManagerFactory.getInstance();
+        this.font2DHandle = fm.createFont2D(fontFile, fontFormat, isCopy,
+                                            tracker).handle;
         this.name = this.font2DHandle.font2D.getFontName(Locale.getDefault());
         this.style = Font.PLAIN;
         this.size = 1;
@@ -640,8 +659,9 @@
             }
             if (handle.font2D instanceof CompositeFont) {
                 if (newStyle != -1 || newName != null) {
+                    FontManager fm = FontManagerFactory.getInstance();
                     this.font2DHandle =
-                        FontManager.getNewComposite(newName, newStyle, handle);
+                        fm.getNewComposite(newName, newStyle, handle);
                 }
             } else if (newName != null) {
                 this.createdFont = false;
@@ -852,7 +872,6 @@
             throw new IllegalArgumentException ("font format not recognized");
         }
         boolean copiedFontData = false;
-
         try {
             final File tFile = AccessController.doPrivileged(
                 new PrivilegedExceptionAction<File>() {
@@ -2320,7 +2339,7 @@
             (values.getKerning() == 0 && values.getLigatures() == 0 &&
               values.getBaselineTransform() == null);
         if (simple) {
-            simple = !FontManager.isComplexText(chars, beginIndex, limit);
+            simple = ! FontUtilities.isComplexText(chars, beginIndex, limit);
         }
 
         if (simple) {
--- a/jdk/src/share/classes/java/awt/GraphicsEnvironment.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/GraphicsEnvironment.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,9 +27,14 @@
 package java.awt;
 
 import java.awt.image.BufferedImage;
+import java.security.AccessController;
 import java.util.Locale;
+
+import sun.font.FontManager;
+import sun.font.FontManagerFactory;
 import sun.java2d.HeadlessGraphicsEnvironment;
 import sun.java2d.SunGraphicsEnvironment;
+import sun.security.action.GetPropertyAction;
 
 /**
  *
@@ -73,35 +78,53 @@
      */
     public static synchronized GraphicsEnvironment getLocalGraphicsEnvironment() {
         if (localEnv == null) {
-            String nm = (String) java.security.AccessController.doPrivileged
-                (new sun.security.action.GetPropertyAction
-                 ("java.awt.graphicsenv", null));
-
-            try {
-//                      long t0 = System.currentTimeMillis();
-                ClassLoader cl = ClassLoader.getSystemClassLoader();
-                Class geCls = Class.forName(nm, true, cl);
-                localEnv = (GraphicsEnvironment)geCls.newInstance();
-//              long t1 = System.currentTimeMillis();
-//              System.out.println("GE creation took " + (t1-t0)+ "ms.");
-                if (isHeadless()) {
-                    localEnv = new HeadlessGraphicsEnvironment(localEnv);
-                }
-            } catch (ClassNotFoundException e) {
-                throw new Error("Could not find class: "+nm);
-            } catch (InstantiationException e) {
-                throw new Error("Could not instantiate Graphics Environment: "
-                                + nm);
-            } catch (IllegalAccessException e) {
-                throw new Error ("Could not access Graphics Environment: "
-                                 + nm);
-            }
+            localEnv = createGE();
         }
 
         return localEnv;
     }
 
     /**
+     * Creates and returns the GraphicsEnvironment, according to the
+     * system property 'java.awt.graphicsenv'.
+     *
+     * @return the graphics environment
+     */
+    private static GraphicsEnvironment createGE() {
+        GraphicsEnvironment ge;
+        String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
+        try {
+//          long t0 = System.currentTimeMillis();
+            Class geCls;
+            try {
+                // First we try if the bootclassloader finds the requested
+                // class. This way we can avoid to run in a privileged block.
+                geCls = Class.forName(nm);
+            } catch (ClassNotFoundException ex) {
+                // If the bootclassloader fails, we try again with the
+                // application classloader.
+                ClassLoader cl = ClassLoader.getSystemClassLoader();
+                geCls = Class.forName(nm, true, cl);
+            }
+            ge = (GraphicsEnvironment) geCls.newInstance();
+//          long t1 = System.currentTimeMillis();
+//          System.out.println("GE creation took " + (t1-t0)+ "ms.");
+            if (isHeadless()) {
+                localEnv = new HeadlessGraphicsEnvironment(localEnv);
+            }
+        } catch (ClassNotFoundException e) {
+            throw new Error("Could not find class: "+nm);
+        } catch (InstantiationException e) {
+            throw new Error("Could not instantiate Graphics Environment: "
+                            + nm);
+        } catch (IllegalAccessException e) {
+            throw new Error ("Could not access Graphics Environment: "
+                             + nm);
+        }
+        return ge;
+    }
+
+    /**
      * Tests whether or not a display, keyboard, and mouse can be
      * supported in this environment.  If this method returns true,
      * a HeadlessException is thrown from areas of the Toolkit
@@ -333,7 +356,8 @@
         if (font == null) {
             throw new NullPointerException("font cannot be null.");
         }
-        return sun.font.FontManager.registerFont(font);
+        FontManager fm = FontManagerFactory.getInstance();
+        return fm.registerFont(font);
     }
 
     /**
@@ -357,10 +381,8 @@
      * @since 1.5
      */
     public void preferLocaleFonts() {
-        if (!(this instanceof SunGraphicsEnvironment)) {
-            return;
-        }
-        sun.font.FontManager.preferLocaleFonts();
+        FontManager fm = FontManagerFactory.getInstance();
+        fm.preferLocaleFonts();
     }
 
     /**
@@ -380,10 +402,8 @@
      * @since 1.5
      */
     public void preferProportionalFonts() {
-        if (!(this instanceof SunGraphicsEnvironment)) {
-            return;
-        }
-        sun.font.FontManager.preferProportionalFonts();
+        FontManager fm = FontManagerFactory.getInstance();
+        fm.preferProportionalFonts();
     }
 
     /**
--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -53,8 +53,7 @@
 import java.util.StringTokenizer;
 import java.util.WeakHashMap;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.AppContext;
 import sun.awt.HeadlessToolkit;
@@ -111,7 +110,7 @@
 {
 
     // Shared focus engine logger
-    private static final Logger focusLog = Logger.getLogger("java.awt.focus.KeyboardFocusManager");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.KeyboardFocusManager");
 
     static {
         /* ensure that the necessary native libraries are loaded */
@@ -154,7 +153,7 @@
      */
     private static native void initIDs();
 
-    private static final Logger log = Logger.getLogger("java.awt.KeyboardFocusManager");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.KeyboardFocusManager");
 
     /**
      * The identifier for the Forward focus traversal keys.
@@ -504,8 +503,8 @@
             if (this == getCurrentKeyboardFocusManager()) {
                 return focusOwner;
             } else {
-                if (focusLog.isLoggable(Level.FINER)) {
-                    focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
+                if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                    focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
                 }
                 throw new SecurityException(notPrivileged);
             }
@@ -609,9 +608,9 @@
     }
 
     void setNativeFocusOwner(Component comp) {
-        if (focusLog.isLoggable(Level.FINEST)) {
-            focusLog.log(Level.FINEST, "Calling peer {0} setCurrentFocusOwner for {1}",
-                         new Object[] {peer, comp});
+        if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+            focusLog.finest("Calling peer {0} setCurrentFocusOwner for {1}",
+                            peer, comp);
         }
         peer.setCurrentFocusOwner(comp);
     }
@@ -673,8 +672,8 @@
             if (this == getCurrentKeyboardFocusManager()) {
                 return permanentFocusOwner;
             } else {
-                if (focusLog.isLoggable(Level.FINER)) {
-                    focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
+                if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                    focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
                 }
                 throw new SecurityException(notPrivileged);
             }
@@ -781,8 +780,8 @@
             if (this == getCurrentKeyboardFocusManager()) {
                return focusedWindow;
             } else {
-                if (focusLog.isLoggable(Level.FINER)) {
-                    focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
+                if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                    focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
                 }
                 throw new SecurityException(notPrivileged);
             }
@@ -885,8 +884,8 @@
             if (this == getCurrentKeyboardFocusManager()) {
                return activeWindow;
             } else {
-                if (focusLog.isLoggable(Level.FINER)) {
-                    focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
+                if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                    focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
                 }
                 throw new SecurityException(notPrivileged);
             }
@@ -919,8 +918,8 @@
         Window oldActiveWindow;
         synchronized (KeyboardFocusManager.class) {
             oldActiveWindow = getActiveWindow();
-            if (focusLog.isLoggable(Level.FINER)) {
-                focusLog.log(Level.FINER, "Setting global active window to " + activeWindow + ", old active " + oldActiveWindow);
+            if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                focusLog.finer("Setting global active window to " + activeWindow + ", old active " + oldActiveWindow);
             }
 
             try {
@@ -1215,8 +1214,8 @@
             if (this == getCurrentKeyboardFocusManager()) {
                 return currentFocusCycleRoot;
             } else {
-                if (focusLog.isLoggable(Level.FINER)) {
-                    focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
+                if (focusLog.isLoggable(PlatformLogger.FINER)) {
+                    focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
                 }
                 throw new SecurityException(notPrivileged);
             }
@@ -2149,9 +2148,9 @@
 
         HeavyweightFocusRequest(Component heavyweight, Component descendant,
                                 boolean temporary, CausedFocusEvent.Cause cause) {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 if (heavyweight == null) {
-                    log.log(Level.FINE, "Assertion (heavyweight != null) failed");
+                    log.fine("Assertion (heavyweight != null) failed");
                 }
             }
 
@@ -2161,12 +2160,12 @@
         }
         boolean addLightweightRequest(Component descendant,
                                       boolean temporary, CausedFocusEvent.Cause cause) {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 if (this == HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) {
-                    log.log(Level.FINE, "Assertion (this != HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) failed");
+                    log.fine("Assertion (this != HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) failed");
                 }
                 if (descendant == null) {
-                    log.log(Level.FINE, "Assertion (descendant != null) failed");
+                    log.fine("Assertion (descendant != null) failed");
                 }
             }
 
@@ -2339,12 +2338,12 @@
         (Component heavyweight, Component descendant, boolean temporary,
          boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
     {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (heavyweight == null) {
-                log.log(Level.FINE, "Assertion (heavyweight != null) failed");
+                log.fine("Assertion (heavyweight != null) failed");
             }
             if (time == 0) {
-                log.log(Level.FINE, "Assertion (time != 0) failed");
+                log.fine("Assertion (time != 0) failed");
             }
         }
 
@@ -2361,31 +2360,31 @@
         Component currentFocusOwner = thisManager.getGlobalFocusOwner();
         Component nativeFocusOwner = thisManager.getNativeFocusOwner();
         Window nativeFocusedWindow = thisManager.getNativeFocusedWindow();
-        if (focusLog.isLoggable(Level.FINER)) {
-            focusLog.log(Level.FINER, "SNFH for {0} in {1}",
-                         new Object[] {descendant, heavyweight});
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
+            focusLog.finer("SNFH for {0} in {1}",
+                           descendant, heavyweight);
         }
-        if (focusLog.isLoggable(Level.FINEST)) {
-            focusLog.log(Level.FINEST, "0. Current focus owner {0}",
-                         currentFocusOwner);
-            focusLog.log(Level.FINEST, "0. Native focus owner {0}",
-                         nativeFocusOwner);
-            focusLog.log(Level.FINEST, "0. Native focused window {0}",
-                         nativeFocusedWindow);
+        if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+            focusLog.finest("0. Current focus owner {0}",
+                            currentFocusOwner);
+            focusLog.finest("0. Native focus owner {0}",
+                            nativeFocusOwner);
+            focusLog.finest("0. Native focused window {0}",
+                            nativeFocusedWindow);
         }
         synchronized (heavyweightRequests) {
             HeavyweightFocusRequest hwFocusRequest = getLastHWRequest();
-            if (focusLog.isLoggable(Level.FINEST)) {
-                focusLog.log(Level.FINEST, "Request {0}", hwFocusRequest);
+            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                focusLog.finest("Request {0}", hwFocusRequest);
             }
             if (hwFocusRequest == null &&
                 heavyweight == nativeFocusOwner)
             {
                 if (descendant == currentFocusOwner) {
                     // Redundant request.
-                    if (focusLog.isLoggable(Level.FINEST))
-                        focusLog.log(Level.FINEST, "1. SNFH_FAILURE for {0}",
-                                     descendant);
+                    if (focusLog.isLoggable(PlatformLogger.FINEST))
+                        focusLog.finest("1. SNFH_FAILURE for {0}",
+                                        descendant);
                     return SNFH_FAILURE;
                 }
 
@@ -2417,8 +2416,8 @@
                 // SunToolkit.postPriorityEvent(newFocusOwnerEvent);
                 SunToolkit.postEvent(descendant.appContext, newFocusOwnerEvent);
 
-                if (focusLog.isLoggable(Level.FINEST))
-                    focusLog.log(Level.FINEST, "2. SNFH_HANDLED for {0}", descendant);
+                if (focusLog.isLoggable(PlatformLogger.FINEST))
+                    focusLog.finest("2. SNFH_HANDLED for {0}", descendant);
                 return SNFH_SUCCESS_HANDLED;
             } else if (hwFocusRequest != null &&
                        hwFocusRequest.heavyweight == heavyweight) {
@@ -2431,7 +2430,7 @@
                     manager.enqueueKeyEvents(time, descendant);
                 }
 
-                if (focusLog.isLoggable(Level.FINEST))
+                if (focusLog.isLoggable(PlatformLogger.FINEST))
                     focusLog.finest("3. SNFH_HANDLED for lightweight" +
                                     descendant + " in " + heavyweight);
                 return SNFH_SUCCESS_HANDLED;
@@ -2454,7 +2453,7 @@
                                              (hwFocusRequest != null)
                                              ? hwFocusRequest.heavyweight
                                              : nativeFocusedWindow)) {
-                        if (focusLog.isLoggable(Level.FINEST))
+                        if (focusLog.isLoggable(PlatformLogger.FINEST))
                             focusLog.finest("4. SNFH_FAILURE for " + descendant);
                         return SNFH_FAILURE;
                     }
@@ -2464,7 +2463,7 @@
                 heavyweightRequests.add
                     (new HeavyweightFocusRequest(heavyweight, descendant,
                                                  temporary, cause));
-                if (focusLog.isLoggable(Level.FINEST))
+                if (focusLog.isLoggable(PlatformLogger.FINEST))
                     focusLog.finest("5. SNFH_PROCEED for " + descendant);
                 return SNFH_SUCCESS_PROCEED;
             }
@@ -2855,13 +2854,13 @@
         }
 
         KeyboardFocusManager manager = getCurrentKeyboardFocusManager();
-        if (focusLog.isLoggable(Level.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             if (event instanceof FocusEvent || event instanceof WindowEvent) {
-                focusLog.log(Level.FINER, ">>> {0}", new Object[] {event});
+                focusLog.finer(">>> {0}", event);
             }
-            if (focusLog.isLoggable(Level.FINER) && event instanceof KeyEvent) {
-                focusLog.log(Level.FINER, "    focus owner is {0}", new Object[] {manager.getGlobalFocusOwner()});
-                focusLog.log(Level.FINER, ">>> {0}", new Object[] {event});
+            if (focusLog.isLoggable(PlatformLogger.FINER) && event instanceof KeyEvent) {
+                focusLog.finer("    focus owner is {0}", manager.getGlobalFocusOwner());
+                focusLog.finer(">>> {0}", event);
             }
         }
 
@@ -2945,9 +2944,9 @@
         }
     }
     static void removeLastFocusRequest(Component heavyweight) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (heavyweight == null) {
-                log.log(Level.FINE, "Assertion (heavyweight != null) failed");
+                log.fine("Assertion (heavyweight != null) failed");
             }
         }
 
--- a/jdk/src/share/classes/java/awt/MouseInfo.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/MouseInfo.java	Wed Jul 05 17:01:52 2017 +0200
@@ -76,7 +76,7 @@
 
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.WATCH_MOUSE_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.WATCH_MOUSE_PERMISSION);
         }
 
         Point point = new Point(0, 0);
--- a/jdk/src/share/classes/java/awt/Robot.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Robot.java	Wed Jul 05 17:01:52 2017 +0200
@@ -167,7 +167,7 @@
     private void checkRobotAllowed() {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.CREATE_ROBOT_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.CREATE_ROBOT_PERMISSION);
         }
     }
 
@@ -466,7 +466,7 @@
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
             security.checkPermission(
-                SecurityConstants.READ_DISPLAY_PIXELS_PERMISSION);
+                SecurityConstants.AWT.READ_DISPLAY_PIXELS_PERMISSION);
         }
     }
 
--- a/jdk/src/share/classes/java/awt/SplashScreen.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/SplashScreen.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,8 +29,7 @@
 import java.net.URL;
 import java.net.URLConnection;
 import java.io.File;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
 import sun.awt.image.SunWritableRaster;
 
 /**
@@ -204,8 +203,8 @@
                     }
                 }
                 catch(java.net.MalformedURLException e) {
-                    if (log.isLoggable(Level.FINE)) {
-                        log.log(Level.FINE, "MalformedURLException caught in the getImageURL() method", e);
+                    if (log.isLoggable(PlatformLogger.FINE)) {
+                        log.fine("MalformedURLException caught in the getImageURL() method", e);
                     }
                 }
             }
@@ -355,7 +354,7 @@
      */
     private static SplashScreen theInstance = null;
 
-    private static final Logger log = Logger.getLogger("java.awt.SplashScreen");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.SplashScreen");
 
     private native static void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
     private native static boolean _isVisible(long splashPtr);
--- a/jdk/src/share/classes/java/awt/SystemTray.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/SystemTray.java	Wed Jul 05 17:01:52 2017 +0200
@@ -490,7 +490,7 @@
     static void checkSystemTrayAllowed() {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.ACCESS_SYSTEM_TRAY_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.ACCESS_SYSTEM_TRAY_PERMISSION);
         }
     }
 
--- a/jdk/src/share/classes/java/awt/Toolkit.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Toolkit.java	Wed Jul 05 17:01:52 2017 +0200
@@ -48,7 +48,7 @@
 import java.io.FileInputStream;
 
 import java.util.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
@@ -1956,7 +1956,7 @@
      */
     public abstract boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType);
 
-    private static final Logger log = Logger.getLogger("java.awt.Toolkit");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Toolkit");
 
     private static final int LONG_BITS = 64;
     private int[] calls = new int[LONG_BITS];
@@ -2025,7 +2025,7 @@
         }
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-          security.checkPermission(SecurityConstants.ALL_AWT_EVENTS_PERMISSION);
+          security.checkPermission(SecurityConstants.AWT.ALL_AWT_EVENTS_PERMISSION);
         }
         synchronized (this) {
             SelectiveAWTEventListener selectiveListener =
@@ -2094,7 +2094,7 @@
         }
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.ALL_AWT_EVENTS_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.ALL_AWT_EVENTS_PERMISSION);
         }
 
         synchronized (this) {
@@ -2123,9 +2123,9 @@
         }
 
     synchronized int countAWTEventListeners(long eventMask) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (eventMask == 0) {
-                log.log(Level.FINE, "Assertion (eventMask != 0) failed");
+                log.fine("Assertion (eventMask != 0) failed");
             }
         }
 
@@ -2165,7 +2165,7 @@
     public AWTEventListener[] getAWTEventListeners() {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.ALL_AWT_EVENTS_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.ALL_AWT_EVENTS_PERMISSION);
         }
         synchronized (this) {
             EventListener[] la = ToolkitEventMulticaster.getListeners(eventListener,AWTEventListener.class);
@@ -2217,7 +2217,7 @@
     public AWTEventListener[] getAWTEventListeners(long eventMask) {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.ALL_AWT_EVENTS_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.ALL_AWT_EVENTS_PERMISSION);
         }
         synchronized (this) {
             EventListener[] la = ToolkitEventMulticaster.getListeners(eventListener,AWTEventListener.class);
--- a/jdk/src/share/classes/java/awt/Window.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/Window.java	Wed Jul 05 17:01:52 2017 +0200
@@ -48,8 +48,6 @@
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.util.concurrent.atomic.AtomicBoolean;
 import javax.accessibility.*;
 import sun.awt.AWTAccessor;
@@ -61,6 +59,7 @@
 import sun.java2d.pipe.Region;
 import sun.security.action.GetPropertyAction;
 import sun.security.util.SecurityConstants;
+import sun.util.logging.PlatformLogger;
 
 /**
  * A <code>Window</code> object is a top-level window with no borders and no
@@ -324,7 +323,7 @@
      */
     private static final long serialVersionUID = 4497834738069338734L;
 
-    private static final Logger log = Logger.getLogger("java.awt.Window");
+    private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Window");
 
     private static final boolean locationByPlatformProp;
 
@@ -1581,7 +1580,7 @@
         if (exclusionType == Dialog.ModalExclusionType.TOOLKIT_EXCLUDE) {
             SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
-                sm.checkPermission(SecurityConstants.TOOLKIT_MODALITY_PERMISSION);
+                sm.checkPermission(SecurityConstants.AWT.TOOLKIT_MODALITY_PERMISSION);
             }
         }
         modalExclusionType = exclusionType;
@@ -2129,7 +2128,7 @@
     public final void setAlwaysOnTop(boolean alwaysOnTop) throws SecurityException {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkPermission(SecurityConstants.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
+            security.checkPermission(SecurityConstants.AWT.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
         }
 
         boolean oldAlwaysOnTop;
@@ -2985,7 +2984,7 @@
         }
         synchronized (getTreeLock()) {
             super.setGraphicsConfiguration(gc);
-            if (log.isLoggable(Level.FINER)) {
+            if (log.isLoggable(PlatformLogger.FINER)) {
                 log.finer("+ Window.setGraphicsConfiguration(): new GC is \n+ " + getGraphicsConfiguration_NoClientCode() + "\n+ this is " + this);
             }
         }
--- a/jdk/src/share/classes/java/awt/color/ICC_Profile.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/color/ICC_Profile.java	Wed Jul 05 17:01:52 2017 +0200
@@ -58,6 +58,8 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import sun.misc.BootClassLoaderHook;
+
 /**
  * A representation of color profile data for device independent and
  * device dependent color spaces based on the International Color
@@ -1850,11 +1852,10 @@
                 f = new File(fullPath);
                 if (!f.isFile()) {
                     //make sure file was installed in the kernel mode
-                    try {
-                        //kernel uses platform independent paths =>
-                        //   should not use platform separator char
-                        sun.jkernel.DownloadManager.downloadFile("lib/cmm/"+fileName);
-                    } catch (IOException ioe) {}
+                    BootClassLoaderHook hook = BootClassLoaderHook.getHook();
+                    if (hook.getHook() != null) {
+                        hook.prefetchFile("lib/cmm/"+fileName);
+                    }
                 }
             }
 
--- a/jdk/src/share/classes/java/awt/event/InputEvent.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/awt/event/InputEvent.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,8 +29,7 @@
 import java.awt.Component;
 import java.awt.GraphicsEnvironment;
 import java.awt.Toolkit;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
 import java.util.Arrays;
 
 /**
@@ -55,7 +54,7 @@
  * @since 1.1
  */
 public abstract class InputEvent extends ComponentEvent {
-    private static final Logger log = Logger.getLogger("java.awt.event.InputEvent");
+    private static final PlatformLogger logger = PlatformLogger.getLogger("java.awt.event.InputEvent");
 
     /**
      * The Shift key modifier constant.
@@ -344,8 +343,8 @@
                     sm.checkSystemClipboardAccess();
                     b = true;
                 } catch (SecurityException se) {
-                    if (log.isLoggable(Level.FINE)) {
-                        log.log(Level.FINE, "InputEvent.canAccessSystemClipboard() got SecurityException ", se);
+                    if (logger.isLoggable(PlatformLogger.FINE)) {
+                        logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se);
                     }
                 }
             } else {
--- a/jdk/src/share/classes/java/lang/Boolean.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Boolean.java	Wed Jul 05 17:01:52 2017 +0200
@@ -255,7 +255,25 @@
      * @since  1.5
      */
     public int compareTo(Boolean b) {
-        return (b.value == value ? 0 : (value ? 1 : -1));
+        return compare(this.value, b.value);
+    }
+
+    /**
+     * Compares two {@code boolean} values.
+     * The value returned is identical to what would be returned by:
+     * <pre>
+     *    Boolean.valueOf(x).compareTo(Boolean.valueOf(y))
+     * </pre>
+     *
+     * @param  x the first {@code boolean} to compare
+     * @param  y the second {@code boolean} to compare
+     * @return the value {@code 0} if {@code x == y};
+     *         a value less than {@code 0} if {@code !x && y}; and
+     *         a value greater than {@code 0} if {@code x && !y}
+     * @since 1.7
+     */
+    public static int compare(boolean x, boolean y) {
+        return (x == y) ? 0 : (x ? 1 : -1);
     }
 
     private static boolean toBoolean(String name) {
--- a/jdk/src/share/classes/java/lang/Byte.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Byte.java	Wed Jul 05 17:01:52 2017 +0200
@@ -201,7 +201,7 @@
      */
     public static Byte valueOf(String s, int radix)
         throws NumberFormatException {
-        return new Byte(parseByte(s, radix));
+        return valueOf(parseByte(s, radix));
     }
 
     /**
@@ -277,7 +277,7 @@
         if (i < MIN_VALUE || i > MAX_VALUE)
             throw new NumberFormatException(
                     "Value " + i + " out of range from input " + nm);
-        return (byte)i;
+        return valueOf((byte)i);
     }
 
     /**
@@ -374,11 +374,14 @@
      *          base&nbsp;10.
      */
     public String toString() {
-        return String.valueOf((int)value);
+        return Integer.toString((int)value);
     }
 
     /**
-     * Returns a hash code for this {@code Byte}.
+     * Returns a hash code for this {@code Byte}; equal to the result
+     * of invoking {@code intValue()}.
+     *
+     * @return a hash code value for this {@code Byte}
      */
     public int hashCode() {
         return (int)value;
@@ -415,7 +418,25 @@
      * @since   1.2
      */
     public int compareTo(Byte anotherByte) {
-        return this.value - anotherByte.value;
+        return compare(this.value, anotherByte.value);
+    }
+
+    /**
+     * Compares two {@code byte} values numerically.
+     * The value returned is identical to what would be returned by:
+     * <pre>
+     *    Byte.valueOf(x).compareTo(Byte.valueOf(y))
+     * </pre>
+     *
+     * @param  x the first {@code byte} to compare
+     * @param  y the second {@code byte} to compare
+     * @return the value {@code 0} if {@code x == y};
+     *         a value less than {@code 0} if {@code x < y}; and
+     *         a value greater than {@code 0} if {@code x > y}
+     * @since 1.7
+     */
+    public static int compare(byte x, byte y) {
+        return x - y;
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Character.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Character.java	Wed Jul 05 17:01:52 2017 +0200
@@ -2612,8 +2612,10 @@
     }
 
     /**
-     * Returns a hash code for this <code>Character</code>.
-     * @return  a hash code value for this object.
+     * Returns a hash code for this {@code Character}; equal to the result
+     * of invoking {@code charValue()}.
+     *
+     * @return a hash code value for this {@code Character}
      */
     public int hashCode() {
         return (int)value;
@@ -4962,7 +4964,25 @@
      * @since   1.2
      */
     public int compareTo(Character anotherCharacter) {
-        return this.value - anotherCharacter.value;
+        return compare(this.value, anotherCharacter.value);
+    }
+
+    /**
+     * Compares two {@code char} values numerically.
+     * The value returned is identical to what would be returned by:
+     * <pre>
+     *    Character.valueOf(x).compareTo(Character.valueOf(y))
+     * </pre>
+     *
+     * @param  x the first {@code char} to compare
+     * @param  y the second {@code char} to compare
+     * @return the value {@code 0} if {@code x == y};
+     *         a value less than {@code 0} if {@code x < y}; and
+     *         a value greater than {@code 0} if {@code x > y}
+     * @since 1.7
+     */
+    public static int compare(char x, char y) {
+        return x - y;
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Class.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Class.java	Wed Jul 05 17:01:52 2017 +0200
@@ -265,7 +265,7 @@
     }
 
     /** Called after security checks have been made. */
-    private static native Class forName0(String name, boolean initialize,
+    private static native Class<?> forName0(String name, boolean initialize,
                                             ClassLoader loader)
         throws ClassNotFoundException;
 
@@ -339,7 +339,7 @@
                 );
             }
             try {
-                Class[] empty = {};
+                Class<?>[] empty = {};
                 final Constructor<T> c = getConstructor0(empty, Member.DECLARED);
                 // Disable accessibility checks on the constructor
                 // since we have to do the security check here anyway
@@ -361,7 +361,7 @@
         // Security check (same as in java.lang.reflect.Constructor)
         int modifiers = tmpConstructor.getModifiers();
         if (!Reflection.quickCheckMemberAccess(this, modifiers)) {
-            Class caller = Reflection.getCallerClass(3);
+            Class<?> caller = Reflection.getCallerClass(3);
             if (newInstanceCallerCache != caller) {
                 Reflection.ensureMemberAccess(caller, this, null, modifiers);
                 newInstanceCallerCache = caller;
@@ -377,7 +377,7 @@
         }
     }
     private volatile transient Constructor<T> cachedConstructor;
-    private volatile transient Class       newInstanceCallerCache;
+    private volatile transient Class<?>       newInstanceCallerCache;
 
 
     /**
@@ -638,7 +638,7 @@
         if (getGenericSignature() != null)
             return (TypeVariable<Class<T>>[])getGenericInfo().getTypeParameters();
         else
-            return (TypeVariable<Class<T>>[])new TypeVariable[0];
+            return (TypeVariable<Class<T>>[])new TypeVariable<?>[0];
     }
 
 
@@ -901,7 +901,7 @@
 
             MethodRepository typeInfo = MethodRepository.make(enclosingInfo.getDescriptor(),
                                                               getFactory());
-            Class      returnType       = toClass(typeInfo.getReturnType());
+            Class<?>   returnType       = toClass(typeInfo.getReturnType());
             Type []    parameterTypes   = typeInfo.getParameterTypes();
             Class<?>[] parameterClasses = new Class<?>[parameterTypes.length];
 
@@ -996,12 +996,12 @@
 
     }
 
-    private static Class toClass(Type o) {
+    private static Class<?> toClass(Type o) {
         if (o instanceof GenericArrayType)
             return Array.newInstance(toClass(((GenericArrayType)o).getGenericComponentType()),
                                      0)
                 .getClass();
-        return (Class)o;
+        return (Class<?>)o;
      }
 
     /**
@@ -1042,7 +1042,7 @@
              * Loop over all declared constructors; match number
              * of and type of parameters.
              */
-            for(Constructor c: enclosingInfo.getEnclosingClass().getDeclaredConstructors()) {
+            for(Constructor<?> c: enclosingInfo.getEnclosingClass().getDeclaredConstructors()) {
                 Class<?>[] candidateParamClasses = c.getParameterTypes();
                 if (candidateParamClasses.length == parameterClasses.length) {
                     boolean matches = true;
@@ -1304,12 +1304,12 @@
         // has already been ok'd by the SecurityManager.
 
         return java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Class[]>() {
+            new java.security.PrivilegedAction<Class<?>[]>() {
                 public Class[] run() {
-                    List<Class> list = new ArrayList<Class>();
-                    Class currentClass = Class.this;
+                    List<Class<?>> list = new ArrayList<Class<?>>();
+                    Class<?> currentClass = Class.this;
                     while (currentClass != null) {
-                        Class[] members = currentClass.getDeclaredClasses();
+                        Class<?>[] members = currentClass.getDeclaredClasses();
                         for (int i = 0; i < members.length; i++) {
                             if (Modifier.isPublic(members[i].getModifiers())) {
                                 list.add(members[i]);
@@ -2191,7 +2191,7 @@
             return name;
         }
         if (!name.startsWith("/")) {
-            Class c = this;
+            Class<?> c = this;
             while (c.isArray()) {
                 c = c.getComponentType();
             }
@@ -2565,12 +2565,12 @@
         // out concrete implementations inherited from superclasses at
         // the end.
         MethodArray inheritedMethods = new MethodArray();
-        Class[] interfaces = getInterfaces();
+        Class<?>[] interfaces = getInterfaces();
         for (int i = 0; i < interfaces.length; i++) {
             inheritedMethods.addAll(interfaces[i].privateGetPublicMethods());
         }
         if (!isInterface()) {
-            Class c = getSuperclass();
+            Class<?> c = getSuperclass();
             if (c != null) {
                 MethodArray supers = new MethodArray();
                 supers.addAll(c.privateGetPublicMethods());
@@ -2632,16 +2632,16 @@
             return res;
         }
         // Direct superinterfaces, recursively
-        Class[] interfaces = getInterfaces();
+        Class<?>[] interfaces = getInterfaces();
         for (int i = 0; i < interfaces.length; i++) {
-            Class c = interfaces[i];
+            Class<?> c = interfaces[i];
             if ((res = c.getField0(name)) != null) {
                 return res;
             }
         }
         // Direct superclass, recursively
         if (!isInterface()) {
-            Class c = getSuperclass();
+            Class<?> c = getSuperclass();
             if (c != null) {
                 if ((res = c.getField0(name)) != null) {
                     return res;
@@ -2653,7 +2653,7 @@
 
     private static Method searchMethods(Method[] methods,
                                         String name,
-                                        Class[] parameterTypes)
+                                        Class<?>[] parameterTypes)
     {
         Method res = null;
         String internedName = name.intern();
@@ -2670,7 +2670,7 @@
     }
 
 
-    private Method getMethod0(String name, Class[] parameterTypes) {
+    private Method getMethod0(String name, Class<?>[] parameterTypes) {
         // Note: the intent is that the search algorithm this routine
         // uses be equivalent to the ordering imposed by
         // privateGetPublicMethods(). It fetches only the declared
@@ -2687,7 +2687,7 @@
         }
         // Search superclass's methods
         if (!isInterface()) {
-            Class c = getSuperclass();
+            Class<? super T> c = getSuperclass();
             if (c != null) {
                 if ((res = c.getMethod0(name, parameterTypes)) != null) {
                     return res;
@@ -2695,9 +2695,9 @@
             }
         }
         // Search superinterfaces' methods
-        Class[] interfaces = getInterfaces();
+        Class<?>[] interfaces = getInterfaces();
         for (int i = 0; i < interfaces.length; i++) {
-            Class c = interfaces[i];
+            Class<?> c = interfaces[i];
             if ((res = c.getMethod0(name, parameterTypes)) != null) {
                 return res;
             }
@@ -2706,7 +2706,7 @@
         return null;
     }
 
-    private Constructor<T> getConstructor0(Class[] parameterTypes,
+    private Constructor<T> getConstructor0(Class<?>[] parameterTypes,
                                         int which) throws NoSuchMethodException
     {
         Constructor<T>[] constructors = privateGetDeclaredConstructors((which == Member.PUBLIC));
@@ -2775,9 +2775,9 @@
     private native Field[]       getDeclaredFields0(boolean publicOnly);
     private native Method[]      getDeclaredMethods0(boolean publicOnly);
     private native Constructor<T>[] getDeclaredConstructors0(boolean publicOnly);
-    private native Class[]   getDeclaredClasses0();
+    private native Class<?>[]   getDeclaredClasses0();
 
-    private static String        argumentTypesToString(Class[] argTypes) {
+    private static String        argumentTypesToString(Class<?>[] argTypes) {
         StringBuilder buf = new StringBuilder();
         buf.append("(");
         if (argTypes != null) {
@@ -2785,7 +2785,7 @@
                 if (i > 0) {
                     buf.append(", ");
                 }
-                Class c = argTypes[i];
+                Class<?> c = argTypes[i];
                 buf.append((c == null) ? "null" : c.getName());
             }
         }
@@ -2858,7 +2858,7 @@
     }
 
     // Retrieves the desired assertion status of this class from the VM
-    private static native boolean desiredAssertionStatus0(Class clazz);
+    private static native boolean desiredAssertionStatus0(Class<?> clazz);
 
     /**
      * Returns true if and only if this class was declared as an enum in the
@@ -2979,7 +2979,7 @@
                     getName() + " is not an enum type");
             Map<String, T> m = new HashMap<String, T>(2 * universe.length);
             for (T constant : universe)
-                m.put(((Enum)constant).name(), constant);
+                m.put(((Enum<?>)constant).name(), constant);
             enumConstantDirectory = m;
         }
         return enumConstantDirectory;
@@ -3077,8 +3077,8 @@
     }
 
     // Annotations cache
-    private transient Map<Class, Annotation> annotations;
-    private transient Map<Class, Annotation> declaredAnnotations;
+    private transient Map<Class<? extends Annotation>, Annotation> annotations;
+    private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations;
 
     private synchronized void initAnnotationsIfNecessary() {
         clearCachesOnClassRedefinition();
@@ -3090,10 +3090,10 @@
         if (superClass == null) {
             annotations = declaredAnnotations;
         } else {
-            annotations = new HashMap<Class, Annotation>();
+            annotations = new HashMap<Class<? extends Annotation>, Annotation>();
             superClass.initAnnotationsIfNecessary();
-            for (Map.Entry<Class, Annotation> e : superClass.annotations.entrySet()) {
-                Class annotationClass = e.getKey();
+            for (Map.Entry<Class<? extends Annotation>, Annotation> e : superClass.annotations.entrySet()) {
+                Class<? extends Annotation> annotationClass = e.getKey();
                 if (AnnotationType.getInstance(annotationClass).isInherited())
                     annotations.put(annotationClass, e.getValue());
             }
--- a/jdk/src/share/classes/java/lang/ClassLoader.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java	Wed Jul 05 17:01:52 2017 +0200
@@ -51,6 +51,7 @@
 import java.util.Hashtable;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
+import sun.misc.BootClassLoaderHook;
 import sun.misc.ClassFileTransformer;
 import sun.misc.CompoundEnumeration;
 import sun.misc.Resource;
@@ -58,7 +59,6 @@
 import sun.misc.VM;
 import sun.reflect.Reflection;
 import sun.security.util.SecurityConstants;
-import sun.jkernel.DownloadManager;
 
 /**
  * A class loader is an object that is responsible for loading classes. The
@@ -1300,21 +1300,7 @@
      * Find resources from the VM's built-in classloader.
      */
     private static URL getBootstrapResource(String name) {
-        try {
-            // If this is a known JRE resource, ensure that its bundle is
-            // downloaded.  If it isn't known, we just ignore the download
-            // failure and check to see if we can find the resource anyway
-            // (which is possible if the boot class path has been modified).
-            if (sun.misc.VM.isBootedKernelVM()) {
-                sun.jkernel.DownloadManager.getBootClassPathEntryForResource(
-                    name);
-            }
-        } catch (NoClassDefFoundError e) {
-            // This happens while Java itself is being compiled; DownloadManager
-            // isn't accessible when this code is first invoked.  It isn't an
-            // issue, as if we can't find DownloadManager, we can safely assume
-            // that additional code is not available for download.
-        }
+        BootClassLoaderHook.preLoadResource(name);
         URLClassPath ucp = getBootstrapClassPath();
         Resource res = ucp.getResource(name);
         return res != null ? res.getURL() : null;
@@ -1831,24 +1817,7 @@
     // Invoked in the java.lang.Runtime class to implement load and loadLibrary.
     static void loadLibrary(Class fromClass, String name,
                             boolean isAbsolute) {
-        try {
-            if (VM.isBootedKernelVM() && !DownloadManager.isJREComplete() &&
-                    !DownloadManager.isCurrentThreadDownloading()) {
-                DownloadManager.downloadFile("bin/" +
-                    System.mapLibraryName(name));
-                // it doesn't matter if the downloadFile call returns false --
-                // it probably just means that this is a user library, as
-                // opposed to a JRE library
-            }
-        } catch (IOException e) {
-            throw new UnsatisfiedLinkError("Error downloading library " +
-                                                name + ": " + e);
-        } catch (NoClassDefFoundError e) {
-            // This happens while Java itself is being compiled; DownloadManager
-            // isn't accessible when this code is first invoked.  It isn't an
-            // issue, as if we can't find DownloadManager, we can safely assume
-            // that additional code is not available for download.
-        }
+        BootClassLoaderHook.preLoadLibrary(name);
         ClassLoader loader =
             (fromClass == null) ? null : fromClass.getClassLoader();
         if (sys_paths == null) {
--- a/jdk/src/share/classes/java/lang/Double.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Double.java	Wed Jul 05 17:01:52 2017 +0200
@@ -629,7 +629,7 @@
      * @see java.lang.Double#toString(double)
      */
     public String toString() {
-        return String.valueOf(value);
+        return toString(value);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Float.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Float.java	Wed Jul 05 17:01:52 2017 +0200
@@ -551,7 +551,7 @@
      * @see java.lang.Float#toString(float)
      */
     public String toString() {
-        return String.valueOf(value);
+        return Float.toString(value);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Integer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Integer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -746,7 +746,7 @@
      *          base&nbsp;10.
      */
     public String toString() {
-        return String.valueOf(value);
+        return toString(value);
     }
 
     /**
@@ -1010,9 +1010,25 @@
      * @since   1.2
      */
     public int compareTo(Integer anotherInteger) {
-        int thisVal = this.value;
-        int anotherVal = anotherInteger.value;
-        return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
+        return compare(this.value, anotherInteger.value);
+    }
+
+    /**
+     * Compares two {@code int} values numerically.
+     * The value returned is identical to what would be returned by:
+     * <pre>
+     *    Integer.valueOf(x).compareTo(Integer.valueOf(y))
+     * </pre>
+     *
+     * @param  x the first {@code int} to compare
+     * @param  y the second {@code int} to compare
+     * @return the value {@code 0} if {@code x == y};
+     *         a value less than {@code 0} if {@code x < y}; and
+     *         a value greater than {@code 0} if {@code x > y}
+     * @since 1.7
+     */
+    public static int compare(int x, int y) {
+        return (x < y) ? -1 : ((x == y) ? 0 : 1);
     }
 
 
--- a/jdk/src/share/classes/java/lang/Long.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Long.java	Wed Jul 05 17:01:52 2017 +0200
@@ -761,7 +761,7 @@
      *          base&nbsp;10.
      */
     public String toString() {
-        return String.valueOf(value);
+        return toString(value);
     }
 
     /**
@@ -950,9 +950,25 @@
      * @since   1.2
      */
     public int compareTo(Long anotherLong) {
-        long thisVal = this.value;
-        long anotherVal = anotherLong.value;
-        return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
+        return compare(this.value, anotherLong.value);
+    }
+
+    /**
+     * Compares two {@code long} values numerically.
+     * The value returned is identical to what would be returned by:
+     * <pre>
+     *    Long.valueOf(x).compareTo(Long.valueOf(y))
+     * </pre>
+     *
+     * @param  x the first {@code long} to compare
+     * @param  y the second {@code long} to compare
+     * @return the value {@code 0} if {@code x == y};
+     *         a value less than {@code 0} if {@code x < y}; and
+     *         a value greater than {@code 0} if {@code x > y}
+     * @since 1.7
+     */
+    public static int compare(long x, long y) {
+        return (x < y) ? -1 : ((x == y) ? 0 : 1);
     }
 
 
--- a/jdk/src/share/classes/java/lang/Package.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Package.java	Wed Jul 05 17:01:52 2017 +0200
@@ -320,7 +320,7 @@
      * @param class the class to get the package of.
      * @return the package of the class. It may be null if no package
      *          information is available from the archive or codebase.  */
-    static Package getPackage(Class c) {
+    static Package getPackage(Class<?> c) {
         String name = c.getName();
         int i = name.lastIndexOf('.');
         if (i != -1) {
--- a/jdk/src/share/classes/java/lang/SecurityManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/SecurityManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1341,7 +1341,7 @@
             throw new NullPointerException("window can't be null");
         }
         try {
-            checkPermission(SecurityConstants.TOPLEVEL_WINDOW_PERMISSION);
+            checkPermission(SecurityConstants.AWT.TOPLEVEL_WINDOW_PERMISSION);
             return true;
         } catch (SecurityException se) {
             // just return false
@@ -1391,7 +1391,7 @@
      * @see        #checkPermission(java.security.Permission) checkPermission
      */
     public void checkSystemClipboardAccess() {
-        checkPermission(SecurityConstants.ACCESS_CLIPBOARD_PERMISSION);
+        checkPermission(SecurityConstants.AWT.ACCESS_CLIPBOARD_PERMISSION);
     }
 
     /**
@@ -1412,7 +1412,7 @@
      * @see        #checkPermission(java.security.Permission) checkPermission
      */
     public void checkAwtEventQueueAccess() {
-        checkPermission(SecurityConstants.CHECK_AWT_EVENTQUEUE_PERMISSION);
+        checkPermission(SecurityConstants.AWT.CHECK_AWT_EVENTQUEUE_PERMISSION);
     }
 
     /*
--- a/jdk/src/share/classes/java/lang/Short.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Short.java	Wed Jul 05 17:01:52 2017 +0200
@@ -170,7 +170,7 @@
      */
     public static Short valueOf(String s, int radix)
         throws NumberFormatException {
-        return new Short(parseShort(s, radix));
+        return valueOf(parseShort(s, radix));
     }
 
     /**
@@ -282,7 +282,7 @@
         if (i < MIN_VALUE || i > MAX_VALUE)
             throw new NumberFormatException(
                     "Value " + i + " out of range from input " + nm);
-        return (short)i;
+        return valueOf((short)i);
     }
 
     /**
@@ -379,11 +379,14 @@
      *          base&nbsp;10.
      */
     public String toString() {
-        return String.valueOf((int)value);
+        return Integer.toString((int)value);
     }
 
     /**
-     * Returns a hash code for this {@code Short}.
+     * Returns a hash code for this {@code Short}; equal to the result
+     * of invoking {@code intValue()}.
+     *
+     * @return a hash code value for this {@code Short}
      */
     public int hashCode() {
         return (int)value;
@@ -420,7 +423,25 @@
      * @since   1.2
      */
     public int compareTo(Short anotherShort) {
-        return this.value - anotherShort.value;
+        return compare(this.value, anotherShort.value);
+    }
+
+    /**
+     * Compares two {@code short} values numerically.
+     * The value returned is identical to what would be returned by:
+     * <pre>
+     *    Short.valueOf(x).compareTo(Short.valueOf(y))
+     * </pre>
+     *
+     * @param  x the first {@code short} to compare
+     * @param  y the second {@code short} to compare
+     * @return the value {@code 0} if {@code x == y};
+     *         a value less than {@code 0} if {@code x < y}; and
+     *         a value greater than {@code 0} if {@code x > y}
+     * @since 1.7
+     */
+    public static int compare(short x, short y) {
+        return x - y;
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/String.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/String.java	Wed Jul 05 17:01:52 2017 +0200
@@ -2995,7 +2995,7 @@
      * @see     java.lang.Integer#toString(int, int)
      */
     public static String valueOf(int i) {
-        return Integer.toString(i, 10);
+        return Integer.toString(i);
     }
 
     /**
@@ -3009,7 +3009,7 @@
      * @see     java.lang.Long#toString(long)
      */
     public static String valueOf(long l) {
-        return Long.toString(l, 10);
+        return Long.toString(l);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java	Wed Jul 05 17:01:52 2017 +0200
@@ -131,7 +131,7 @@
         throws SecurityException
     {
         if (obj instanceof Constructor && flag == true) {
-            Constructor c = (Constructor)obj;
+            Constructor<?> c = (Constructor<?>)obj;
             if (c.getDeclaringClass() == Class.class) {
                 throw new SecurityException("Can not make a java.lang.Class" +
                                             " constructor accessible");
--- a/jdk/src/share/classes/java/lang/reflect/Constructor.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/Constructor.java	Wed Jul 05 17:01:52 2017 +0200
@@ -64,8 +64,8 @@
 
     private Class<T>            clazz;
     private int                 slot;
-    private Class[]             parameterTypes;
-    private Class[]             exceptionTypes;
+    private Class<?>[]          parameterTypes;
+    private Class<?>[]          exceptionTypes;
     private int                 modifiers;
     // Generics and annotations support
     private transient String    signature;
@@ -80,7 +80,7 @@
     // always succeed (it is not affected by the granting or revoking
     // of permissions); we speed up the check in the common case by
     // remembering the last Class for which the check succeeded.
-    private volatile Class securityCheckCache;
+    private volatile Class<?> securityCheckCache;
 
     // Generics infrastructure
     // Accessor for factory
@@ -113,8 +113,8 @@
      * package via sun.reflect.LangReflectAccess.
      */
     Constructor(Class<T> declaringClass,
-                Class[] parameterTypes,
-                Class[] checkedExceptions,
+                Class<?>[] parameterTypes,
+                Class<?>[] checkedExceptions,
                 int modifiers,
                 int slot,
                 String signature,
@@ -275,10 +275,6 @@
      * Returns an array of length 0 if the underlying method declares
      * no exceptions in its {@code throws} clause.
      *
-     * <p>If an exception type is a parameterized type, the {@code Type}
-     * object returned for it must accurately reflect the actual type
-     * parameters used in the source code.
-     *
      * <p>If an exception type is a type variable or a parameterized
      * type, it is created. Otherwise, it is resolved.
      *
@@ -311,11 +307,11 @@
      */
     public boolean equals(Object obj) {
         if (obj != null && obj instanceof Constructor) {
-            Constructor other = (Constructor)obj;
+            Constructor<?> other = (Constructor<?>)obj;
             if (getDeclaringClass() == other.getDeclaringClass()) {
                 /* Avoid unnecessary cloning */
-                Class[] params1 = parameterTypes;
-                Class[] params2 = other.parameterTypes;
+                Class<?>[] params1 = parameterTypes;
+                Class<?>[] params2 = other.parameterTypes;
                 if (params1.length == params2.length) {
                     for (int i = 0; i < params1.length; i++) {
                         if (params1[i] != params2[i])
@@ -361,14 +357,14 @@
             }
             sb.append(Field.getTypeName(getDeclaringClass()));
             sb.append("(");
-            Class[] params = parameterTypes; // avoid clone
+            Class<?>[] params = parameterTypes; // avoid clone
             for (int j = 0; j < params.length; j++) {
                 sb.append(Field.getTypeName(params[j]));
                 if (j < (params.length - 1))
                     sb.append(",");
             }
             sb.append(")");
-            Class[] exceptions = exceptionTypes; // avoid clone
+            Class<?>[] exceptions = exceptionTypes; // avoid clone
             if (exceptions.length > 0) {
                 sb.append(" throws ");
                 for (int k = 0; k < exceptions.length; k++) {
@@ -456,7 +452,7 @@
                 sb.append(" throws ");
                 for (int k = 0; k < exceptions.length; k++) {
                     sb.append((exceptions[k] instanceof Class)?
-                              ((Class)exceptions[k]).getName():
+                              ((Class<?>)exceptions[k]).getName():
                               exceptions[k].toString());
                     if (k < (exceptions.length - 1))
                         sb.append(",");
@@ -522,7 +518,7 @@
     {
         if (!override) {
             if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
-                Class caller = Reflection.getCallerClass(2);
+                Class<?> caller = Reflection.getCallerClass(2);
                 if (securityCheckCache != caller) {
                     Reflection.ensureMemberAccess(caller, clazz, null, modifiers);
                     securityCheckCache = caller;
@@ -629,9 +625,9 @@
         return AnnotationParser.toArray(declaredAnnotations());
     }
 
-    private transient Map<Class, Annotation> declaredAnnotations;
+    private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations;
 
-    private synchronized  Map<Class, Annotation> declaredAnnotations() {
+    private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
         if (declaredAnnotations == null) {
             declaredAnnotations = AnnotationParser.parseAnnotations(
                 annotations, sun.misc.SharedSecrets.getJavaLangAccess().
--- a/jdk/src/share/classes/java/lang/reflect/Field.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/Field.java	Wed Jul 05 17:01:52 2017 +0200
@@ -58,12 +58,12 @@
 public final
 class Field extends AccessibleObject implements Member {
 
-    private Class               clazz;
+    private Class<?>            clazz;
     private int                 slot;
     // This is guaranteed to be interned by the VM in the 1.4
     // reflection implementation
     private String              name;
-    private Class               type;
+    private Class<?>            type;
     private int                 modifiers;
     // Generics and annotations support
     private transient String    signature;
@@ -81,8 +81,8 @@
 
     // More complicated security check cache needed here than for
     // Class.newInstance() and Constructor.newInstance()
-    private Class securityCheckCache;
-    private Class securityCheckTargetClassCache;
+    private Class<?> securityCheckCache;
+    private Class<?> securityCheckTargetClassCache;
 
     // Generics infrastructure
 
@@ -112,9 +112,9 @@
      * instantiation of these objects in Java code from the java.lang
      * package via sun.reflect.LangReflectAccess.
      */
-    Field(Class declaringClass,
+    Field(Class<?> declaringClass,
           String name,
-          Class type,
+          Class<?> type,
           int modifiers,
           int slot,
           String signature,
@@ -964,10 +964,10 @@
     private void doSecurityCheck(Object obj) throws IllegalAccessException {
         if (!override) {
             if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
-                Class caller = Reflection.getCallerClass(4);
-                Class targetClass = ((obj == null || !Modifier.isProtected(modifiers))
-                                     ? clazz
-                                     : obj.getClass());
+                Class<?> caller = Reflection.getCallerClass(4);
+                Class<?> targetClass = ((obj == null || !Modifier.isProtected(modifiers))
+                                        ? clazz
+                                        : obj.getClass());
 
                 synchronized (this) {
                     if ((securityCheckCache == caller)
@@ -987,10 +987,10 @@
     /*
      * Utility routine to paper over array type names
      */
-    static String getTypeName(Class type) {
+    static String getTypeName(Class<?> type) {
         if (type.isArray()) {
             try {
-                Class cl = type;
+                Class<?> cl = type;
                 int dimensions = 0;
                 while (cl.isArray()) {
                     dimensions++;
@@ -1025,9 +1025,9 @@
         return AnnotationParser.toArray(declaredAnnotations());
     }
 
-    private transient Map<Class, Annotation> declaredAnnotations;
+    private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations;
 
-    private synchronized  Map<Class, Annotation> declaredAnnotations() {
+    private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
         if (declaredAnnotations == null) {
             declaredAnnotations = AnnotationParser.parseAnnotations(
                 annotations, sun.misc.SharedSecrets.getJavaLangAccess().
--- a/jdk/src/share/classes/java/lang/reflect/Method.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/Method.java	Wed Jul 05 17:01:52 2017 +0200
@@ -61,14 +61,14 @@
 public final
     class Method extends AccessibleObject implements GenericDeclaration,
                                                      Member {
-    private Class               clazz;
+    private Class<?>            clazz;
     private int                 slot;
     // This is guaranteed to be interned by the VM in the 1.4
     // reflection implementation
     private String              name;
-    private Class               returnType;
-    private Class[]             parameterTypes;
-    private Class[]             exceptionTypes;
+    private Class<?>            returnType;
+    private Class<?>[]          parameterTypes;
+    private Class<?>[]          exceptionTypes;
     private int                 modifiers;
     // Generics and annotations support
     private transient String              signature;
@@ -85,8 +85,8 @@
 
     // More complicated security check cache needed here than for
     // Class.newInstance() and Constructor.newInstance()
-    private Class securityCheckCache;
-    private Class securityCheckTargetClassCache;
+    private Class<?> securityCheckCache;
+    private Class<?> securityCheckTargetClassCache;
 
    // Generics infrastructure
 
@@ -114,11 +114,11 @@
      * instantiation of these objects in Java code from the java.lang
      * package via sun.reflect.LangReflectAccess.
      */
-    Method(Class declaringClass,
+    Method(Class<?> declaringClass,
            String name,
-           Class[] parameterTypes,
-           Class returnType,
-           Class[] checkedExceptions,
+           Class<?>[] parameterTypes,
+           Class<?> returnType,
+           Class<?>[] checkedExceptions,
            int modifiers,
            int slot,
            String signature,
@@ -317,10 +317,6 @@
      * Returns an array of length 0 if the underlying method declares
      * no exceptions in its {@code throws} clause.
      *
-     * <p>If an exception type is a parameterized type, the {@code Type}
-     * object returned for it must accurately reflect the actual type
-     * parameters used in the source code.
-     *
      * <p>If an exception type is a type variable or a parameterized
      * type, it is created. Otherwise, it is resolved.
      *
@@ -359,8 +355,8 @@
                 if (!returnType.equals(other.getReturnType()))
                     return false;
                 /* Avoid unnecessary cloning */
-                Class[] params1 = parameterTypes;
-                Class[] params2 = other.parameterTypes;
+                Class<?>[] params1 = parameterTypes;
+                Class<?>[] params2 = other.parameterTypes;
                 if (params1.length == params2.length) {
                     for (int i = 0; i < params1.length; i++) {
                         if (params1[i] != params2[i])
@@ -414,14 +410,14 @@
             sb.append(Field.getTypeName(getReturnType()) + " ");
             sb.append(Field.getTypeName(getDeclaringClass()) + ".");
             sb.append(getName() + "(");
-            Class[] params = parameterTypes; // avoid clone
+            Class<?>[] params = parameterTypes; // avoid clone
             for (int j = 0; j < params.length; j++) {
                 sb.append(Field.getTypeName(params[j]));
                 if (j < (params.length - 1))
                     sb.append(",");
             }
             sb.append(")");
-            Class[] exceptions = exceptionTypes; // avoid clone
+            Class<?>[] exceptions = exceptionTypes; // avoid clone
             if (exceptions.length > 0) {
                 sb.append(" throws ");
                 for (int k = 0; k < exceptions.length; k++) {
@@ -594,10 +590,10 @@
     {
         if (!override) {
             if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
-                Class caller = Reflection.getCallerClass(1);
-                Class targetClass = ((obj == null || !Modifier.isProtected(modifiers))
-                                     ? clazz
-                                     : obj.getClass());
+                Class<?> caller = Reflection.getCallerClass(1);
+                Class<?> targetClass = ((obj == null || !Modifier.isProtected(modifiers))
+                                        ? clazz
+                                        : obj.getClass());
 
                 boolean cached;
                 synchronized (this) {
@@ -706,9 +702,9 @@
         return AnnotationParser.toArray(declaredAnnotations());
     }
 
-    private transient Map<Class, Annotation> declaredAnnotations;
+    private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations;
 
-    private synchronized  Map<Class, Annotation> declaredAnnotations() {
+    private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
         if (declaredAnnotations == null) {
             declaredAnnotations = AnnotationParser.parseAnnotations(
                 annotations, sun.misc.SharedSecrets.getJavaLangAccess().
@@ -735,7 +731,7 @@
     public Object getDefaultValue() {
         if  (annotationDefault == null)
             return null;
-        Class memberType = AnnotationType.invocationHandlerReturnType(
+        Class<?> memberType = AnnotationType.invocationHandlerReturnType(
             getReturnType());
         Object result = AnnotationParser.parseMemberValue(
             memberType, ByteBuffer.wrap(annotationDefault),
--- a/jdk/src/share/classes/java/lang/reflect/Proxy.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/Proxy.java	Wed Jul 05 17:01:52 2017 +0200
@@ -350,7 +350,7 @@
             throw new IllegalArgumentException("interface limit exceeded");
         }
 
-        Class proxyClass = null;
+        Class<?> proxyClass = null;
 
         /* collect interface names to use as key for proxy class cache */
         String[] interfaceNames = new String[interfaces.length];
@@ -364,7 +364,7 @@
              * interface to the same Class object.
              */
             String interfaceName = interfaces[i].getName();
-            Class interfaceClass = null;
+            Class<?> interfaceClass = null;
             try {
                 interfaceClass = Class.forName(interfaceName, false, loader);
             } catch (ClassNotFoundException e) {
--- a/jdk/src/share/classes/java/lang/reflect/ReflectAccess.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/lang/reflect/ReflectAccess.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,9 +33,9 @@
     package to instantiate objects in this package. */
 
 class ReflectAccess implements sun.reflect.LangReflectAccess {
-    public Field newField(Class declaringClass,
+    public Field newField(Class<?> declaringClass,
                           String name,
-                          Class type,
+                          Class<?> type,
                           int modifiers,
                           int slot,
                           String signature,
@@ -50,11 +50,11 @@
                          annotations);
     }
 
-    public Method newMethod(Class declaringClass,
+    public Method newMethod(Class<?> declaringClass,
                             String name,
-                            Class[] parameterTypes,
-                            Class returnType,
-                            Class[] checkedExceptions,
+                            Class<?>[] parameterTypes,
+                            Class<?> returnType,
+                            Class<?>[] checkedExceptions,
                             int modifiers,
                             int slot,
                             String signature,
@@ -76,8 +76,8 @@
     }
 
     public <T> Constructor<T> newConstructor(Class<T> declaringClass,
-                                             Class[] parameterTypes,
-                                             Class[] checkedExceptions,
+                                             Class<?>[] parameterTypes,
+                                             Class<?>[] checkedExceptions,
                                              int modifiers,
                                              int slot,
                                              String signature,
@@ -102,29 +102,29 @@
         m.setMethodAccessor(accessor);
     }
 
-    public ConstructorAccessor getConstructorAccessor(Constructor c) {
+    public ConstructorAccessor getConstructorAccessor(Constructor<?> c) {
         return c.getConstructorAccessor();
     }
 
-    public void setConstructorAccessor(Constructor c,
+    public void setConstructorAccessor(Constructor<?> c,
                                        ConstructorAccessor accessor)
     {
         c.setConstructorAccessor(accessor);
     }
 
-    public int getConstructorSlot(Constructor c) {
+    public int getConstructorSlot(Constructor<?> c) {
         return c.getSlot();
     }
 
-    public String getConstructorSignature(Constructor c) {
+    public String getConstructorSignature(Constructor<?> c) {
         return c.getSignature();
     }
 
-    public byte[] getConstructorAnnotations(Constructor c) {
+    public byte[] getConstructorAnnotations(Constructor<?> c) {
         return c.getRawAnnotations();
     }
 
-    public byte[] getConstructorParameterAnnotations(Constructor c) {
+    public byte[] getConstructorParameterAnnotations(Constructor<?> c) {
         return c.getRawParameterAnnotations();
     }
 
--- a/jdk/src/share/classes/java/util/zip/ZipEntry.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipEntry.java	Wed Jul 05 17:01:52 2017 +0200
@@ -26,6 +26,7 @@
 package java.util.zip;
 
 import java.util.Date;
+import sun.misc.BootClassLoaderHook;
 
 /**
  * This class is used to represent a ZIP file entry.
@@ -109,12 +110,16 @@
      * @see #getTime()
      */
     public void setTime(long time) {
-        // fix for bug 6625963: we bypass time calculations while Kernel is
-        // downloading bundles, since they aren't necessary and would cause
-        // the Kernel core to depend upon the (very large) time zone data
-        if (sun.misc.VM.isBootedKernelVM() &&
-            sun.jkernel.DownloadManager.isCurrentThreadDownloading()) {
-            this.time = sun.jkernel.DownloadManager.KERNEL_STATIC_MODTIME;
+        // Same value as defined in sun.jkernel.DownloadManager.KERNEL_STATIC_MODTIME
+        // to avoid direct reference to DownoadManager class.  Need to revisit
+        // if this is needed any more (see comment in the DownloadManager class)
+        final int KERNEL_STATIC_MODTIME = 10000000;
+        BootClassLoaderHook hook = BootClassLoaderHook.getHook();
+        if (hook != null && hook.isCurrentThreadPrefetching()) {
+            // fix for bug 6625963: we bypass time calculations while Kernel is
+            // downloading bundles, since they aren't necessary and would cause
+            // the Kernel core to depend upon the (very large) time zone data
+            this.time = KERNEL_STATIC_MODTIME;
         } else {
             this.time = javaToDosTime(time);
         }
--- a/jdk/src/share/classes/javax/swing/BufferStrategyPaintManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/BufferStrategyPaintManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -32,7 +32,6 @@
 import java.lang.ref.WeakReference;
 import java.security.AccessController;
 import java.util.*;
-import java.util.logging.*;
 
 import com.sun.java.swing.SwingUtilities3;
 
@@ -41,6 +40,7 @@
 import sun.security.action.GetPropertyAction;
 import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
 import sun.awt.SunToolkit;
+import sun.util.logging.PlatformLogger;
 
 /**
  * A PaintManager implementation that uses a BufferStrategy for
@@ -78,7 +78,7 @@
     private static Method COMPONENT_CREATE_BUFFER_STRATEGY_METHOD;
     private static Method COMPONENT_GET_BUFFER_STRATEGY_METHOD;
 
-    private static final Logger LOGGER = Logger.getLogger(
+    private static final PlatformLogger LOGGER = PlatformLogger.getLogger(
                            "javax.swing.BufferStrategyPaintManager");
 
     /**
@@ -222,9 +222,9 @@
     }
 
     private void dispose(java.util.List<BufferInfo> bufferInfos) {
-        if (LOGGER.isLoggable(Level.FINER)) {
-            LOGGER.log(Level.FINER, "BufferStrategyPaintManager disposed",
-                       new RuntimeException());
+        if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+            LOGGER.finer("BufferStrategyPaintManager disposed",
+                         new RuntimeException());
         }
         if (bufferInfos != null) {
             for (BufferInfo bufferInfo : bufferInfos) {
@@ -305,7 +305,7 @@
             }
         }
         // Invalid root, do what Swing has always done.
-        if (LOGGER.isLoggable(Level.FINER)) {
+        if (LOGGER.isLoggable(PlatformLogger.FINER)) {
             LOGGER.finer("prepare failed");
         }
         return super.paint(paintingComponent, bufferComponent, g, x, y, w, h);
@@ -335,7 +335,7 @@
             }
             accumulate(x + xOffset + deltaX, y + yOffset + deltaY, w, h);
         } else {
-            if (LOGGER.isLoggable(Level.FINER)) {
+            if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                 LOGGER.finer("copyArea: prepare failed or not in sync");
             }
             // Prepare failed, or not in sync. By calling super.copyArea
@@ -363,7 +363,7 @@
                 }
             }
         }
-        if (LOGGER.isLoggable(Level.FINEST)) {
+        if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
             LOGGER.finest("beginPaint");
         }
         // Reset the area that needs to be painted.
@@ -371,7 +371,7 @@
     }
 
     public void endPaint() {
-        if (LOGGER.isLoggable(Level.FINEST)) {
+        if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
             LOGGER.finest("endPaint: region " + accumulatedX + " " +
                        accumulatedY + " " +  accumulatedMaxX + " " +
                        accumulatedMaxY);
@@ -420,7 +420,7 @@
                 contentsLost = bufferStrategy.contentsLost();
             }
             if (contentsLost) {
-                if (LOGGER.isLoggable(Level.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                     LOGGER.finer("endPaint: contents lost");
                 }
                 // Shown region was bogus, mark buffer as out of sync.
@@ -514,7 +514,7 @@
                 contentsLost = true;
                 bufferInfo = new BufferInfo(root);
                 bufferInfos.add(bufferInfo);
-                if (LOGGER.isLoggable(Level.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                     LOGGER.finer("prepare: new BufferInfo: " + root);
                 }
             }
@@ -525,7 +525,7 @@
                     bsg = bufferStrategy.getDrawGraphics();
                     if (bufferStrategy.contentsRestored()) {
                         contentsLost = true;
-                        if (LOGGER.isLoggable(Level.FINER)) {
+                        if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                             LOGGER.finer(
                                 "prepare: contents restored in prepare");
                         }
@@ -539,7 +539,7 @@
                 if (bufferInfo.getContentsLostDuringExpose()) {
                     contentsLost = true;
                     bufferInfo.setContentsLostDuringExpose(false);
-                    if (LOGGER.isLoggable(Level.FINER)) {
+                    if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                         LOGGER.finer("prepare: contents lost on expose");
                     }
                 }
@@ -642,7 +642,7 @@
             if (biRoot == null) {
                 // Window gc'ed
                 bufferInfos.remove(counter);
-                if (LOGGER.isLoggable(Level.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                     LOGGER.finer("BufferInfo pruned, root null");
                 }
             }
@@ -748,7 +748,7 @@
                 if (bs != null) {
                     weakBS = new WeakReference<BufferStrategy>(bs);
                 }
-                if (LOGGER.isLoggable(Level.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                     LOGGER.finer("getBufferStrategy: created bs: " + bs);
                 }
             }
@@ -806,7 +806,7 @@
             BufferStrategy bs = null;
             if (SwingUtilities3.isVsyncRequested(root)) {
                 bs = createBufferStrategy(root, true);
-                if (LOGGER.isLoggable(Level.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
                     LOGGER.finer("createBufferStrategy: using vsynced strategy");
                 }
             }
@@ -848,9 +848,9 @@
                                             invoke(root);
                 } catch (InvocationTargetException ite) {
                     // Type is not supported
-                    if (LOGGER.isLoggable(Level.FINER)) {
-                        LOGGER.log(Level.FINER, "createBufferStratety failed",
-                                   ite);
+                    if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                        LOGGER.finer("createBufferStratety failed",
+                                     ite);
                     }
                 } catch (IllegalArgumentException iae) {
                     assert false;
@@ -864,9 +864,9 @@
                     bs = ((Window)root).getBufferStrategy();
                 } catch (AWTException e) {
                     // Type not supported
-                    if (LOGGER.isLoggable(Level.FINER)) {
-                        LOGGER.log(Level.FINER, "createBufferStratety failed",
-                                   e);
+                    if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                        LOGGER.finer("createBufferStratety failed",
+                                     e);
                     }
                 }
             }
@@ -878,8 +878,8 @@
          */
         public void dispose() {
             Container root = getRoot();
-            if (LOGGER.isLoggable(Level.FINER)) {
-                LOGGER.log(Level.FINER, "disposed BufferInfo for: " + root);
+            if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                LOGGER.finer("disposed BufferInfo for: " + root);
             }
             if (root != null) {
                 root.removeComponentListener(this);
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java	Wed Jul 05 17:01:52 2017 +0200
@@ -715,7 +715,7 @@
      * <ul>
      * <li>JFileChooser.CANCEL_OPTION
      * <li>JFileChooser.APPROVE_OPTION
-     * <li>JFileCHooser.ERROR_OPTION if an error occurs or the
+     * <li>JFileChooser.ERROR_OPTION if an error occurs or the
      *                  dialog is dismissed
      * </ul>
      * @exception HeadlessException if GraphicsEnvironment.isHeadless()
@@ -724,6 +724,11 @@
      */
     public int showDialog(Component parent, String approveButtonText)
         throws HeadlessException {
+        if (dialog != null) {
+            // Prevent to show second instance of dialog if the previous one still exists
+            return JFileChooser.ERROR_OPTION;
+        }
+
         if(approveButtonText != null) {
             setApproveButtonText(approveButtonText);
             setDialogType(CUSTOM_DIALOG);
--- a/jdk/src/share/classes/javax/swing/JLayer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/JLayer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -56,28 +56,70 @@
  * {@code JLayer} is a good solution if you only need to do custom painting
  * over compound component or catch input events from its subcomponents.
  * <pre>
+ * import javax.swing.*;
+ * import javax.swing.plaf.LayerUI;
+ * import java.awt.*;
+ *
+ * public class JLayerSample {
+ *
+ *     private static JLayer&lt;JComponent&gt; createLayer() {
+ *         // This custom layerUI will fill the layer with translucent green
+ *         // and print out all mouseMotion events generated within its borders
+ *         LayerUI&lt;JComponent&gt; layerUI = new LayerUI&lt;JComponent&gt;() {
+ *
+ *             public void paint(Graphics g, JComponent c) {
+ *                 // paint the layer as is
+ *                 super.paint(g, c);
+ *                 // fill it with the translucent green
+ *                 g.setColor(new Color(0, 128, 0, 128));
+ *                 g.fillRect(0, 0, c.getWidth(), c.getHeight());
+ *             }
+ *
+ *             public void installUI(JComponent c) {
+ *                 super.installUI(c);
+ *                 // enable mouse motion events for the layer's subcomponents
+ *                 ((JLayer) c).setLayerEventMask(AWTEvent.MOUSE_MOTION_EVENT_MASK);
+ *             }
+ *
+ *             public void uninstallUI(JComponent c) {
+ *                 super.uninstallUI(c);
+ *                 // reset the layer event mask
+ *                 ((JLayer) c).setLayerEventMask(0);
+ *             }
+ *
+ *             // overridden method which catches MouseMotion events
+ *             public void eventDispatched(AWTEvent e, JLayer&lt;? extends JComponent&gt; l) {
+ *                 System.out.println("AWTEvent detected: " + e);
+ *             }
+ *         };
  *         // create a component to be decorated with the layer
- *        JPanel panel = new JPanel();
- *        panel.add(new JButton("JButton"));
- *        // This custom layerUI will fill the layer with translucent green
- *        // and print out all mouseMotion events generated within its borders
- *        LayerUI&lt;JPanel&gt; layerUI = new LayerUI&lt;JPanel&gt;() {
- *            public void paint(Graphics g, JCompo  nent c) {
- *                // paint the layer as is
- *                super.paint(g, c);
- *                // fill it with the translucent green
- *                g.setColor(new Color(0, 128, 0, 128));
- *                g.fillRect(0, 0, c.getWidth(), c.getHeight());
- *            }
- *            // overridden method which catches MouseMotion events
- *            public void eventDispatched(AWTEvent e, JLayer&lt;JPanel&gt; l) {
- *                System.out.println("AWTEvent detected: " + e);
- *            }
- *        };
- *        // create the layer for the panel using our custom layerUI
- *        JLayer&lt;JPanel&gt; layer = new JLayer&lt;JPanel&gt;(panel, layerUI);
- *        // work with the layer as with any other Swing component
- *        frame.add(layer);
+ *         JPanel panel = new JPanel();
+ *         panel.add(new JButton("JButton"));
+ *
+ *         // create the layer for the panel using our custom layerUI
+ *         return new JLayer&lt;JComponent&gt;(panel, layerUI);
+ *     }
+ *
+ *     private static void createAndShowGUI() {
+ *         final JFrame frame = new JFrame();
+ *         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ *
+ *         // work with the layer as with any other Swing component
+ *         frame.add(createLayer());
+ *
+ *         frame.setSize(200, 200);
+ *         frame.setLocationRelativeTo(null);
+ *         frame.setVisible(true);
+ *     }
+ *
+ *     public static void main(String[] args) throws Exception {
+ *         SwingUtilities.invokeAndWait(new Runnable() {
+ *             public void run() {
+ *                 createAndShowGUI();
+ *             }
+ *         });
+ *     }
+ * }
  * </pre>
  *
  * <b>Note:</b> {@code JLayer} doesn't support the following methods:
@@ -291,7 +333,9 @@
      * {@inheritDoc}
      */
     public void remove(Component comp) {
-        if (comp == getView()) {
+        if (comp == null) {
+            super.remove(comp);
+        } else if (comp == getView()) {
             setView(null);
         } else if (comp == getGlassPane()) {
             setGlassPane(null);
--- a/jdk/src/share/classes/javax/swing/JPopupMenu.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/JPopupMenu.java	Wed Jul 05 17:01:52 2017 +0200
@@ -412,7 +412,7 @@
             SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
                 sm.checkPermission(
-                        SecurityConstants.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
+                    SecurityConstants.AWT.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
             }
         } catch (SecurityException se) {
             // There is no permission to show popups over the task bar
--- a/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,7 +29,7 @@
 import java.awt.Window;
 import java.util.*;
 import java.awt.FocusTraversalPolicy;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /**
  * A FocusTraversalPolicy that determines traversal order by sorting the
@@ -64,7 +64,7 @@
     private Comparator<? super Component> comparator;
     private boolean implicitDownCycleTraversal = true;
 
-    private Logger log = Logger.getLogger("javax.swing.SortingFocusTraversalPolicy");
+    private PlatformLogger log = PlatformLogger.getLogger("javax.swing.SortingFocusTraversalPolicy");
 
     /**
      * Used by getComponentAfter and getComponentBefore for efficiency. In
@@ -115,8 +115,8 @@
         try {
             index = Collections.binarySearch(cycle, aComponent, comparator);
         } catch (ClassCastException e) {
-            if (log.isLoggable(Level.FINE)) {
-                log.log(Level.FINE, "### During the binary search for " + aComponent + " the exception occured: ", e);
+            if (log.isLoggable(PlatformLogger.FINE)) {
+                log.fine("### During the binary search for " + aComponent + " the exception occured: ", e);
             }
             return -1;
         }
@@ -193,7 +193,7 @@
                 if (getImplicitDownCycleTraversal()) {
                     retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont);
 
-                    if (retComp != null && log.isLoggable(Level.FINE)) {
+                    if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
                         log.fine("### Transfered focus down-cycle to " + retComp +
                                  " in the focus cycle root " + cont);
                     }
@@ -205,7 +205,7 @@
                            cont.getFocusTraversalPolicy().getDefaultComponent(cont) :
                            cont.getFocusTraversalPolicy().getLastComponent(cont));
 
-                if (retComp != null && log.isLoggable(Level.FINE)) {
+                if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont);
                 }
             }
@@ -236,7 +236,7 @@
      *         aComponent is null
      */
     public Component getComponentAfter(Container aContainer, Component aComponent) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine("### Searching in " + aContainer + " for component after " + aComponent);
         }
 
@@ -260,7 +260,7 @@
         // See if the component is inside of policy provider.
         Container provider = getTopmostProvider(aContainer, aComponent);
         if (provider != null) {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("### Asking FTP " + provider + " for component after " + aComponent);
             }
 
@@ -271,7 +271,7 @@
             // Null result means that we overstepped the limit of the FTP's cycle.
             // In that case we must quit the cycle, otherwise return the component found.
             if (afterComp != null) {
-                if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + afterComp);
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + afterComp);
                 return afterComp;
             }
             aComponent = provider;
@@ -279,12 +279,12 @@
 
         List<Component> cycle = getFocusTraversalCycle(aContainer);
 
-        if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
 
         int index = getComponentIndex(cycle, aComponent);
 
         if (index < 0) {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
             }
             return getFirstComponent(aContainer);
@@ -349,7 +349,7 @@
         // See if the component is inside of policy provider.
         Container provider = getTopmostProvider(aContainer, aComponent);
         if (provider != null) {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("### Asking FTP " + provider + " for component after " + aComponent);
             }
 
@@ -360,7 +360,7 @@
             // Null result means that we overstepped the limit of the FTP's cycle.
             // In that case we must quit the cycle, otherwise return the component found.
             if (beforeComp != null) {
-                if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + beforeComp);
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + beforeComp);
                 return beforeComp;
             }
             aComponent = provider;
@@ -373,12 +373,12 @@
 
         List<Component> cycle = getFocusTraversalCycle(aContainer);
 
-        if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
 
         int index = getComponentIndex(cycle, aComponent);
 
         if (index < 0) {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
             }
             return getLastComponent(aContainer);
@@ -424,7 +424,7 @@
     public Component getFirstComponent(Container aContainer) {
         List<Component> cycle;
 
-        if (log.isLoggable(Level.FINE)) log.fine("### Getting first component in " + aContainer);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting first component in " + aContainer);
         if (aContainer == null) {
             throw new IllegalArgumentException("aContainer cannot be null");
         }
@@ -436,10 +436,10 @@
         }
 
         if (cycle.size() == 0) {
-            if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
             return null;
         }
-        if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
 
         for (Component comp : cycle) {
             if (accept(comp)) {
@@ -466,7 +466,7 @@
      */
     public Component getLastComponent(Container aContainer) {
         List<Component> cycle;
-        if (log.isLoggable(Level.FINE)) log.fine("### Getting last component in " + aContainer);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting last component in " + aContainer);
 
         if (aContainer == null) {
             throw new IllegalArgumentException("aContainer cannot be null");
@@ -479,10 +479,10 @@
         }
 
         if (cycle.size() == 0) {
-            if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
             return null;
         }
-        if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
 
         for (int i= cycle.size() - 1; i >= 0; i--) {
             Component comp = cycle.get(i);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1766,7 +1766,7 @@
         }
 
         private boolean isTypeAheadKey( KeyEvent e ) {
-            return !e.isAltDown() && !e.isControlDown() && !e.isMetaDown();
+            return !e.isAltDown() && !BasicGraphicsUtils.isMenuShortcutKeyDown(e);
         }
 
         //
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Wed Jul 05 17:01:52 2017 +0200
@@ -483,11 +483,12 @@
     protected JList createList() {
         return new JList( comboBox.getModel() ) {
             public void processMouseEvent(MouseEvent e)  {
-                if (e.isControlDown())  {
+                if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                     // Fix for 4234053. Filter out the Control Key from the list.
                     // ie., don't allow CTRL key deselection.
+                    Toolkit toolkit = Toolkit.getDefaultToolkit();
                     e = new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(),
-                                       e.getModifiers() ^ InputEvent.CTRL_MASK,
+                                       e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                        e.getX(), e.getY(),
                                        e.getXOnScreen(), e.getYOnScreen(),
                                        e.getClickCount(),
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -924,7 +924,8 @@
                 boolean isTrav = (selectedFile != null && chooser.isTraversable(selectedFile));
                 boolean isDirSelEnabled = chooser.isDirectorySelectionEnabled();
                 boolean isFileSelEnabled = chooser.isFileSelectionEnabled();
-                boolean isCtrl = (e != null && (e.getModifiers() & ActionEvent.CTRL_MASK) != 0);
+                boolean isCtrl = (e != null && (e.getModifiers() &
+                            Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0);
 
                 if (isDir && isTrav && (isCtrl || !isDirSelEnabled)) {
                     changeDirectory(selectedFile);
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,10 @@
 import java.awt.Graphics;
 import java.awt.Insets;
 import java.awt.Rectangle;
+import java.awt.Toolkit;
 import java.awt.event.KeyEvent;
+import java.awt.event.InputEvent;
+
 import sun.swing.SwingUtilities2;
 
 
@@ -303,4 +306,9 @@
     static boolean isLeftToRight( Component c ) {
         return c.getComponentOrientation().isLeftToRight();
     }
+
+    static boolean isMenuShortcutKeyDown(InputEvent event) {
+        return (event.getModifiers() &
+                Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
+    }
 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -2371,8 +2371,9 @@
             JList src = (JList)e.getSource();
             ListModel model = src.getModel();
 
-            if (model.getSize() == 0 || e.isAltDown() || e.isControlDown() || e.isMetaDown() ||
-                isNavigationKey(e)) {
+            if (model.getSize() == 0 || e.isAltDown() ||
+                    BasicGraphicsUtils.isMenuShortcutKeyDown(e) ||
+                    isNavigationKey(e)) {
                 // Nothing to select
                 return;
             }
@@ -2665,7 +2666,7 @@
                 if (row != -1 && DragRecognitionSupport.mousePressed(e)) {
                     dragPressDidSelection = false;
 
-                    if (e.isControlDown()) {
+                    if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
                         // do nothing for control - will be handled on release
                         // or when drag starts
                         return;
@@ -2717,7 +2718,7 @@
                     anchorSelected = list.isSelectedIndex(anchorIndex);
                 }
 
-                if (e.isControlDown()) {
+                if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
                     if (e.isShiftDown()) {
                         if (anchorSelected) {
                             list.addSelectionInterval(anchorIndex, row);
@@ -2742,7 +2743,7 @@
         }
 
         public void dragStarting(MouseEvent me) {
-            if (me.isControlDown()) {
+            if (BasicGraphicsUtils.isMenuShortcutKeyDown(me)) {
                 int row = SwingUtilities2.loc2IndexFileList(list, me.getPoint());
                 list.addSelectionInterval(row, row);
             }
@@ -2758,7 +2759,7 @@
                 return;
             }
 
-            if (e.isShiftDown() || e.isControlDown()) {
+            if (e.isShiftDown() || BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
                 return;
             }
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -196,10 +196,6 @@
         return getHandler();
     }
 
-    protected MenuKeyListener createMenuKeyListener(JComponent c) {
-        return (MenuKeyListener)getHandler();
-    }
-
     public Dimension getMaximumSize(JComponent c) {
         if (((JMenu)menuItem).isTopLevelMenu() == true) {
             Dimension d = c.getPreferredSize();
@@ -401,8 +397,7 @@
         public void stateChanged(ChangeEvent e) { }
     }
 
-    private class Handler extends BasicMenuItemUI.Handler implements
-            MenuKeyListener {
+    private class Handler extends BasicMenuItemUI.Handler {
         //
         // PropertyChangeListener
         //
@@ -585,45 +580,5 @@
         }
         public void menuDragMouseExited(MenuDragMouseEvent e) {}
         public void menuDragMouseReleased(MenuDragMouseEvent e) {}
-
-
-        //
-        // MenuKeyListener
-        //
-        /**
-         * Open the Menu
-         */
-        public void menuKeyTyped(MenuKeyEvent e) {
-            if (!crossMenuMnemonic && BasicPopupMenuUI.getLastPopup() != null) {
-                // when crossMenuMnemonic is not set, we don't open a toplevel
-                // menu if another toplevel menu is already open
-                    return;
-                }
-
-            char key = Character.toLowerCase((char)menuItem.getMnemonic());
-            MenuElement path[] = e.getPath();
-            MenuSelectionManager manager = e.getMenuSelectionManager();
-            if (key == Character.toLowerCase(e.getKeyChar())) {
-                JPopupMenu popupMenu = ((JMenu)menuItem).getPopupMenu();
-                ArrayList<MenuElement> newList = new ArrayList<MenuElement>(Arrays.asList(path));
-                newList.add(popupMenu);
-                MenuElement subs[] = popupMenu.getSubElements();
-                MenuElement sub =
-                        BasicPopupMenuUI.findEnabledChild(subs, -1, true);
-                if(sub != null) {
-                    newList.add(sub);
-                }
-                MenuElement newPath[] = new MenuElement[0];
-                newPath = newList.toArray(newPath);
-                manager.setSelectedPath(newPath);
-                e.consume();
-            } else if (((JMenu)menuItem).isTopLevelMenu()
-                    && BasicPopupMenuUI.getLastPopup() == null) {
-                manager.clearSelectedPath();
-            }
-        }
-
-        public void menuKeyPressed(MenuKeyEvent e) {}
-        public void menuKeyReleased(MenuKeyEvent e) {}
     }
 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -339,7 +339,7 @@
                         indexes[matches++] = j;
                     }
                 }
-                if (item.isArmed()) {
+                if (item.isArmed() || item.isSelected()) {
                     currentIndex = matches - 1;
                 }
             }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1027,7 +1027,7 @@
                 shouldStartTimer =
                     table.isCellSelected(pressedRow, pressedCol) &&
                     !e.isShiftDown() &&
-                    !e.isControlDown() &&
+                    !BasicGraphicsUtils.isMenuShortcutKeyDown(e) &&
                     !outsidePrefSize;
             }
 
@@ -1051,7 +1051,7 @@
 
                 dragPressDidSelection = false;
 
-                if (e.isControlDown() && isFileList) {
+                if (BasicGraphicsUtils.isMenuShortcutKeyDown(e) && isFileList) {
                     // do nothing for control - will be handled on release
                     // or when drag starts
                     return;
@@ -1115,7 +1115,9 @@
 
             CellEditor editor = table.getCellEditor();
             if (dragEnabled || editor == null || editor.shouldSelectCell(e)) {
-                table.changeSelection(pressedRow, pressedCol, e.isControlDown(), e.isShiftDown());
+                table.changeSelection(pressedRow, pressedCol,
+                        BasicGraphicsUtils.isMenuShortcutKeyDown(e),
+                        e.isShiftDown());
             }
         }
 
@@ -1212,7 +1214,7 @@
         public void dragStarting(MouseEvent me) {
             dragStarted = true;
 
-            if (me.isControlDown() && isFileList) {
+            if (BasicGraphicsUtils.isMenuShortcutKeyDown(me) && isFileList) {
                 table.getSelectionModel().addSelectionInterval(pressedRow,
                                                                pressedRow);
                 table.getColumnModel().getSelectionModel().
@@ -1251,7 +1253,8 @@
                 return;
             }
 
-            table.changeSelection(row, column, e.isControlDown(), true);
+            table.changeSelection(row, column,
+                    BasicGraphicsUtils.isMenuShortcutKeyDown(e), true);
         }
 
 
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Wed Jul 05 17:01:52 2017 +0200
@@ -2265,7 +2265,7 @@
      */
     protected boolean isToggleSelectionEvent(MouseEvent event) {
         return (SwingUtilities.isLeftMouseButton(event) &&
-                event.isControlDown());
+                BasicGraphicsUtils.isMenuShortcutKeyDown(event));
     }
 
     /**
@@ -3255,7 +3255,7 @@
             // handle first letter navigation
             if(tree != null && tree.getRowCount()>0 && tree.hasFocus() &&
                tree.isEnabled()) {
-                if (e.isAltDown() || e.isControlDown() || e.isMetaDown() ||
+                if (e.isAltDown() || BasicGraphicsUtils.isMenuShortcutKeyDown(e) ||
                     isNavigationKey(e)) {
                     return;
                 }
@@ -3511,7 +3511,7 @@
 
                 dragPressDidSelection = false;
 
-                if (e.isControlDown()) {
+                if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
                     // do nothing for control - will be handled on release
                     // or when drag starts
                     return;
@@ -3565,7 +3565,7 @@
         public void dragStarting(MouseEvent me) {
             dragStarted = true;
 
-            if (me.isControlDown()) {
+            if (BasicGraphicsUtils.isMenuShortcutKeyDown(me)) {
                 tree.addSelectionPath(pressedPath);
                 setAnchorSelectionPath(pressedPath);
                 setLeadSelectionPath(pressedPath, true);
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/Defaults.template	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/Defaults.template	Wed Jul 05 17:01:52 2017 +0200
@@ -26,7 +26,7 @@
 
 import javax.swing.Painter;
 import java.awt.Graphics;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
 import sun.swing.plaf.synth.DefaultSynthStyle;
 import javax.swing.BorderFactory;
 import javax.swing.JComponent;
@@ -131,7 +131,7 @@
         //regions and their states that this class will use for later lookup.
         //Additional regions can be registered later by 3rd party components.
         //These are simply the default registrations.
-        defaultFont = FontManager.getFontConfigFUIR("sans", Font.PLAIN, 12);
+        defaultFont = FontUtilities.getFontConfigFUIR("sans", Font.PLAIN, 12);
         defaultStyle = new DefaultSynthStyle();
         defaultStyle.setFont(defaultFont);
 
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/skin.laf	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/skin.laf	Wed Jul 05 17:01:52 2017 +0200
@@ -14824,7 +14824,9 @@
             <background/>
             <cacheSettingsInherited>false</cacheSettingsInherited>
             <cacheMode>NO_CACHING</cacheMode>
-            <uiproperties/>
+            <uiproperties>
+               <uiProperty name="textIconGap" type="INT" value="5"/>
+            </uiproperties>
          </style>
          <backgroundStates>
             <state stateKeys="Disabled">
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Wed Jul 05 17:01:52 2017 +0200
@@ -475,11 +475,11 @@
          return result;
      }
 
-    static void applyInsets(Rectangle rect, Insets insets) {
+    static void applyInsets(Rectangle rect, Insets insets, boolean leftToRight) {
         if (insets != null) {
-            rect.x += insets.left;
+            rect.x += (leftToRight ? insets.left : insets.right);
             rect.y += insets.top;
-            rect.width -= (insets.right + rect.x);
+            rect.width -= (leftToRight ? insets.right : insets.left) + rect.x;
             rect.height -= (insets.bottom + rect.y);
         }
     }
@@ -492,12 +492,12 @@
         g.setFont(style.getFont(context));
 
         Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight());
-        applyInsets(viewRect, mi.getInsets());
+        boolean leftToRight = SynthLookAndFeel.isLeftToRight(mi);
+        applyInsets(viewRect, mi.getInsets(), leftToRight);
 
         SynthMenuItemLayoutHelper lh = new SynthMenuItemLayoutHelper(
-                context, accContext, mi, checkIcon,
-                arrowIcon, viewRect, defaultTextIconGap, acceleratorDelimiter,
-                SynthLookAndFeel.isLeftToRight(mi),
+                context, accContext, mi, checkIcon, arrowIcon, viewRect,
+                defaultTextIconGap, acceleratorDelimiter, leftToRight,
                 MenuItemLayoutHelper.useCheckAndArrow(mi), propertyPrefix);
         MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem();
 
--- a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Wed Jul 05 17:01:52 2017 +0200
@@ -510,7 +510,7 @@
         if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0 &&
             getDot() != -1) {
             moveCaret(e);
-        } else {
+        } else if (!e.isPopupTrigger()) {
             positionCaret(e);
         }
     }
--- a/jdk/src/share/classes/javax/swing/text/StyleContext.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StyleContext.java	Wed Jul 05 17:01:52 2017 +0200
@@ -35,7 +35,7 @@
 import java.lang.ref.WeakReference;
 import java.util.WeakHashMap;
 
-import sun.font.FontManager;
+import sun.font.FontUtilities;
 
 /**
  * A pool of styles and their associated resources.  This class determines
@@ -263,8 +263,8 @@
             if (f == null) {
                 f = new Font(family, style, size);
             }
-            if (! FontManager.fontSupportsDefaultEncoding(f)) {
-                f = FontManager.getCompositeFontUIResource(f);
+            if (! FontUtilities.fontSupportsDefaultEncoding(f)) {
+                f = FontUtilities.getCompositeFontUIResource(f);
             }
             FontKey key = new FontKey(family, style, size);
             fontTable.put(key, f);
--- a/jdk/src/share/classes/javax/swing/text/TextLayoutStrategy.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TextLayoutStrategy.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,6 +30,7 @@
 import java.text.BreakIterator;
 import java.awt.font.*;
 import java.awt.geom.AffineTransform;
+import javax.swing.JComponent;
 import javax.swing.event.DocumentEvent;
 import sun.font.BidiUtils;
 
@@ -301,6 +302,13 @@
             iter = BreakIterator.getLineInstance();
         }
 
+        Object shaper = null;
+        if (c instanceof JComponent) {
+            shaper = ((JComponent) c).getClientProperty(
+                                            TextAttribute.NUMERIC_SHAPING);
+        }
+        text.setShaper(shaper);
+
         measurer = new LineBreakMeasurer(text, iter, frc);
 
         // If the children of the FlowView's logical view are GlyphViews, they
@@ -399,6 +407,10 @@
             return pos - v.getStartOffset() + getBeginIndex();
         }
 
+        private void setShaper(Object shaper) {
+            this.shaper = shaper;
+        }
+
         // --- AttributedCharacterIterator methods -------------------------
 
         /**
@@ -511,6 +523,8 @@
             } else if( attribute == TextAttribute.RUN_DIRECTION ) {
                 return
                     v.getDocument().getProperty(TextAttribute.RUN_DIRECTION);
+            } else if (attribute == TextAttribute.NUMERIC_SHAPING) {
+                return shaper;
             }
             return null;
         }
@@ -532,8 +546,10 @@
             keys = new HashSet<Attribute>();
             keys.add(TextAttribute.FONT);
             keys.add(TextAttribute.RUN_DIRECTION);
+            keys.add(TextAttribute.NUMERIC_SHAPING);
         }
 
+        private Object shaper = null;
     }
 
 }
--- a/jdk/src/share/classes/sun/awt/AWTAutoShutdown.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/AWTAutoShutdown.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,7 +30,7 @@
 import java.util.HashSet;
 import java.util.IdentityHashMap;
 import java.util.Map;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 /**
  * This class is to let AWT shutdown automatically when a user is done
@@ -154,14 +154,17 @@
 
     /**
      * Add a specified thread to the set of busy event dispatch threads.
-     * If this set already contains the specified thread, the call leaves
-     * this set unchanged and returns silently.
+     * If this set already contains the specified thread or the thread is null,
+     * the call leaves this set unchanged and returns silently.
      *
      * @param thread thread to be added to this set, if not present.
      * @see     AWTAutoShutdown#notifyThreadFree
      * @see     AWTAutoShutdown#isReadyToShutdown
      */
     public void notifyThreadBusy(final Thread thread) {
+        if (thread == null) {
+            return;
+        }
         synchronized (activationLock) {
             synchronized (mainLock) {
                 if (blockerThread == null) {
@@ -177,14 +180,17 @@
 
     /**
      * Remove a specified thread from the set of busy event dispatch threads.
-     * If this set doesn't contain the specified thread, the call leaves
-     * this set unchanged and returns silently.
+     * If this set doesn't contain the specified thread or the thread is null,
+     * the call leaves this set unchanged and returns silently.
      *
      * @param thread thread to be removed from this set, if present.
      * @see     AWTAutoShutdown#notifyThreadBusy
      * @see     AWTAutoShutdown#isReadyToShutdown
      */
     public void notifyThreadFree(final Thread thread) {
+        if (thread == null) {
+            return;
+        }
         synchronized (activationLock) {
             synchronized (mainLock) {
                 busyThreadSet.remove(thread);
@@ -363,7 +369,7 @@
         }
     }
 
-    final void dumpPeers(final Logger aLog) {
+    final void dumpPeers(final PlatformLogger aLog) {
         synchronized (activationLock) {
             synchronized (mainLock) {
                 aLog.fine("Mapped peers:");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/awt/AWTPermissionFactory.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt;
+
+import java.awt.AWTPermission;
+import sun.security.util.PermissionFactory;
+
+/**
+ * A factory object for AWTPermission objects.
+ */
+
+public class AWTPermissionFactory
+    implements PermissionFactory<AWTPermission>
+{
+    @Override
+    public AWTPermission newPermission(String name) {
+        return new AWTPermission(name);
+    }
+}
--- a/jdk/src/share/classes/sun/awt/AppContext.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/AppContext.java	Wed Jul 05 17:01:52 2017 +0200
@@ -40,10 +40,9 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.HashSet;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.beans.PropertyChangeSupport;
 import java.beans.PropertyChangeListener;
+import sun.util.logging.PlatformLogger;
 
 /**
  * The AppContext is a table referenced by ThreadGroup which stores
@@ -128,7 +127,7 @@
  * @author  Fred Ecks
  */
 public final class AppContext {
-    private static final Logger log = Logger.getLogger("sun.awt.AppContext");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.AppContext");
 
     /* Since the contents of an AppContext are unique to each Java
      * session, this class should never be serialized. */
@@ -380,9 +379,7 @@
                     try {
                         w.dispose();
                     } catch (Throwable t) {
-                        if (log.isLoggable(Level.FINER)) {
-                            log.log(Level.FINER, "exception occured while disposing app context", t);
-                        }
+                        log.finer("exception occured while disposing app context", t);
                     }
                 }
                 AccessController.doPrivileged(new PrivilegedAction() {
--- a/jdk/src/share/classes/sun/awt/ComponentAccessor.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/ComponentAccessor.java	Wed Jul 05 17:01:52 2017 +0200
@@ -39,8 +39,7 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
 
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -78,7 +77,7 @@
     private static Method methodGetCursorNoClientCode;
     private static Method methodLocationNoClientCode;
 
-    private static final Logger log = Logger.getLogger("sun.awt.ComponentAccessor");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ComponentAccessor");
 
     private ComponentAccessor() {
     }
@@ -136,13 +135,13 @@
                         methodLocationNoClientCode.setAccessible(true);
                     }
                     catch (NoSuchFieldException e) {
-                        log.log(Level.FINE, "Unable to initialize ComponentAccessor", e);
+                        log.fine("Unable to initialize ComponentAccessor", e);
                     }
                     catch (ClassNotFoundException e) {
-                        log.log(Level.FINE, "Unable to initialize ComponentAccessor", e);
+                        log.fine("Unable to initialize ComponentAccessor", e);
                     }
                     catch (NoSuchMethodException e) {
-                        log.log(Level.FINE, "Unable to initialize ComponentAccessor", e);
+                        log.fine("Unable to initialize ComponentAccessor", e);
                     }
                     // to please javac
                     return null;
@@ -157,7 +156,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -168,7 +167,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -179,7 +178,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -190,7 +189,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -204,7 +203,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -214,7 +213,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return 0;
     }
@@ -225,7 +224,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return 0;
     }
@@ -236,7 +235,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return 0;
     }
@@ -247,7 +246,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return 0;
     }
@@ -258,7 +257,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return false;
     }
@@ -271,10 +270,10 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
 
         return parent;
@@ -288,10 +287,10 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
 
         return font;
@@ -307,10 +306,10 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
     }
 
@@ -322,10 +321,10 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
     }
 
@@ -336,7 +335,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -348,7 +347,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return color;
     }
@@ -361,7 +360,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return color;
     }
@@ -372,7 +371,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -384,7 +383,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return f;
     }
@@ -396,7 +395,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return peer;
     }
@@ -406,7 +405,7 @@
             fieldPeer.set(c, peer);
         } catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
     }
 
@@ -415,7 +414,7 @@
             return fieldIgnoreRepaint.getBoolean(comp);
         }
         catch (IllegalAccessException e) {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
 
         return false;
@@ -427,7 +426,7 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         return false;
     }
@@ -439,10 +438,10 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
         return enabled;
     }
@@ -455,10 +454,10 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
 
         return cursor;
@@ -472,12 +471,13 @@
         }
         catch (IllegalAccessException e)
         {
-            log.log(Level.FINE, "Unable to access the Component object", e);
+            log.fine("Unable to access the Component object", e);
         }
         catch (InvocationTargetException e) {
-            log.log(Level.FINE, "Unable to invoke on the Component object", e);
+            log.fine("Unable to invoke on the Component object", e);
         }
 
         return loc;
     }
+
 }
--- a/jdk/src/share/classes/sun/awt/DebugSettings.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/DebugSettings.java	Wed Jul 05 17:01:52 2017 +0200
@@ -28,7 +28,7 @@
 import java.io.*;
 
 import java.util.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /*
  * Internal class that manages sun.awt.Debug settings.
@@ -72,7 +72,7 @@
  * the fix for 4638447).
  */
 final class DebugSettings {
-    private static final Logger log = Logger.getLogger("sun.awt.debug.DebugSettings");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.debug.DebugSettings");
 
     /* standard debug property key names */
     static final String PREFIX = "awtdebug";
@@ -128,8 +128,8 @@
         });
 
         // echo the initial property settings to stdout
-        if (log.isLoggable(Level.FINE)) {
-            log.log(Level.FINE, "DebugSettings:\n{0}", this);
+        if (log.isLoggable(PlatformLogger.FINE)) {
+            log.fine("DebugSettings:\n{0}" + this);
         }
     }
 
@@ -258,8 +258,8 @@
     }
 
     private void println(Object object) {
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, object.toString());
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer(object.toString());
         }
     }
 
--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,7 +30,6 @@
 import java.io.DataOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -38,7 +37,6 @@
 import java.nio.charset.CharsetEncoder;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.logging.Logger;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
@@ -49,7 +47,10 @@
 import java.util.Set;
 import java.util.Vector;
 import sun.font.CompositeFontDescriptor;
-import sun.java2d.SunGraphicsEnvironment;
+import sun.font.SunFontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
+import sun.util.logging.PlatformLogger;
 
 /**
  * Provides the definitions of the five logical fonts: Serif, SansSerif,
@@ -65,10 +66,10 @@
     protected static Locale startupLocale = null;
     protected static Hashtable localeMap = null;
     private static FontConfiguration fontConfig;
-    private static Logger logger;
+    private static PlatformLogger logger;
     protected static boolean isProperties = true;
 
-    protected SunGraphicsEnvironment environment;
+    protected SunFontManager fontManager;
     protected boolean preferLocaleFonts;
     protected boolean preferPropFonts;
 
@@ -80,11 +81,11 @@
     /* A default FontConfiguration must be created before an alternate
      * one to ensure proper static initialisation takes place.
      */
-    public FontConfiguration(SunGraphicsEnvironment environment) {
-        if (SunGraphicsEnvironment.debugFonts && logger == null) {
-            logger = Logger.getLogger("sun.awt.FontConfiguration");
+    public FontConfiguration(SunFontManager fm) {
+        if (FontUtilities.debugFonts() && logger == null) {
+            logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
         }
-        this.environment = environment;
+        fontManager = fm;
         setOsNameAndVersion();  /* static initialization */
         setEncoding();          /* static initialization */
         /* Separating out the file location from the rest of the
@@ -106,10 +107,10 @@
         return true;
     }
 
-    public FontConfiguration(SunGraphicsEnvironment environment,
+    public FontConfiguration(SunFontManager fm,
                              boolean preferLocaleFonts,
                              boolean preferPropFonts) {
-        this.environment = environment;
+        fontManager = fm;
         this.preferLocaleFonts = preferLocaleFonts;
         this.preferPropFonts = preferPropFonts;
         /* fontConfig should be initialised by default constructor, and
@@ -198,17 +199,17 @@
                     loadBinary(in);
                 }
                 in.close();
-                if (SunGraphicsEnvironment.debugFonts) {
+                if (FontUtilities.debugFonts()) {
                     logger.config("Read logical font configuration from " + f);
                 }
             } catch (IOException e) {
-                if (SunGraphicsEnvironment.debugFonts) {
+                if (FontUtilities.debugFonts()) {
                     logger.config("Failed to read logical font configuration from " + f);
                 }
             }
         }
         String version = getVersion();
-        if (!"1".equals(version) && SunGraphicsEnvironment.debugFonts) {
+        if (!"1".equals(version) && FontUtilities.debugFonts()) {
             logger.config("Unsupported fontconfig version: " + version);
         }
     }
@@ -219,8 +220,8 @@
 
         File fallbackDir = new File(fallbackDirName);
         if (fallbackDir.exists() && fallbackDir.isDirectory()) {
-            String[] ttfs = fallbackDir.list(SunGraphicsEnvironment.ttFilter);
-            String[] t1s = fallbackDir.list(SunGraphicsEnvironment.t1Filter);
+            String[] ttfs = fallbackDir.list(fontManager.getTrueTypeFilter());
+            String[] t1s = fallbackDir.list(fontManager.getType1Filter());
             int numTTFs = (ttfs == null) ? 0 : ttfs.length;
             int numT1s = (t1s == null) ? 0 : t1s.length;
             int len = numTTFs + numT1s;
@@ -236,7 +237,7 @@
                 installedFallbackFontFiles[i+numTTFs] =
                     fallbackDir + File.separator + t1s[i];
             }
-            environment.registerFontsInDir(fallbackDirName);
+            fontManager.registerFontsInDir(fallbackDirName);
         }
     }
 
@@ -365,7 +366,7 @@
         stringTable = new StringBuilder(4096);
 
         if (verbose && logger == null) {
-            logger = Logger.getLogger("sun.awt.FontConfiguration");
+            logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
         }
         new PropertiesHandler().load(in);
 
@@ -465,7 +466,7 @@
                     nameIDs[index] = getComponentFontID(coreScripts[index],
                                                fontIndex, styleIndex);
                     if (preferLocaleFonts && localeMap != null &&
-                        sun.font.FontManager.usingAlternateFontforJALocales()) {
+                            fontManager.usingAlternateFontforJALocales()) {
                         nameIDs[index] = remapLocaleMap(fontIndex, styleIndex,
                                                         coreScripts[index], nameIDs[index]);
                     }
@@ -480,7 +481,7 @@
                     short id = getComponentFontID(fallbackScripts[i],
                                                fontIndex, styleIndex);
                     if (preferLocaleFonts && localeMap != null &&
-                        sun.font.FontManager.usingAlternateFontforJALocales()) {
+                            fontManager.usingAlternateFontforJALocales()) {
                         id = remapLocaleMap(fontIndex, styleIndex, fallbackScripts[i], id);
                     }
                     if (preferPropFonts) {
@@ -973,8 +974,8 @@
     public CompositeFontDescriptor[] get2DCompositeFontInfo() {
         CompositeFontDescriptor[] result =
                 new CompositeFontDescriptor[NUM_FONTS * NUM_STYLES];
-        String defaultFontFile = environment.getDefaultFontFile();
-        String defaultFontFaceName = environment.getDefaultFontFaceName();
+        String defaultFontFile = fontManager.getDefaultFontFile();
+        String defaultFontFaceName = fontManager.getDefaultFontFaceName();
 
         for (int fontIndex = 0; fontIndex < NUM_FONTS; fontIndex++) {
             String fontName = publicFontNames[fontIndex];
@@ -1121,7 +1122,7 @@
      */
     HashMap<String, Boolean> existsMap;
     public boolean needToSearchForFile(String fileName) {
-        if (!environment.isLinux) {
+        if (!FontUtilities.isLinux) {
             return false;
         } else if (existsMap == null) {
            existsMap = new HashMap<String, Boolean>();
@@ -1139,7 +1140,7 @@
             } else {
                 exists = Boolean.valueOf((new File(fileName)).exists());
                 existsMap.put(fileName, exists);
-                if (SunGraphicsEnvironment.debugFonts &&
+                if (FontUtilities.debugFonts() &&
                     exists == Boolean.FALSE) {
                     logger.warning("Couldn't locate font file " + fileName);
                 }
@@ -2067,7 +2068,8 @@
                         throw new Exception();
                     }
                 } catch (Exception e) {
-                    if (SunGraphicsEnvironment.debugFonts && logger != null) {
+                    if (FontUtilities.debugFonts() &&
+                        logger != null) {
                         logger.config("Failed parsing " + key +
                                   " property of font configuration.");
 
--- a/jdk/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java	Wed Jul 05 17:01:52 2017 +0200
@@ -39,12 +39,11 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
 
-    private static final Logger focusLog = Logger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
 
     private static AWTAccessor.KeyboardFocusManagerAccessor kfmAccessor =
         AWTAccessor.getKeyboardFocusManagerAccessor();
@@ -64,7 +63,8 @@
     public void clearGlobalFocusOwner(Window activeWindow) {
         if (activeWindow != null) {
             Component focusOwner = activeWindow.getFocusOwner();
-            if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Clearing global focus owner " + focusOwner);
+            if (focusLog.isLoggable(PlatformLogger.FINE))
+                focusLog.fine("Clearing global focus owner " + focusOwner);
             if (focusOwner != null) {
                 FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
                                                      CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
@@ -130,14 +130,16 @@
             FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
                                                  false, lightweightChild, cause);
 
-            if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Posting focus event: " + fl);
+            if (focusLog.isLoggable(PlatformLogger.FINER))
+                focusLog.finer("Posting focus event: " + fl);
             SunToolkit.postPriorityEvent(fl);
         }
 
         FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
                                              false, currentOwner, cause);
 
-        if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Posting focus event: " + fg);
+        if (focusLog.isLoggable(PlatformLogger.FINER))
+            focusLog.finer("Posting focus event: " + fg);
         SunToolkit.postPriorityEvent(fg);
         return true;
     }
--- a/jdk/src/share/classes/sun/awt/ScrollPaneWheelScroller.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/ScrollPaneWheelScroller.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,7 +30,7 @@
 import java.awt.Adjustable;
 import java.awt.event.MouseWheelEvent;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /*
  * ScrollPaneWheelScroller is a helper class for implmenenting mouse wheel
@@ -39,7 +39,7 @@
  */
 public abstract class ScrollPaneWheelScroller {
 
-    private static final Logger log = Logger.getLogger("sun.awt.ScrollPaneWheelScroller");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ScrollPaneWheelScroller");
 
     private ScrollPaneWheelScroller() {}
 
@@ -47,8 +47,8 @@
      * Called from ScrollPane.processMouseWheelEvent()
      */
     public static void handleWheelScrolling(ScrollPane sp, MouseWheelEvent e) {
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer("x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
         }
         int increment = 0;
 
@@ -56,8 +56,8 @@
             Adjustable adj = getAdjustableToScroll(sp);
             if (adj != null) {
                 increment = getIncrementFromAdjustable(adj, e);
-                if (log.isLoggable(Level.FINER)) {
-                    log.log(Level.FINER, "increment from adjustable(" + adj.getClass() + ") : " + increment);
+                if (log.isLoggable(PlatformLogger.FINER)) {
+                    log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment);
                 }
                 scrollAdjustable(adj, increment);
             }
@@ -74,8 +74,8 @@
         // if policy is display always or never, use vert
         if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
             policy == ScrollPane.SCROLLBARS_NEVER) {
-            if (log.isLoggable(Level.FINER)) {
-                log.log(Level.FINER, "using vertical scrolling due to scrollbar policy");
+            if (log.isLoggable(PlatformLogger.FINER)) {
+                log.finer("using vertical scrolling due to scrollbar policy");
             }
             return sp.getVAdjustable();
 
@@ -85,31 +85,31 @@
             Insets ins = sp.getInsets();
             int vertScrollWidth = sp.getVScrollbarWidth();
 
-            if (log.isLoggable(Level.FINER)) {
-                log.log(Level.FINER, "insets: l = " + ins.left + ", r = " + ins.right +
+            if (log.isLoggable(PlatformLogger.FINER)) {
+                log.finer("insets: l = " + ins.left + ", r = " + ins.right +
                  ", t = " + ins.top + ", b = " + ins.bottom);
-                log.log(Level.FINER, "vertScrollWidth = " + vertScrollWidth);
+                log.finer("vertScrollWidth = " + vertScrollWidth);
             }
 
             // Check if scrollbar is showing by examining insets of the
             // ScrollPane
             if (ins.right >= vertScrollWidth) {
-                if (log.isLoggable(Level.FINER)) {
-                    log.log(Level.FINER, "using vertical scrolling because scrollbar is present");
+                if (log.isLoggable(PlatformLogger.FINER)) {
+                    log.finer("using vertical scrolling because scrollbar is present");
                 }
                 return sp.getVAdjustable();
             }
             else {
                 int horizScrollHeight = sp.getHScrollbarHeight();
                 if (ins.bottom >= horizScrollHeight) {
-                    if (log.isLoggable(Level.FINER)) {
-                        log.log(Level.FINER, "using horiz scrolling because scrollbar is present");
+                    if (log.isLoggable(PlatformLogger.FINER)) {
+                        log.finer("using horiz scrolling because scrollbar is present");
                     }
                     return sp.getHAdjustable();
                 }
                 else {
-                    if (log.isLoggable(Level.FINER)) {
-                        log.log(Level.FINER, "using NO scrollbar becsause neither is present");
+                    if (log.isLoggable(PlatformLogger.FINER)) {
+                        log.finer("using NO scrollbar becsause neither is present");
                     }
                     return null;
                 }
@@ -124,9 +124,9 @@
      */
     public static int getIncrementFromAdjustable(Adjustable adj,
                                                  MouseWheelEvent e) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (adj == null) {
-                log.log(Level.FINE, "Assertion (adj != null) failed");
+                log.fine("Assertion (adj != null) failed");
             }
         }
 
@@ -146,19 +146,19 @@
      * bounds and sets the new value to the Adjustable.
      */
     public static void scrollAdjustable(Adjustable adj, int amount) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (adj == null) {
-                log.log(Level.FINE, "Assertion (adj != null) failed");
+                log.fine("Assertion (adj != null) failed");
             }
             if (amount == 0) {
-                log.log(Level.FINE, "Assertion (amount != 0) failed");
+                log.fine("Assertion (amount != 0) failed");
             }
         }
 
         int current = adj.getValue();
         int upperLimit = adj.getMaximum() - adj.getVisibleAmount();
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "doScrolling by " + amount);
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer("doScrolling by " + amount);
         }
 
         if (amount > 0 && current < upperLimit) { // still some room to scroll
--- a/jdk/src/share/classes/sun/awt/SunDisplayChanger.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/SunDisplayChanger.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,7 @@
 import java.util.HashMap;
 import java.util.WeakHashMap;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /**
  * This class is used to aid in keeping track of DisplayChangedListeners and
@@ -54,7 +54,7 @@
  * screen to another on a system equipped with multiple displays.
  */
 public class SunDisplayChanger {
-    private static final Logger log = Logger.getLogger("sun.awt.multiscreen.SunDisplayChanger");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.multiscreen.SunDisplayChanger");
 
     // Create a new synchronizedMap with initial capacity of one listener.
     // It is asserted that the most common case is to have one GraphicsDevice
@@ -68,13 +68,13 @@
      * notified when the display is changed.
      */
     public void add(DisplayChangedListener theListener) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (theListener == null) {
-                log.log(Level.FINE, "Assertion (theListener != null) failed");
+                log.fine("Assertion (theListener != null) failed");
             }
         }
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "Adding listener: " + theListener);
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer("Adding listener: " + theListener);
         }
         listeners.put(theListener, null);
     }
@@ -83,13 +83,13 @@
      * Remove the given DisplayChangeListener from this SunDisplayChanger.
      */
     public void remove(DisplayChangedListener theListener) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             if (theListener == null) {
-                log.log(Level.FINE, "Assertion (theListener != null) failed");
+                log.fine("Assertion (theListener != null) failed");
             }
         }
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "Removing listener: " + theListener);
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer("Removing listener: " + theListener);
         }
         listeners.remove(theListener);
     }
@@ -99,8 +99,8 @@
      * taken place by calling their displayChanged() methods.
      */
     public void notifyListeners() {
-        if (log.isLoggable(Level.FINEST)) {
-            log.log(Level.FINEST, "notifyListeners");
+        if (log.isLoggable(PlatformLogger.FINEST)) {
+            log.finest("notifyListeners");
         }
     // This method is implemented by making a clone of the set of listeners,
     // and then iterating over the clone.  This is because during the course
@@ -126,8 +126,8 @@
             DisplayChangedListener current =
              (DisplayChangedListener) itr.next();
             try {
-                if (log.isLoggable(Level.FINEST)) {
-                    log.log(Level.FINEST, "displayChanged for listener: " + current);
+                if (log.isLoggable(PlatformLogger.FINEST)) {
+                    log.finest("displayChanged for listener: " + current);
                 }
                 current.displayChanged();
             } catch (IllegalComponentStateException e) {
@@ -146,7 +146,7 @@
      * taken place by calling their paletteChanged() methods.
      */
     public void notifyPaletteChanged() {
-        if (log.isLoggable(Level.FINEST)) {
+        if (log.isLoggable(PlatformLogger.FINEST)) {
             log.finest("notifyPaletteChanged");
         }
     // This method is implemented by making a clone of the set of listeners,
@@ -172,8 +172,8 @@
             DisplayChangedListener current =
              (DisplayChangedListener) itr.next();
             try {
-                if (log.isLoggable(Level.FINEST)) {
-                    log.log(Level.FINEST, "paletteChanged for listener: " + current);
+                if (log.isLoggable(PlatformLogger.FINEST)) {
+                    log.finest("paletteChanged for listener: " + current);
                 }
                 current.paletteChanged();
             } catch (IllegalComponentStateException e) {
--- a/jdk/src/share/classes/sun/awt/SunGraphicsCallback.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/SunGraphicsCallback.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,14 +27,14 @@
 
 import java.awt.*;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 public abstract class SunGraphicsCallback {
     public static final int HEAVYWEIGHTS = 0x1;
     public static final int LIGHTWEIGHTS = 0x2;
     public static final int TWO_PASSES = 0x4;
 
-    private static final Logger log = Logger.getLogger("sun.awt.SunGraphicsCallback");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunGraphicsCallback");
 
     public abstract void run(Component comp, Graphics cg);
 
@@ -87,11 +87,11 @@
         int ncomponents = comps.length;
         Shape clip = g.getClip();
 
-        if (log.isLoggable(Level.FINER) && (clip != null)) {
+        if (log.isLoggable(PlatformLogger.FINER) && (clip != null)) {
             Rectangle newrect = clip.getBounds();
-            log.log(Level.FINER, "x = " + newrect.x + ", y = " + newrect.y +
-                                 ", width = " + newrect.width +
-                                 ", height = " + newrect.height);
+            log.finer("x = " + newrect.x + ", y = " + newrect.y +
+                      ", width = " + newrect.width +
+                      ", height = " + newrect.height);
         }
 
         // A seriously sad hack--
--- a/jdk/src/share/classes/sun/awt/SunToolkit.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/SunToolkit.java	Wed Jul 05 17:01:52 2017 +0200
@@ -40,8 +40,7 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 import sun.misc.SoftCache;
 import sun.font.FontDesignMetrics;
 import sun.awt.im.InputContext;
@@ -61,7 +60,7 @@
     implements WindowClosingSupport, WindowClosingListener,
     ComponentFactory, InputMethodSupport, KeyboardFocusManagerPeerProvider {
 
-    private static final Logger log = Logger.getLogger("sun.awt.SunToolkit");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunToolkit");
 
     /* Load debug settings for native code */
     static {
@@ -986,9 +985,9 @@
             //with scale factors x1, x3/4, x2/3, xN, x1/N.
             Image im = i.next();
             if (im == null) {
-                if (log.isLoggable(Level.FINER)) {
-                    log.log(Level.FINER, "SunToolkit.getScaledIconImage: " +
-                            "Skipping the image passed into Java because it's null.");
+                if (log.isLoggable(PlatformLogger.FINER)) {
+                    log.finer("SunToolkit.getScaledIconImage: " +
+                              "Skipping the image passed into Java because it's null.");
                 }
                 continue;
             }
@@ -1002,9 +1001,9 @@
                 iw = im.getWidth(null);
                 ih = im.getHeight(null);
             } catch (Exception e){
-                if (log.isLoggable(Level.FINER)) {
-                    log.log(Level.FINER, "SunToolkit.getScaledIconImage: " +
-                            "Perhaps the image passed into Java is broken. Skipping this icon.");
+                if (log.isLoggable(PlatformLogger.FINER)) {
+                    log.finer("SunToolkit.getScaledIconImage: " +
+                              "Perhaps the image passed into Java is broken. Skipping this icon.");
                 }
                 continue;
             }
@@ -1077,8 +1076,8 @@
         try {
             int x = (width - bestWidth) / 2;
             int y = (height - bestHeight) / 2;
-            if (log.isLoggable(Level.FINER)) {
-                log.log(Level.FINER, "WWindowPeer.getScaledIconData() result : " +
+            if (log.isLoggable(PlatformLogger.FINER)) {
+                log.finer("WWindowPeer.getScaledIconData() result : " +
                         "w : " + width + " h : " + height +
                         " iW : " + bestImage.getWidth(null) + " iH : " + bestImage.getHeight(null) +
                         " sim : " + bestSimilarity + " sf : " + bestScaleFactor +
@@ -1095,9 +1094,9 @@
     public static DataBufferInt getScaledIconData(java.util.List<Image> imageList, int width, int height) {
         BufferedImage bimage = getScaledIconImage(imageList, width, height);
         if (bimage == null) {
-             if (log.isLoggable(Level.FINER)) {
-                 log.log(Level.FINER, "SunToolkit.getScaledIconData: " +
-                         "Perhaps the image passed into Java is broken. Skipping this icon.");
+             if (log.isLoggable(PlatformLogger.FINER)) {
+                 log.finer("SunToolkit.getScaledIconData: " +
+                           "Perhaps the image passed into Java is broken. Skipping this icon.");
              }
             return null;
         }
@@ -1913,7 +1912,7 @@
         }
     }
 
-    protected static void dumpPeers(final Logger aLog) {
+    protected static void dumpPeers(final PlatformLogger aLog) {
         AWTAutoShutdown.getInstance().dumpPeers(aLog);
     }
 
--- a/jdk/src/share/classes/sun/awt/WindowAccessor.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/WindowAccessor.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,8 +29,7 @@
 
 import java.lang.reflect.Field;
 
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -41,7 +40,7 @@
     private static Field fieldIsAutoRequestFocus;
     private static Field fieldIsTrayIconWindow;
 
-    private static final Logger log = Logger.getLogger("sun.awt.WindowAccessor");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.WindowAccessor");
 
     private WindowAccessor() {
     }
@@ -57,9 +56,9 @@
                         fieldIsTrayIconWindow.setAccessible(true);
 
                     } catch (NoSuchFieldException e) {
-                        log.log(Level.FINE, "Unable to initialize WindowAccessor: ", e);
+                        log.fine("Unable to initialize WindowAccessor: ", e);
                     } catch (ClassNotFoundException e) {
-                        log.log(Level.FINE, "Unable to initialize WindowAccessor: ", e);
+                        log.fine("Unable to initialize WindowAccessor: ", e);
                     }
                     return null;
                 }
@@ -71,7 +70,7 @@
             return fieldIsAutoRequestFocus.getBoolean(w);
 
         } catch (IllegalAccessException e) {
-            log.log(Level.FINE, "Unable to access the Window object", e);
+            log.fine("Unable to access the Window object", e);
         }
         return true;
     }
@@ -81,7 +80,7 @@
             return fieldIsTrayIconWindow.getBoolean(w);
 
         } catch (IllegalAccessException e) {
-            log.log(Level.FINE, "Unable to access the Window object", e);
+            log.fine("Unable to access the Window object", e);
         }
         return false;
     }
@@ -91,7 +90,7 @@
             fieldIsTrayIconWindow.set(w, isTrayIconWindow);
 
         } catch (IllegalAccessException e) {
-            log.log(Level.FINE, "Unable to access the Window object", e);
+            log.fine("Unable to access the Window object", e);
         }
     }
 }
--- a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -89,7 +89,7 @@
 import java.util.TreeMap;
 import java.util.TreeSet;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
@@ -222,7 +222,7 @@
      */
     private static DataTransferer transferer;
 
-    private static final Logger dtLog = Logger.getLogger("sun.awt.datatransfer.DataTransfer");
+    private static final PlatformLogger dtLog = PlatformLogger.getLogger("sun.awt.datatransfer.DataTransfer");
 
     static {
         Class tCharArrayClass = null, tByteArrayClass = null;
@@ -382,9 +382,9 @@
      * "text".
      */
     public static boolean doesSubtypeSupportCharset(DataFlavor flavor) {
-        if (dtLog.isLoggable(Level.FINE)) {
+        if (dtLog.isLoggable(PlatformLogger.FINE)) {
             if (!"text".equals(flavor.getPrimaryType())) {
-                dtLog.log(Level.FINE, "Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
+                dtLog.fine("Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
             }
         }
 
--- a/jdk/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -48,7 +48,7 @@
 import java.util.Map;
 import java.util.Arrays;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -99,7 +99,7 @@
 
     protected static final Object _globalLock = new Object();
 
-    private static final Logger dndLog = Logger.getLogger("sun.awt.dnd.SunDropTargetContextPeer");
+    private static final PlatformLogger dndLog = PlatformLogger.getLogger("sun.awt.dnd.SunDropTargetContextPeer");
 
     /*
      * a primitive mechanism for advertising intra-JVM Transferables
@@ -845,8 +845,8 @@
 
         void registerEvent(SunDropTargetEvent e) {
             handler.lock();
-            if (!eventSet.add(e) && dndLog.isLoggable(Level.FINE)) {
-                dndLog.log(Level.FINE, "Event is already registered: " + e);
+            if (!eventSet.add(e) && dndLog.isLoggable(PlatformLogger.FINE)) {
+                dndLog.fine("Event is already registered: " + e);
             }
             handler.unlock();
         }
--- a/jdk/src/share/classes/sun/awt/im/InputContext.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/im/InputContext.java	Wed Jul 05 17:01:52 2017 +0200
@@ -50,9 +50,9 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Locale;
-import java.util.logging.*;
 import java.util.prefs.BackingStoreException;
 import java.util.prefs.Preferences;
+import sun.util.logging.PlatformLogger;
 import sun.awt.SunToolkit;
 
 /**
@@ -67,7 +67,7 @@
 
 public class InputContext extends java.awt.im.InputContext
                           implements ComponentListener, WindowListener {
-    private static final Logger log = Logger.getLogger("sun.awt.im.InputContext");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.im.InputContext");
     // The current input method is represented by two objects:
     // a locator is used to keep information about the selected
     // input method and locale until we actually need a real input
@@ -386,7 +386,7 @@
             }
             previousInputMethod = null;
 
-            if (log.isLoggable(Level.FINE)) log.fine("Current client component " + currentClientComponent);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("Current client component " + currentClientComponent);
             if (inputMethod instanceof InputMethodAdapter) {
                 ((InputMethodAdapter) inputMethod).setClientComponent(currentClientComponent);
             }
@@ -889,7 +889,7 @@
             {inputMethodLocator.getDescriptor().getInputMethodDisplayName(null, Locale.getDefault()),
              throwable.getLocalizedMessage()};
         MessageFormat mf = new MessageFormat(errorTextFormat);
-        Logger logger = Logger.getLogger("sun.awt.im");
+        PlatformLogger logger = PlatformLogger.getLogger("sun.awt.im");
         logger.config(mf.format(args));
     }
 
--- a/jdk/src/share/classes/sun/awt/shell/ShellFolderManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/awt/shell/ShellFolderManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -57,8 +57,9 @@
      *    folders, such as Desktop, Documents, History, Network, Home, etc.
      *    This is used in the shortcut panel of the filechooser on Windows 2000
      *    and Windows Me.
-     *  "fileChooserIcon nn":
-     *    Returns an <code>Image</code> - icon nn from resource 124 in comctl32.dll (Windows only).
+     *  "fileChooserIcon <icon>":
+     *    Returns an <code>Image</code> - icon can be ListView, DetailsView, UpFolder, NewFolder or
+     *    ViewMenu (Windows only).
      *
      * @return An Object matching the key string.
      */
--- a/jdk/src/share/classes/sun/font/CMap.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/CMap.java	Wed Jul 05 17:01:52 2017 +0200
@@ -232,7 +232,7 @@
                  * fonts are using gb2312 encoding, have to use this
                  * workaround to make Solaris zh_CN locale work.  -sherman
                  */
-                if (FontManager.isSolaris && font.platName != null &&
+                if (FontUtilities.isSolaris && font.platName != null &&
                     (font.platName.startsWith(
                      "/usr/openwin/lib/locale/zh_CN.EUC/X11/fonts/TrueType") ||
                      font.platName.startsWith(
@@ -407,8 +407,8 @@
             subtableLength = buffer.getInt(offset+4) & INTMASK;
         }
         if (offset+subtableLength > buffer.capacity()) {
-            if (FontManager.logging) {
-                FontManager.logger.warning("Cmap subtable overflows buffer.");
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().warning("Cmap subtable overflows buffer.");
             }
         }
         switch (subtableFormat) {
--- a/jdk/src/share/classes/sun/font/CompositeFont.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/CompositeFont.java	Wed Jul 05 17:01:52 2017 +0200
@@ -60,7 +60,7 @@
     public CompositeFont(String name, String[] compFileNames,
                          String[] compNames, int metricsSlotCnt,
                          int[] exclRanges, int[] maxIndexes,
-                         boolean defer) {
+                         boolean defer, SunFontManager fm) {
 
         handle = new Font2DHandle(this);
         fullName = name;
@@ -85,13 +85,13 @@
          * The caller could be responsible for this, but for now it seems
          * better that it is handled internally to the CompositeFont class.
          */
-        if (FontManager.eudcFont != null) {
+        if (fm.getEUDCFont() != null) {
             numSlots++;
             if (componentNames != null) {
                 componentNames = new String[numSlots];
                 System.arraycopy(compNames, 0, componentNames, 0, numSlots-1);
                 componentNames[numSlots-1] =
-                    FontManager.eudcFont.getFontName(null);
+                    fm.getEUDCFont().getFontName(null);
             }
             if (componentFileNames != null) {
                 componentFileNames = new String[numSlots];
@@ -99,7 +99,7 @@
                                   componentFileNames, 0, numSlots-1);
             }
             components = new PhysicalFont[numSlots];
-            components[numSlots-1] = FontManager.eudcFont;
+            components[numSlots-1] = fm.getEUDCFont();
             deferredInitialisation = new boolean[numSlots];
             if (defer) {
                 for (int i=0; i<numSlots-1; i++) {
@@ -165,7 +165,7 @@
          * it is harmless that we do not know a slot is already initialised
          * and just need to discover that and mark it so.
          */
-        synchronized (FontManager.class) {
+        synchronized (FontManagerFactory.getInstance()) {
             components = new PhysicalFont[numSlots];
             components[0] = physFont;
             System.arraycopy(compFont.components, 0,
@@ -235,7 +235,8 @@
          * This global lock is rarely likely to be an issue as there
          * are only going to be a few calls into this code.
          */
-        synchronized (FontManager.class) {
+        SunFontManager fm = SunFontManager.getInstance();
+        synchronized (fm) {
             if (componentNames == null) {
                 componentNames = new String[numSlots];
             }
@@ -251,22 +252,21 @@
                  */
                 if (componentFileNames != null &&
                     componentFileNames[slot] != null) {
-                    components[slot] = FontManager.initialiseDeferredFont
-                        (componentFileNames[slot]);
+                    components[slot] =
+                        fm.initialiseDeferredFont(componentFileNames[slot]);
                 }
 
                 if (components[slot] == null) {
-                    components[slot] = FontManager.getDefaultPhysicalFont();
+                    components[slot] = fm.getDefaultPhysicalFont();
                 }
                 String name = components[slot].getFontName(null);
                 if (componentNames[slot] == null) {
                     componentNames[slot] = name;
                 } else if (!componentNames[slot].equalsIgnoreCase(name)) {
                     components[slot] =
-                        (PhysicalFont)
-                        FontManager.findFont2D(componentNames[slot],
-                                               style,
-                                               FontManager.PHYSICAL_FALLBACK);
+                        (PhysicalFont) fm.findFont2D(componentNames[slot],
+                                                     style,
+                                                FontManager.PHYSICAL_FALLBACK);
                 }
             }
             deferredInitialisation[slot] = false;
@@ -333,21 +333,22 @@
         if (deferredInitialisation[slot]) {
             doDeferredInitialisation(slot);
         }
+        SunFontManager fm = SunFontManager.getInstance();
         try {
             PhysicalFont font = components[slot];
             if (font == null) {
                 try {
-                    font = (PhysicalFont)FontManager.
+                    font = (PhysicalFont) fm.
                         findFont2D(componentNames[slot], style,
                                    FontManager.PHYSICAL_FALLBACK);
                     components[slot] = font;
                 } catch (ClassCastException cce) {
-                    font = FontManager.getDefaultPhysicalFont();
+                    font = fm.getDefaultPhysicalFont();
                 }
             }
             return font;
         } catch (Exception e) {
-            return FontManager.getDefaultPhysicalFont();
+            return fm.getDefaultPhysicalFont();
         }
     }
 
--- a/jdk/src/share/classes/sun/font/CompositeGlyphMapper.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/CompositeGlyphMapper.java	Wed Jul 05 17:01:52 2017 +0200
@@ -211,10 +211,10 @@
                 glyphs[i] = convertToGlyph(code);
             }
 
-            if (code < FontManager.MIN_LAYOUT_CHARCODE) {
+            if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
                 continue;
             }
-            else if (FontManager.isComplexCharCode(code)) {
+            else if (FontUtilities.isComplexCharCode(code)) {
                 return true;
             }
             else if (code >= 0x10000) {
--- a/jdk/src/share/classes/sun/font/FileFont.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FileFont.java	Wed Jul 05 17:01:52 2017 +0200
@@ -158,7 +158,8 @@
      * rare maybe it is not worth doing this last part.
      */
     synchronized void deregisterFontAndClearStrikeCache() {
-        FontManager.deRegisterBadFont(this);
+        SunFontManager fm = SunFontManager.getInstance();
+        fm.deRegisterBadFont(this);
 
         for (Reference strikeRef : strikeCache.values()) {
             if (strikeRef != null) {
@@ -172,14 +173,14 @@
             }
         }
         scaler.dispose();
-        scaler = FontManager.getNullScaler();
+        scaler = FontScaler.getNullScaler();
     }
 
     StrikeMetrics getFontMetrics(long pScalerContext) {
         try {
             return getScaler().getFontMetrics(pScalerContext);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getFontMetrics(pScalerContext);
         }
     }
@@ -188,7 +189,7 @@
         try {
             return getScaler().getGlyphAdvance(pScalerContext, glyphCode);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getGlyphAdvance(pScalerContext, glyphCode);
         }
     }
@@ -197,7 +198,7 @@
         try {
             getScaler().getGlyphMetrics(pScalerContext, glyphCode, metrics);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             getGlyphMetrics(pScalerContext, glyphCode, metrics);
         }
     }
@@ -206,7 +207,7 @@
         try {
             return getScaler().getGlyphImage(pScalerContext, glyphCode);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getGlyphImage(pScalerContext, glyphCode);
         }
     }
@@ -215,7 +216,7 @@
         try {
             return getScaler().getGlyphOutlineBounds(pScalerContext, glyphCode);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getGlyphOutlineBounds(pScalerContext, glyphCode);
         }
     }
@@ -224,7 +225,7 @@
         try {
             return getScaler().getGlyphOutline(pScalerContext, glyphCode, x, y);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getGlyphOutline(pScalerContext, glyphCode, x, y);
         }
     }
@@ -233,7 +234,7 @@
         try {
             return getScaler().getGlyphVectorOutline(pScalerContext, glyphs, numGlyphs, x, y);
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getGlyphVectorOutline(pScalerContext, glyphs, numGlyphs, x, y);
         }
     }
@@ -275,7 +276,8 @@
                                    */
                                   fontFile.delete();
                                   /* remove from delete on exit hook list : */
-                                  FontManager.tmpFontFiles.remove(fontFile);
+                                  // FIXME: still need to be refactored
+                                  SunFontManager.getInstance().tmpFontFiles.remove(fontFile);
                               } catch (Exception e) {
                               }
                           }
--- a/jdk/src/share/classes/sun/font/FileFontStrike.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FileFontStrike.java	Wed Jul 05 17:01:52 2017 +0200
@@ -114,7 +114,7 @@
     private static native boolean initNative();
     private static boolean isXPorLater = false;
     static {
-        if (FontManager.isWindows && !FontManager.useT2K &&
+        if (FontUtilities.isWindows && !FontUtilities.useT2K &&
             !GraphicsEnvironment.isHeadless()) {
             isXPorLater = initNative();
         }
@@ -201,7 +201,7 @@
             this.disposer = new FontStrikeDisposer(fileFont, desc);
             initGlyphCache();
             pScalerContext = NullFontScaler.getNullScalerContext();
-            FontManager.deRegisterBadFont(fileFont);
+            SunFontManager.getInstance().deRegisterBadFont(fileFont);
             return;
         }
         /* First, see if native code should be used to create the glyph.
@@ -211,8 +211,8 @@
          * except that the advance returned by GDI is always overwritten by
          * the JDK rasteriser supplied one (see getGlyphImageFromWindows()).
          */
-        if (FontManager.isWindows && isXPorLater &&
-            !FontManager.useT2K &&
+        if (FontUtilities.isWindows && isXPorLater &&
+            !FontUtilities.useT2K &&
             !GraphicsEnvironment.isHeadless() &&
             !fileFont.useJavaRasterizer &&
             (desc.aaHint == INTVAL_TEXT_ANTIALIAS_LCD_HRGB ||
@@ -241,8 +241,8 @@
                 }
             }
         }
-        if (FontManager.logging && FontManager.isWindows) {
-            FontManager.logger.info
+        if (FontUtilities.isLogging() && FontUtilities.isWindows) {
+            FontUtilities.getLogger().info
                 ("Strike for " + fileFont + " at size = " + intPtSize +
                  " use natives = " + useNatives +
                  " useJavaRasteriser = " + fileFont.useJavaRasterizer +
@@ -298,7 +298,7 @@
     }
 
     long getGlyphImageFromNative(int glyphCode) {
-        if (FontManager.isWindows) {
+        if (FontUtilities.isWindows) {
             return getGlyphImageFromWindows(glyphCode);
         } else {
             return getGlyphImageFromX11(glyphCode);
@@ -366,8 +366,8 @@
         } else {
             if (useNatives) {
                 glyphPtr = getGlyphImageFromNative(glyphCode);
-                if (glyphPtr == 0L && FontManager.logging) {
-                    FontManager.logger.info
+                if (glyphPtr == 0L && FontUtilities.isLogging()) {
+                    FontUtilities.getLogger().info
                         ("Strike for " + fileFont +
                          " at size = " + intPtSize +
                          " couldn't get native glyph for code = " + glyphCode);
@@ -528,7 +528,7 @@
 
         if (segmentedCache) {
             int numSegments = (numGlyphs + SEGSIZE-1)/SEGSIZE;
-            if (FontManager.longAddresses) {
+            if (longAddresses) {
                 glyphCacheFormat = SEGLONGARRAY;
                 segLongGlyphImages = new long[numSegments][];
                 this.disposer.segLongGlyphImages = segLongGlyphImages;
@@ -538,7 +538,7 @@
                  this.disposer.segIntGlyphImages = segIntGlyphImages;
              }
         } else {
-            if (FontManager.longAddresses) {
+            if (longAddresses) {
                 glyphCacheFormat = LONGARRAY;
                 longGlyphImages = new long[numGlyphs];
                 this.disposer.longGlyphImages = longGlyphImages;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/font/FontAccess.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+
+public abstract class FontAccess {
+
+    private static FontAccess access;
+    public static synchronized void setFontAccess(FontAccess acc) {
+        if (access != null) {
+            throw new InternalError("Attempt to set FontAccessor twice");
+        }
+        access = acc;
+    }
+
+    public static synchronized FontAccess getFontAccess() {
+        return access;
+    }
+
+    public abstract Font2D getFont2D(Font f);
+    public abstract void setFont2D(Font f, Font2DHandle h);
+    public abstract void setCreatedFont(Font f);
+    public abstract boolean isCreatedFont(Font f);
+}
--- a/jdk/src/share/classes/sun/font/FontDesignMetrics.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FontDesignMetrics.java	Wed Jul 05 17:01:52 2017 +0200
@@ -261,8 +261,9 @@
          * Note that currently Swing native L&F composites are not handled
          * by this code as they use the metrics of the physical anyway.
          */
-        if (FontManager.maybeUsingAlternateCompositeFonts() &&
-            FontManager.getFont2D(font) instanceof CompositeFont) {
+        SunFontManager fm = SunFontManager.getInstance();
+        if (fm.maybeUsingAlternateCompositeFonts() &&
+            FontUtilities.getFont2D(font) instanceof CompositeFont) {
             return new FontDesignMetrics(font, frc);
         }
 
@@ -353,7 +354,7 @@
 
     private void initMatrixAndMetrics() {
 
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
         fontStrike = font2D.getStrike(font, frc);
         StrikeMetrics metrics = fontStrike.getFontMetrics();
         this.ascent = metrics.getAscent();
@@ -473,7 +474,7 @@
                 char ch = str.charAt(i);
                 if (ch < 0x100) {
                     width += getLatinCharWidth(ch);
-                } else if (FontManager.isNonSimpleChar(ch)) {
+                } else if (FontUtilities.isNonSimpleChar(ch)) {
                     width = new TextLayout(str, font, frc).getAdvance();
                     break;
                 } else {
@@ -504,7 +505,7 @@
                 char ch = data[i];
                 if (ch < 0x100) {
                     width += getLatinCharWidth(ch);
-                } else if (FontManager.isNonSimpleChar(ch)) {
+                } else if (FontUtilities.isNonSimpleChar(ch)) {
                     String str = new String(data, off, len);
                     width = new TextLayout(str, font, frc).getAdvance();
                     break;
--- a/jdk/src/share/classes/sun/font/FontFamily.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FontFamily.java	Wed Jul 05 17:01:52 2017 +0200
@@ -107,8 +107,9 @@
 
     public void setFont(Font2D font, int style) {
         if (font.getRank() > familyRank) {
-            if (FontManager.logging) {
-                FontManager.logger.warning("Rejecting adding " + font +
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger()
+                                  .warning("Rejecting adding " + font +
                                            " of lower rank " + font.getRank() +
                                            " to family " + this +
                                            " of rank " + familyRank);
--- a/jdk/src/share/classes/sun/font/FontManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FontManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -22,3831 +22,124 @@
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
-
 package sun.font;
 
 import java.awt.Font;
-import java.awt.GraphicsEnvironment;
 import java.awt.FontFormatException;
 import java.io.File;
-import java.io.FilenameFilter;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.Locale;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.StringTokenizer;
 import java.util.TreeMap;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
 import javax.swing.plaf.FontUIResource;
 
-import sun.awt.AppContext;
-import sun.awt.FontConfiguration;
-import sun.awt.SunHints;
-import sun.awt.SunToolkit;
-import sun.java2d.HeadlessGraphicsEnvironment;
-import sun.java2d.SunGraphicsEnvironment;
-
-import java.awt.geom.GeneralPath;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-
-import java.lang.reflect.Constructor;
-
-import sun.java2d.Disposer;
-
-/*
+/**
  * Interface between Java Fonts (java.awt.Font) and the underlying
  * font files/native font resources and the Java and native font scalers.
  */
-public final class FontManager {
-
-    public static final int FONTFORMAT_NONE      = -1;
-    public static final int FONTFORMAT_TRUETYPE  = 0;
-    public static final int FONTFORMAT_TYPE1     = 1;
-    public static final int FONTFORMAT_T2K       = 2;
-    public static final int FONTFORMAT_TTC       = 3;
-    public static final int FONTFORMAT_COMPOSITE = 4;
-    public static final int FONTFORMAT_NATIVE    = 5;
-
-    public static final int NO_FALLBACK         = 0;
-    public static final int PHYSICAL_FALLBACK   = 1;
-    public static final int LOGICAL_FALLBACK    = 2;
-
-    public static final int QUADPATHTYPE = 1;
-    public static final int CUBICPATHTYPE = 2;
-
-    /* Pool of 20 font file channels chosen because some UTF-8 locale
-     * composite fonts can use up to 16 platform fonts (including the
-     * Lucida fall back). This should prevent channel thrashing when
-     * dealing with one of these fonts.
-     * The pool array stores the fonts, rather than directly referencing
-     * the channels, as the font needs to do the open/close work.
-     */
-    private static final int CHANNELPOOLSIZE = 20;
-    private static int lastPoolIndex = 0;
-    private static FileFont fontFileCache[] = new FileFont[CHANNELPOOLSIZE];
-
-    /* Need to implement a simple linked list scheme for fast
-     * traversal and lookup.
-     * Also want to "fast path" dialog so there's minimal overhead.
-     */
-    /* There are at exactly 20 composite fonts: 5 faces (but some are not
-     * usually different), in 4 styles. The array may be auto-expanded
-     * later if more are needed, eg for user-defined composites or locale
-     * variants.
-     */
-    private static int maxCompFont = 0;
-    private static CompositeFont [] compFonts = new CompositeFont[20];
-    private static ConcurrentHashMap<String, CompositeFont>
-        compositeFonts = new ConcurrentHashMap<String, CompositeFont>();
-    private static ConcurrentHashMap<String, PhysicalFont>
-        physicalFonts = new ConcurrentHashMap<String, PhysicalFont>();
-    private static ConcurrentHashMap<String, PhysicalFont>
-        registeredFontFiles = new ConcurrentHashMap<String, PhysicalFont>();
-
-    /* given a full name find the Font. Remind: there's duplication
-     * here in that this contains the content of compositeFonts +
-     * physicalFonts.
-     */
-    private static ConcurrentHashMap<String, Font2D>
-        fullNameToFont = new ConcurrentHashMap<String, Font2D>();
-
-    /* TrueType fonts have localised names. Support searching all
-     * of these before giving up on a name.
-     */
-    private static HashMap<String, TrueTypeFont> localeFullNamesToFont;
-
-    private static PhysicalFont defaultPhysicalFont;
-
-    /* deprecated, unsupported hack - actually invokes a bug! */
-    private static boolean usePlatformFontMetrics = false;
-
-    public static Logger logger = null;
-    public static boolean logging;
-    static boolean longAddresses;
-    static String osName;
-    static boolean useT2K;
-    static boolean isWindows;
-    static boolean isSolaris;
-    public static boolean isSolaris8; // needed to check for JA wavedash fix.
-    public static boolean isSolaris9; // needed to check for songti font usage.
-    private static boolean loaded1dot0Fonts = false;
-    static SunGraphicsEnvironment sgEnv;
-    static boolean loadedAllFonts = false;
-    static boolean loadedAllFontFiles = false;
-    static TrueTypeFont eudcFont;
-    static HashMap<String,String> jreFontMap;
-    static HashSet<String> jreLucidaFontFiles;
-    static String[] jreOtherFontFiles;
-    static boolean noOtherJREFontFiles = false; // initial assumption.
-    static boolean fontConfigFailed = false;
-
-    /* Used to indicate required return type from toArray(..); */
-    private static String[] STR_ARRAY = new String[0];
-
-    private static void initJREFontMap() {
-
-        /* Key is familyname+style value as an int.
-         * Value is filename containing the font.
-         * If no mapping exists, it means there is no font file for the style
-         * If the mapping exists but the file doesn't exist in the deferred
-         * list then it means its not installed.
-         * This looks like a lot of code and strings but if it saves even
-         * a single file being opened at JRE start-up there's a big payoff.
-         * Lucida Sans is probably the only important case as the others
-         * are rarely used. Consider removing the other mappings if there's
-         * no evidence they are useful in practice.
-         */
-        jreFontMap = new HashMap<String,String>();
-        jreLucidaFontFiles = new HashSet<String>();
-        if (SunGraphicsEnvironment.isOpenJDK()) {
-            return;
-        }
-        /* Lucida Sans Family */
-        jreFontMap.put("lucida sans0",   "LucidaSansRegular.ttf");
-        jreFontMap.put("lucida sans1",   "LucidaSansDemiBold.ttf");
-        /* Lucida Sans full names (map Bold and DemiBold to same file) */
-        jreFontMap.put("lucida sans regular0", "LucidaSansRegular.ttf");
-        jreFontMap.put("lucida sans regular1", "LucidaSansDemiBold.ttf");
-        jreFontMap.put("lucida sans bold1", "LucidaSansDemiBold.ttf");
-        jreFontMap.put("lucida sans demibold1", "LucidaSansDemiBold.ttf");
-
-        /* Lucida Sans Typewriter Family */
-        jreFontMap.put("lucida sans typewriter0",
-                       "LucidaTypewriterRegular.ttf");
-        jreFontMap.put("lucida sans typewriter1", "LucidaTypewriterBold.ttf");
-        /* Typewriter full names (map Bold and DemiBold to same file) */
-        jreFontMap.put("lucida sans typewriter regular0",
-                       "LucidaTypewriter.ttf");
-        jreFontMap.put("lucida sans typewriter regular1",
-                       "LucidaTypewriterBold.ttf");
-        jreFontMap.put("lucida sans typewriter bold1",
-                       "LucidaTypewriterBold.ttf");
-        jreFontMap.put("lucida sans typewriter demibold1",
-                       "LucidaTypewriterBold.ttf");
-
-        /* Lucida Bright Family */
-        jreFontMap.put("lucida bright0", "LucidaBrightRegular.ttf");
-        jreFontMap.put("lucida bright1", "LucidaBrightDemiBold.ttf");
-        jreFontMap.put("lucida bright2", "LucidaBrightItalic.ttf");
-        jreFontMap.put("lucida bright3", "LucidaBrightDemiItalic.ttf");
-        /* Lucida Bright full names (map Bold and DemiBold to same file) */
-        jreFontMap.put("lucida bright regular0", "LucidaBrightRegular.ttf");
-        jreFontMap.put("lucida bright regular1", "LucidaBrightDemiBold.ttf");
-        jreFontMap.put("lucida bright regular2", "LucidaBrightItalic.ttf");
-        jreFontMap.put("lucida bright regular3", "LucidaBrightDemiItalic.ttf");
-        jreFontMap.put("lucida bright bold1", "LucidaBrightDemiBold.ttf");
-        jreFontMap.put("lucida bright bold3", "LucidaBrightDemiItalic.ttf");
-        jreFontMap.put("lucida bright demibold1", "LucidaBrightDemiBold.ttf");
-        jreFontMap.put("lucida bright demibold3","LucidaBrightDemiItalic.ttf");
-        jreFontMap.put("lucida bright italic2", "LucidaBrightItalic.ttf");
-        jreFontMap.put("lucida bright italic3", "LucidaBrightDemiItalic.ttf");
-        jreFontMap.put("lucida bright bold italic3",
-                       "LucidaBrightDemiItalic.ttf");
-        jreFontMap.put("lucida bright demibold italic3",
-                       "LucidaBrightDemiItalic.ttf");
-        for (String ffile : jreFontMap.values()) {
-            jreLucidaFontFiles.add(ffile);
-        }
-    }
-
-    static {
-
-        if (SunGraphicsEnvironment.debugFonts) {
-            logger = Logger.getLogger("sun.java2d", null);
-            logging = logger.getLevel() != Level.OFF;
-        }
-        initJREFontMap();
+public interface FontManager {
 
-        java.security.AccessController.doPrivileged(
-                                    new java.security.PrivilegedAction() {
-           public Object run() {
-               FontManagerNativeLibrary.load();
-
-               // JNI throws an exception if a class/method/field is not found,
-               // so there's no need to do anything explicit here.
-               initIDs();
-
-               switch (StrikeCache.nativeAddressSize) {
-               case 8: longAddresses = true; break;
-               case 4: longAddresses = false; break;
-               default: throw new RuntimeException("Unexpected address size");
-               }
-
-               osName = System.getProperty("os.name", "unknownOS");
-               isSolaris = osName.startsWith("SunOS");
-
-               String t2kStr = System.getProperty("sun.java2d.font.scaler");
-               if (t2kStr != null) {
-                   useT2K = "t2k".equals(t2kStr);
-               }
-               if (isSolaris) {
-                   String version = System.getProperty("os.version", "unk");
-                   isSolaris8 = version.equals("5.8");
-                   isSolaris9 = version.equals("5.9");
-               } else {
-                   isWindows = osName.startsWith("Windows");
-                   if (isWindows) {
-                       String eudcFile =
-                           SunGraphicsEnvironment.eudcFontFileName;
-                       if (eudcFile != null) {
-                           try {
-                               eudcFont = new TrueTypeFont(eudcFile, null, 0,
-                                                           true);
-                           } catch (FontFormatException e) {
-                           }
-                       }
-                       String prop =
-                           System.getProperty("java2d.font.usePlatformFont");
-                       if (("true".equals(prop) || getPlatformFontVar())) {
-                           usePlatformFontMetrics = true;
-                           System.out.println("Enabling platform font metrics for win32. This is an unsupported option.");
-                           System.out.println("This yields incorrect composite font metrics as reported by 1.1.x releases.");
-                           System.out.println("It is appropriate only for use by applications which do not use any Java 2");
-                           System.out.println("functionality. This property will be removed in a later release.");
-                       }
-                   }
-               }
-               return null;
-           }
-        });
-    }
-
-    /* Initialise ptrs used by JNI methods */
-    private static native void initIDs();
-
-    public static void addToPool(FileFont font) {
-
-        FileFont fontFileToClose = null;
-        int freeSlot = -1;
-
-        synchronized (fontFileCache) {
-            /* Avoid duplicate entries in the pool, and don't close() it,
-             * since this method is called only from within open().
-             * Seeing a duplicate is most likely to happen if the thread
-             * was interrupted during a read, forcing perhaps repeated
-             * close and open calls and it eventually it ends up pointing
-             * at the same slot.
-             */
-            for (int i=0;i<CHANNELPOOLSIZE;i++) {
-                if (fontFileCache[i] == font) {
-                    return;
-                }
-                if (fontFileCache[i] == null && freeSlot < 0) {
-                    freeSlot = i;
-                }
-            }
-            if (freeSlot >= 0) {
-                fontFileCache[freeSlot] = font;
-                return;
-            } else {
-                /* replace with new font. */
-                fontFileToClose = fontFileCache[lastPoolIndex];
-                fontFileCache[lastPoolIndex] = font;
-                /* lastPoolIndex is updated so that the least recently opened
-                 * file will be closed next.
-                 */
-                lastPoolIndex = (lastPoolIndex+1) % CHANNELPOOLSIZE;
-            }
-        }
-        /* Need to close the font file outside of the synchronized block,
-         * since its possible some other thread is in an open() call on
-         * this font file, and could be holding its lock and the pool lock.
-         * Releasing the pool lock allows that thread to continue, so it can
-         * then release the lock on this font, allowing the close() call
-         * below to proceed.
-         * Also, calling close() is safe because any other thread using
-         * the font we are closing() synchronizes all reading, so we
-         * will not close the file while its in use.
-         */
-        if (fontFileToClose != null) {
-            fontFileToClose.close();
-        }
-    }
-
-    /*
-     * In the normal course of events, the pool of fonts can remain open
-     * ready for quick access to their contents. The pool is sized so
-     * that it is not an excessive consumer of system resources whilst
-     * facilitating performance by providing ready access to the most
-     * recently used set of font files.
-     * The only reason to call removeFromPool(..) is for a Font that
-     * you want to to have GC'd. Currently this would apply only to fonts
-     * created with java.awt.Font.createFont(..).
-     * In this case, the caller is expected to have arranged for the file
-     * to be closed.
-     * REMIND: consider how to know when a createFont created font should
-     * be closed.
-     */
-    public static void removeFromPool(FileFont font) {
-        synchronized (fontFileCache) {
-            for (int i=0; i<CHANNELPOOLSIZE; i++) {
-                if (fontFileCache[i] == font) {
-                    fontFileCache[i] = null;
-                }
-            }
-        }
-    }
-
-    /**
-     * This method is provided for internal and exclusive use by Swing.
-     *
-     * @param font representing a physical font.
-     * @return true if the underlying font is a TrueType or OpenType font
-     * that claims to support the Microsoft Windows encoding corresponding to
-     * the default file.encoding property of this JRE instance.
-     * This narrow value is useful for Swing to decide if the font is useful
-     * for the the Windows Look and Feel, or, if a  composite font should be
-     * used instead.
-     * The information used to make the decision is obtained from
-     * the ulCodePageRange fields in the font.
-     * A caller can use isLogicalFont(Font) in this class before calling
-     * this method and would not need to call this method if that
-     * returns true.
-     */
-//     static boolean fontSupportsDefaultEncoding(Font font) {
-//      String encoding =
-//          (String) java.security.AccessController.doPrivileged(
-//                new sun.security.action.GetPropertyAction("file.encoding"));
-
-//      if (encoding == null || font == null) {
-//          return false;
-//      }
-
-//      encoding = encoding.toLowerCase(Locale.ENGLISH);
-
-//      return FontManager.fontSupportsEncoding(font, encoding);
-//     }
-
-    /* Revise the implementation to in fact mean "font is a composite font.
-     * This ensures that Swing components will always benefit from the
-     * fall back fonts
-     */
-    public static boolean fontSupportsDefaultEncoding(Font font) {
-        return getFont2D(font) instanceof CompositeFont;
-    }
+    // These constants are used in findFont().
+    public static final int NO_FALLBACK = 0;
+    public static final int PHYSICAL_FALLBACK = 1;
+    public static final int LOGICAL_FALLBACK = 2;
 
     /**
-     * This method is provided for internal and exclusive use by Swing.
-     *
-     * It may be used in conjunction with fontSupportsDefaultEncoding(Font)
-     * In the event that a desktop properties font doesn't directly
-     * support the default encoding, (ie because the host OS supports
-     * adding support for the current locale automatically for native apps),
-     * then Swing calls this method to get a font which  uses the specified
-     * font for the code points it covers, but also supports this locale
-     * just as the standard composite fonts do.
-     * Note: this will over-ride any setting where an application
-     * specifies it prefers locale specific composite fonts.
-     * The logic for this, is that this method is used only where the user or
-     * application has specified that the native L&F be used, and that
-     * we should honour that request to use the same font as native apps use.
-     *
-     * The behaviour of this method is to construct a new composite
-     * Font object that uses the specified physical font as its first
-     * component, and adds all the components of "dialog" as fall back
-     * components.
-     * The method currently assumes that only the size and style attributes
-     * are set on the specified font. It doesn't copy the font transform or
-     * other attributes because they aren't set on a font created from
-     * the desktop. This will need to be fixed if use is broadened.
+     * Register a new font. Please, note that {@code null} is not a valid
+     * argument, and it's caller's responsibility to ensure that, but to keep
+     * compatibility, if {@code null} is passed as an argument, {@code false}
+     * is returned, and no {@link NullPointerException}
+     * is thrown.
      *
-     * Operations such as Font.deriveFont will work properly on the
-     * font returned by this method for deriving a different point size.
-     * Additionally it tries to support a different style by calling
-     * getNewComposite() below. That also supports replacing slot zero
-     * with a different physical font but that is expected to be "rare".
-     * Deriving with a different style is needed because its been shown
-     * that some applications try to do this for Swing FontUIResources.
-     * Also operations such as new Font(font.getFontName(..), Font.PLAIN, 14);
-     * will NOT yield the same result, as the new underlying CompositeFont
-     * cannot be "looked up" in the font registry.
-     * This returns a FontUIResource as that is the Font sub-class needed
-     * by Swing.
-     * Suggested usage is something like :
-     * FontUIResource fuir;
-     * Font desktopFont = getDesktopFont(..);
-     * // NOTE even if fontSupportsDefaultEncoding returns true because
-     * // you get Tahoma and are running in an English locale, you may
-     * // still want to just call getCompositeFontUIResource() anyway
-     * // as only then will you get fallback fonts - eg for CJK.
-     * if (FontManager.fontSupportsDefaultEncoding(desktopFont)) {
-     *   fuir = new FontUIResource(..);
-     * } else {
-     *   fuir = FontManager.getCompositeFontUIResource(desktopFont);
-     * }
-     * return fuir;
-     */
-    public static FontUIResource getCompositeFontUIResource(Font font) {
-
-        FontUIResource fuir =
-            new FontUIResource(font.getName(),font.getStyle(),font.getSize());
-        Font2D font2D = getFont2D(font);
-
-        if (!(font2D instanceof PhysicalFont)) {
-            /* Swing should only be calling this when a font is obtained
-             * from desktop properties, so should generally be a physical font,
-             * an exception might be for names like "MS Serif" which are
-             * automatically mapped to "Serif", so there's no need to do
-             * anything special in that case. But note that suggested usage
-             * is first to call fontSupportsDefaultEncoding(Font) and this
-             * method should not be called if that were to return true.
-             */
-             return fuir;
-        }
-
-        CompositeFont dialog2D =
-          (CompositeFont)findFont2D("dialog", font.getStyle(), NO_FALLBACK);
-        if (dialog2D == null) { /* shouldn't happen */
-            return fuir;
-        }
-        PhysicalFont physicalFont = (PhysicalFont)font2D;
-        CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
-        setFont2D(fuir, compFont.handle);
-        /* marking this as a created font is needed as only created fonts
-         * copy their creator's handles.
-         */
-        setCreatedFont(fuir);
-        return fuir;
-    }
-
-    public static Font2DHandle getNewComposite(String family, int style,
-                                               Font2DHandle handle) {
-
-        if (!(handle.font2D instanceof CompositeFont)) {
-            return handle;
-        }
-
-        CompositeFont oldComp = (CompositeFont)handle.font2D;
-        PhysicalFont oldFont = oldComp.getSlotFont(0);
-
-        if (family == null) {
-            family = oldFont.getFamilyName(null);
-        }
-        if (style == -1) {
-            style = oldComp.getStyle();
-        }
-
-        Font2D newFont = findFont2D(family, style, NO_FALLBACK);
-        if (!(newFont instanceof PhysicalFont)) {
-            newFont = oldFont;
-        }
-        PhysicalFont physicalFont = (PhysicalFont)newFont;
-        CompositeFont dialog2D =
-            (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
-        if (dialog2D == null) { /* shouldn't happen */
-            return handle;
-        }
-        CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
-        Font2DHandle newHandle = new Font2DHandle(compFont);
-        return newHandle;
-    }
-
-    public static native void setFont2D(Font font, Font2DHandle font2DHandle);
-
-    private static native boolean isCreatedFont(Font font);
-    private static native void setCreatedFont(Font font);
-
-    public static void registerCompositeFont(String compositeName,
-                                             String[] componentFileNames,
-                                             String[] componentNames,
-                                             int numMetricsSlots,
-                                             int[] exclusionRanges,
-                                             int[] exclusionMaxIndex,
-                                             boolean defer) {
-
-        CompositeFont cf = new CompositeFont(compositeName,
-                                             componentFileNames,
-                                             componentNames,
-                                             numMetricsSlots,
-                                             exclusionRanges,
-                                             exclusionMaxIndex, defer);
-        addCompositeToFontList(cf, Font2D.FONT_CONFIG_RANK);
-        synchronized (compFonts) {
-            compFonts[maxCompFont++] = cf;
-        }
-    }
-
-    /* This variant is used only when the application specifies
-     * a variant of composite fonts which prefers locale specific or
-     * proportional fonts.
-     */
-    public static void registerCompositeFont(String compositeName,
-                                             String[] componentFileNames,
-                                             String[] componentNames,
-                                             int numMetricsSlots,
-                                             int[] exclusionRanges,
-                                             int[] exclusionMaxIndex,
-                                             boolean defer,
-                                             ConcurrentHashMap<String, Font2D>
-                                             altNameCache) {
-
-        CompositeFont cf = new CompositeFont(compositeName,
-                                             componentFileNames,
-                                             componentNames,
-                                             numMetricsSlots,
-                                             exclusionRanges,
-                                             exclusionMaxIndex, defer);
-        /* if the cache has an existing composite for this case, make
-         * its handle point to this new font.
-         * This ensures that when the altNameCache that is passed in
-         * is the global mapNameCache - ie we are running as an application -
-         * that any statically created java.awt.Font instances which already
-         * have a Font2D instance will have that re-directed to the new Font
-         * on subsequent uses. This is particularly important for "the"
-         * default font instance, or similar cases where a UI toolkit (eg
-         * Swing) has cached a java.awt.Font. Note that if Swing is using
-         * a custom composite APIs which update the standard composites have
-         * no effect - this is typically the case only when using the Windows
-         * L&F where these APIs would conflict with that L&F anyway.
-         */
-        Font2D oldFont = (Font2D)
-            altNameCache.get(compositeName.toLowerCase(Locale.ENGLISH));
-        if (oldFont instanceof CompositeFont) {
-            oldFont.handle.font2D = cf;
-        }
-        altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
-    }
-
-    private static void addCompositeToFontList(CompositeFont f, int rank) {
-
-        if (logging) {
-            logger.info("Add to Family "+ f.familyName +
-                        ", Font " + f.fullName + " rank="+rank);
-        }
-        f.setRank(rank);
-        compositeFonts.put(f.fullName, f);
-        fullNameToFont.put(f.fullName.toLowerCase(Locale.ENGLISH), f);
-
-        FontFamily family = FontFamily.getFamily(f.familyName);
-        if (family == null) {
-            family = new FontFamily(f.familyName, true, rank);
-        }
-        family.setFont(f, f.style);
-    }
-
-    /*
-     * Systems may have fonts with the same name.
-     * We want to register only one of such fonts (at least until
-     * such time as there might be APIs which can accommodate > 1).
-     * Rank is 1) font configuration fonts, 2) JRE fonts, 3) OT/TT fonts,
-     * 4) Type1 fonts, 5) native fonts.
+     * As additional note, an implementation should ensure that this font
+     * cannot override existing installed fonts.
      *
-     * If the new font has the same name as the old font, the higher
-     * ranked font gets added, replacing the lower ranked one.
-     * If the fonts are of equal rank, then make a special case of
-     * font configuration rank fonts, which are on closer inspection,
-     * OT/TT fonts such that the larger font is registered. This is
-     * a heuristic since a font may be "larger" in the sense of more
-     * code points, or be a larger "file" because it has more bitmaps.
-     * So it is possible that using filesize may lead to less glyphs, and
-     * using glyphs may lead to lower quality display. Probably number
-     * of glyphs is the ideal, but filesize is information we already
-     * have and is good enough for the known cases.
-     * Also don't want to register fonts that match JRE font families
-     * but are coming from a source other than the JRE.
-     * This will ensure that we will algorithmically style the JRE
-     * plain font and get the same set of glyphs for all styles.
-     *
-     * Note that this method returns a value
-     * if it returns the same object as its argument that means this
-     * font was newly registered.
-     * If it returns a different object it means this font already exists,
-     * and you should use that one.
-     * If it returns null means this font was not registered and none
-     * in that name is registered. The caller must find a substitute
+     * @param font
+     * @return {@code true} is the font is successfully registered,
+     * {@code false} otherwise.
      */
-    private static PhysicalFont addToFontList(PhysicalFont f, int rank) {
-
-        String fontName = f.fullName;
-        String familyName = f.familyName;
-        if (fontName == null || "".equals(fontName)) {
-            return null;
-        }
-        if (compositeFonts.containsKey(fontName)) {
-            /* Don't register any font that has the same name as a composite */
-            return null;
-        }
-        f.setRank(rank);
-        if (!physicalFonts.containsKey(fontName)) {
-            if (logging) {
-                logger.info("Add to Family "+familyName +
-                            ", Font " + fontName + " rank="+rank);
-            }
-            physicalFonts.put(fontName, f);
-            FontFamily family = FontFamily.getFamily(familyName);
-            if (family == null) {
-                family = new FontFamily(familyName, false, rank);
-                family.setFont(f, f.style);
-            } else if (family.getRank() >= rank) {
-                family.setFont(f, f.style);
-            }
-            fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH), f);
-            return f;
-        } else {
-            PhysicalFont newFont = f;
-            PhysicalFont oldFont = physicalFonts.get(fontName);
-            if (oldFont == null) {
-                return null;
-            }
-            /* If the new font is of an equal or higher rank, it is a
-             * candidate to replace the current one, subject to further tests.
-             */
-            if (oldFont.getRank() >= rank) {
-
-                /* All fonts initialise their mapper when first
-                 * used. If the mapper is non-null then this font
-                 * has been accessed at least once. In that case
-                 * do not replace it. This may be overly stringent,
-                 * but its probably better not to replace a font that
-                 * someone is already using without a compelling reason.
-                 * Additionally the primary case where it is known
-                 * this behaviour is important is in certain composite
-                 * fonts, and since all the components of a given
-                 * composite are usually initialised together this
-                 * is unlikely. For this to be a problem, there would
-                 * have to be a case where two different composites used
-                 * different versions of the same-named font, and they
-                 * were initialised and used at separate times.
-                 * In that case we continue on and allow the new font to
-                 * be installed, but replaceFont will continue to allow
-                 * the original font to be used in Composite fonts.
-                 */
-                if (oldFont.mapper != null && rank > Font2D.FONT_CONFIG_RANK) {
-                    return oldFont;
-                }
-
-                /* Normally we require a higher rank to replace a font,
-                 * but as a special case, if the two fonts are the same rank,
-                 * and are instances of TrueTypeFont we want the
-                 * more complete (larger) one.
-                 */
-                if (oldFont.getRank() == rank) {
-                    if (oldFont instanceof TrueTypeFont &&
-                        newFont instanceof TrueTypeFont) {
-                        TrueTypeFont oldTTFont = (TrueTypeFont)oldFont;
-                        TrueTypeFont newTTFont = (TrueTypeFont)newFont;
-                        if (oldTTFont.fileSize >= newTTFont.fileSize) {
-                            return oldFont;
-                        }
-                    } else {
-                        return oldFont;
-                    }
-                }
-                /* Don't replace ever JRE fonts.
-                 * This test is in case a font configuration references
-                 * a Lucida font, which has been mapped to a Lucida
-                 * from the host O/S. The assumption here is that any
-                 * such font configuration file is probably incorrect, or
-                 * the host O/S version is for the use of AWT.
-                 * In other words if we reach here, there's a possible
-                 * problem with our choice of font configuration fonts.
-                 */
-                if (oldFont.platName.startsWith(
-                           SunGraphicsEnvironment.jreFontDirName)) {
-                    if (logging) {
-                        logger.warning("Unexpected attempt to replace a JRE " +
-                                       " font " + fontName + " from " +
-                                        oldFont.platName +
-                                       " with " + newFont.platName);
-                    }
-                    return oldFont;
-                }
-
-                if (logging) {
-                    logger.info("Replace in Family " + familyName +
-                                ",Font " + fontName + " new rank="+rank +
-                                " from " + oldFont.platName +
-                                " with " + newFont.platName);
-                }
-                replaceFont(oldFont, newFont);
-                physicalFonts.put(fontName, newFont);
-                fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH),
-                                   newFont);
-
-                FontFamily family = FontFamily.getFamily(familyName);
-                if (family == null) {
-                    family = new FontFamily(familyName, false, rank);
-                    family.setFont(newFont, newFont.style);
-                } else if (family.getRank() >= rank) {
-                    family.setFont(newFont, newFont.style);
-                }
-                return newFont;
-            } else {
-                return oldFont;
-            }
-        }
-    }
-
-    public static Font2D[] getRegisteredFonts() {
-        PhysicalFont[] physFonts = getPhysicalFonts();
-        int mcf = maxCompFont; /* for MT-safety */
-        Font2D[] regFonts = new Font2D[physFonts.length+mcf];
-        System.arraycopy(compFonts, 0, regFonts, 0, mcf);
-        System.arraycopy(physFonts, 0, regFonts, mcf, physFonts.length);
-        return regFonts;
-    }
-
-    public static PhysicalFont[] getPhysicalFonts() {
-        return physicalFonts.values().toArray(new PhysicalFont[0]);
-    }
-
-
-    /* The class FontRegistrationInfo is used when a client says not
-     * to register a font immediately. This mechanism is used to defer
-     * initialisation of all the components of composite fonts at JRE
-     * start-up. The CompositeFont class is "aware" of this and when it
-     * is first used it asks for the registration of its components.
-     * Also in the event that any physical font is requested the
-     * deferred fonts are initialised before triggering a search of the
-     * system.
-     * Two maps are used. One to track the deferred fonts. The
-     * other to track the fonts that have been initialised through this
-     * mechanism.
-     */
-
-    private static final class FontRegistrationInfo {
-
-        String fontFilePath;
-        String[] nativeNames;
-        int fontFormat;
-        boolean javaRasterizer;
-        int fontRank;
-
-        FontRegistrationInfo(String fontPath, String[] names, int format,
-                             boolean useJavaRasterizer, int rank) {
-            this.fontFilePath = fontPath;
-            this.nativeNames = names;
-            this.fontFormat = format;
-            this.javaRasterizer = useJavaRasterizer;
-            this.fontRank = rank;
-        }
-    }
-
-    private static final ConcurrentHashMap<String, FontRegistrationInfo>
-        deferredFontFiles =
-        new ConcurrentHashMap<String, FontRegistrationInfo>();
-    private static final ConcurrentHashMap<String, Font2DHandle>
-        initialisedFonts = new ConcurrentHashMap<String, Font2DHandle>();
-
-    /* Remind: possibly enhance initialiseDeferredFonts() to be
-     * optionally given a name and a style and it could stop when it
-     * finds that font - but this would be a problem if two of the
-     * fonts reference the same font face name (cf the Solaris
-     * euro fonts).
-     */
-    public static synchronized void initialiseDeferredFonts() {
-        for (String fileName : deferredFontFiles.keySet()) {
-            initialiseDeferredFont(fileName);
-        }
-    }
-
-    public static synchronized void registerDeferredJREFonts(String jreDir) {
-        for (FontRegistrationInfo info : deferredFontFiles.values()) {
-            if (info.fontFilePath != null &&
-                info.fontFilePath.startsWith(jreDir)) {
-                initialiseDeferredFont(info.fontFilePath);
-            }
-        }
-    }
-
-    /* We keep a map of the files which contain the Lucida fonts so we
-     * don't need to search for them.
-     * But since we know what fonts these files contain, we can also avoid
-     * opening them to look for a font name we don't recognise - see
-     * findDeferredFont().
-     * For typical cases where the font isn't a JRE one the overhead is
-     * this method call, HashMap.get() and null reference test, then
-     * a boolean test of noOtherJREFontFiles.
-     */
-    private static PhysicalFont findJREDeferredFont(String name, int style) {
-
-        PhysicalFont physicalFont;
-        String nameAndStyle = name.toLowerCase(Locale.ENGLISH) + style;
-        String fileName = jreFontMap.get(nameAndStyle);
-        if (fileName != null) {
-            initSGEnv(); /* ensure jreFontDirName is initialised */
-            fileName = SunGraphicsEnvironment.jreFontDirName +
-                File.separator + fileName;
-            if (deferredFontFiles.get(fileName) != null) {
-                physicalFont = initialiseDeferredFont(fileName);
-                if (physicalFont != null &&
-                    (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
-                     physicalFont.getFamilyName(null).equalsIgnoreCase(name))
-                    && physicalFont.style == style) {
-                    return physicalFont;
-                }
-            }
-        }
-
-        /* Iterate over the deferred font files looking for any in the
-         * jre directory that we didn't recognise, open each of these.
-         * In almost all installations this will quickly fall through
-         * because only the Lucidas will be present and jreOtherFontFiles
-         * will be empty.
-         * noOtherJREFontFiles is used so we can skip this block as soon
-         * as its determined that its not needed - almost always after the
-         * very first time through.
-         */
-        if (noOtherJREFontFiles) {
-            return null;
-        }
-        synchronized (jreLucidaFontFiles) {
-            if (jreOtherFontFiles == null) {
-                HashSet<String> otherFontFiles = new HashSet<String>();
-                for (String deferredFile : deferredFontFiles.keySet()) {
-                    File file = new File(deferredFile);
-                    String dir = file.getParent();
-                    String fname = file.getName();
-                    /* skip names which aren't absolute, aren't in the JRE
-                     * directory, or are known Lucida fonts.
-                     */
-                    if (dir == null ||
-                        !dir.equals(SunGraphicsEnvironment.jreFontDirName) ||
-                        jreLucidaFontFiles.contains(fname)) {
-                        continue;
-                    }
-                    otherFontFiles.add(deferredFile);
-                }
-                jreOtherFontFiles = otherFontFiles.toArray(STR_ARRAY);
-                if (jreOtherFontFiles.length == 0) {
-                    noOtherJREFontFiles = true;
-                }
-            }
+    public boolean registerFont(Font font);
 
-            for (int i=0; i<jreOtherFontFiles.length;i++) {
-                fileName = jreOtherFontFiles[i];
-                if (fileName == null) {
-                    continue;
-                }
-                jreOtherFontFiles[i] = null;
-                physicalFont = initialiseDeferredFont(fileName);
-                if (physicalFont != null &&
-                    (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
-                     physicalFont.getFamilyName(null).equalsIgnoreCase(name))
-                    && physicalFont.style == style) {
-                    return physicalFont;
-                }
-            }
-        }
-
-        return null;
-    }
-
-    /* This skips JRE installed fonts. */
-    private static PhysicalFont findOtherDeferredFont(String name, int style) {
-        for (String fileName : deferredFontFiles.keySet()) {
-            File file = new File(fileName);
-            String dir = file.getParent();
-            String fname = file.getName();
-            if (dir != null &&
-                dir.equals(SunGraphicsEnvironment.jreFontDirName) &&
-                jreLucidaFontFiles.contains(fname)) {
-                continue;
-            }
-            PhysicalFont physicalFont = initialiseDeferredFont(fileName);
-            if (physicalFont != null &&
-                (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
-                physicalFont.getFamilyName(null).equalsIgnoreCase(name)) &&
-                physicalFont.style == style) {
-                return physicalFont;
-            }
-        }
-        return null;
-    }
-
-    private static PhysicalFont findDeferredFont(String name, int style) {
-
-        PhysicalFont physicalFont = findJREDeferredFont(name, style);
-        if (physicalFont != null) {
-            return physicalFont;
-        } else {
-            return findOtherDeferredFont(name, style);
-        }
-    }
-
-    public static void registerDeferredFont(String fileNameKey,
-                                            String fullPathName,
-                                            String[] nativeNames,
-                                            int fontFormat,
-                                            boolean useJavaRasterizer,
-                                            int fontRank) {
-        FontRegistrationInfo regInfo =
-            new FontRegistrationInfo(fullPathName, nativeNames, fontFormat,
-                                     useJavaRasterizer, fontRank);
-        deferredFontFiles.put(fileNameKey, regInfo);
-    }
-
-
-    public static synchronized
-         PhysicalFont initialiseDeferredFont(String fileNameKey) {
-
-        if (fileNameKey == null) {
-            return null;
-        }
-        if (logging) {
-            logger.info("Opening deferred font file " + fileNameKey);
-        }
-
-        PhysicalFont physicalFont;
-        FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
-        if (regInfo != null) {
-            deferredFontFiles.remove(fileNameKey);
-            physicalFont = registerFontFile(regInfo.fontFilePath,
-                                            regInfo.nativeNames,
-                                            regInfo.fontFormat,
-                                            regInfo.javaRasterizer,
-                                            regInfo.fontRank);
-
-
-            if (physicalFont != null) {
-                /* Store the handle, so that if a font is bad, we
-                 * retrieve the substituted font.
-                 */
-                initialisedFonts.put(fileNameKey, physicalFont.handle);
-            } else {
-                initialisedFonts.put(fileNameKey,
-                                     getDefaultPhysicalFont().handle);
-            }
-        } else {
-            Font2DHandle handle = initialisedFonts.get(fileNameKey);
-            if (handle == null) {
-                /* Probably shouldn't happen, but just in case */
-                physicalFont = getDefaultPhysicalFont();
-            } else {
-                physicalFont = (PhysicalFont)(handle.font2D);
-            }
-        }
-        return physicalFont;
-    }
-
-    /* Note that the return value from this method is not always
-     * derived from this file, and may be null. See addToFontList for
-     * some explanation of this.
-     */
-    public static PhysicalFont registerFontFile(String fileName,
-                                                String[] nativeNames,
-                                                int fontFormat,
-                                                boolean useJavaRasterizer,
-                                                int fontRank) {
-
-        PhysicalFont regFont = registeredFontFiles.get(fileName);
-        if (regFont != null) {
-            return regFont;
-        }
-
-        PhysicalFont physicalFont = null;
-        try {
-            String name;
-
-            switch (fontFormat) {
-
-            case FontManager.FONTFORMAT_TRUETYPE:
-                int fn = 0;
-                TrueTypeFont ttf;
-                do {
-                    ttf = new TrueTypeFont(fileName, nativeNames, fn++,
-                                           useJavaRasterizer);
-                    PhysicalFont pf = addToFontList(ttf, fontRank);
-                    if (physicalFont == null) {
-                        physicalFont = pf;
-                    }
-                }
-                while (fn < ttf.getFontCount());
-                break;
-
-            case FontManager.FONTFORMAT_TYPE1:
-                Type1Font t1f = new Type1Font(fileName, nativeNames);
-                physicalFont = addToFontList(t1f, fontRank);
-                break;
-
-            case FontManager.FONTFORMAT_NATIVE:
-                NativeFont nf = new NativeFont(fileName, false);
-                physicalFont = addToFontList(nf, fontRank);
-            default:
-
-            }
-            if (logging) {
-                logger.info("Registered file " + fileName + " as font " +
-                            physicalFont + " rank="  + fontRank);
-            }
-        } catch (FontFormatException ffe) {
-            if (logging) {
-                logger.warning("Unusable font: " +
-                               fileName + " " + ffe.toString());
-            }
-        }
-        if (physicalFont != null &&
-            fontFormat != FontManager.FONTFORMAT_NATIVE) {
-            registeredFontFiles.put(fileName, physicalFont);
-        }
-        return physicalFont;
-    }
-
-    public static void registerFonts(String[] fileNames,
-                                     String[][] nativeNames,
-                                     int fontCount,
-                                     int fontFormat,
-                                     boolean useJavaRasterizer,
-                                     int fontRank, boolean defer) {
-
-        for (int i=0; i < fontCount; i++) {
-            if (defer) {
-                registerDeferredFont(fileNames[i],fileNames[i], nativeNames[i],
-                                     fontFormat, useJavaRasterizer, fontRank);
-            } else {
-                registerFontFile(fileNames[i], nativeNames[i],
-                                 fontFormat, useJavaRasterizer, fontRank);
-            }
-        }
-    }
-
-    /*
-     * This is the Physical font used when some other font on the system
-     * can't be located. There has to be at least one font or the font
-     * system is not useful and the graphics environment cannot sustain
-     * the Java platform.
-     */
-    public static PhysicalFont getDefaultPhysicalFont() {
-        if (defaultPhysicalFont == null) {
-            /* findFont2D will load all fonts before giving up the search.
-             * If the JRE Lucida isn't found (eg because the JRE fonts
-             * directory is missing), it could find another version of Lucida
-             * from the host system. This is OK because at that point we are
-             * trying to gracefully handle/recover from a system
-             * misconfiguration and this is probably a reasonable substitution.
-             */
-            defaultPhysicalFont = (PhysicalFont)
-                findFont2D("Lucida Sans Regular", Font.PLAIN, NO_FALLBACK);
-            if (defaultPhysicalFont == null) {
-                defaultPhysicalFont = (PhysicalFont)
-                    findFont2D("Arial", Font.PLAIN, NO_FALLBACK);
-            }
-            if (defaultPhysicalFont == null) {
-                /* Because of the findFont2D call above, if we reach here, we
-                 * know all fonts have already been loaded, just accept any
-                 * match at this point. If this fails we are in real trouble
-                 * and I don't know how to recover from there being absolutely
-                 * no fonts anywhere on the system.
-                 */
-                Iterator i = physicalFonts.values().iterator();
-                if (i.hasNext()) {
-                    defaultPhysicalFont = (PhysicalFont)i.next();
-                } else {
-                    throw new Error("Probable fatal error:No fonts found.");
-                }
-            }
-        }
-        return defaultPhysicalFont;
-    }
-
-    public static CompositeFont getDefaultLogicalFont(int style) {
-        return (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
-    }
-
-    /*
-     * return String representation of style prepended with "."
-     * This is useful for performance to avoid unnecessary string operations.
-     */
-    private static String dotStyleStr(int num) {
-        switch(num){
-          case Font.BOLD:
-            return ".bold";
-          case Font.ITALIC:
-            return ".italic";
-          case Font.ITALIC | Font.BOLD:
-            return ".bolditalic";
-          default:
-            return ".plain";
-        }
-    }
-
-    static void initSGEnv() {
-        if (sgEnv == null) {
-            GraphicsEnvironment ge =
-                GraphicsEnvironment.getLocalGraphicsEnvironment();
-            if (ge instanceof HeadlessGraphicsEnvironment) {
-                HeadlessGraphicsEnvironment hgEnv =
-                    (HeadlessGraphicsEnvironment)ge;
-                sgEnv = (SunGraphicsEnvironment)
-                    hgEnv.getSunGraphicsEnvironment();
-            } else {
-                sgEnv = (SunGraphicsEnvironment)ge;
-            }
-        }
-    }
-
-    /* This is implemented only on windows and is called from code that
-     * executes only on windows. This isn't pretty but its not a precedent
-     * in this file. This very probably should be cleaned up at some point.
-     */
-    private static native void
-        populateFontFileNameMap(HashMap<String,String> fontToFileMap,
-                                HashMap<String,String> fontToFamilyNameMap,
-                                HashMap<String,ArrayList<String>>
-                                familyToFontListMap,
-                                Locale locale);
-
-    /* Obtained from Platform APIs (windows only)
-     * Map from lower-case font full name to basename of font file.
-     * Eg "arial bold" -> ARIALBD.TTF.
-     * For TTC files, there is a mapping for each font in the file.
-     */
-    private static HashMap<String,String> fontToFileMap = null;
-
-    /* Obtained from Platform APIs (windows only)
-     * Map from lower-case font full name to the name of its font family
-     * Eg "arial bold" -> "Arial"
-     */
-    private static HashMap<String,String> fontToFamilyNameMap = null;
-
-    /* Obtained from Platform APIs (windows only)
-     * Map from a lower-case family name to a list of full names of
-     * the member fonts, eg:
-     * "arial" -> ["Arial", "Arial Bold", "Arial Italic","Arial Bold Italic"]
-     */
-    private static HashMap<String,ArrayList<String>> familyToFontListMap= null;
-
-    /* The directories which contain platform fonts */
-    private static String[] pathDirs = null;
-
-    private static boolean haveCheckedUnreferencedFontFiles;
-
-    private static String[] getFontFilesFromPath(boolean noType1) {
-        final FilenameFilter filter;
-        if (noType1) {
-            filter = SunGraphicsEnvironment.ttFilter;
-        } else {
-            filter = new SunGraphicsEnvironment.TTorT1Filter();
-        }
-        return (String[])AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
-                if (pathDirs.length == 1) {
-                    File dir = new File(pathDirs[0]);
-                    String[] files = dir.list(filter);
-                    if (files == null) {
-                        return new String[0];
-                    }
-                    for (int f=0; f<files.length; f++) {
-                        files[f] = files[f].toLowerCase();
-                    }
-                    return files;
-                } else {
-                    ArrayList<String> fileList = new ArrayList<String>();
-                    for (int i = 0; i< pathDirs.length; i++) {
-                        File dir = new File(pathDirs[i]);
-                        String[] files = dir.list(filter);
-                        if (files == null) {
-                            continue;
-                        }
-                        for (int f=0; f<files.length ; f++) {
-                            fileList.add(files[f].toLowerCase());
-                        }
-                    }
-                    return fileList.toArray(STR_ARRAY);
-                }
-            }
-        });
-    }
-
-    /* This is needed since some windows registry names don't match
-     * the font names.
-     * - UPC styled font names have a double space, but the
-     * registry entry mapping to a file doesn't.
-     * - Marlett is in a hidden file not listed in the registry
-     * - The registry advertises that the file david.ttf contains a
-     * font with the full name "David Regular" when in fact its
-     * just "David".
-     * Directly fix up these known cases as this is faster.
-     * If a font which doesn't match these known cases has no file,
-     * it may be a font that has been temporarily added to the known set
-     * or it may be an installed font with a missing registry entry.
-     * Installed fonts are those in the windows font directories.
-     * Make a best effort attempt to locate these.
-     * We obtain the list of TrueType fonts in these directories and
-     * filter out all the font files we already know about from the registry.
-     * What remains may be "bad" fonts, duplicate fonts, or perhaps the
-     * missing font(s) we are looking for.
-     * Open each of these files to find out.
-     */
-    private static void resolveWindowsFonts() {
-
-        ArrayList<String> unmappedFontNames = null;
-        for (String font : fontToFamilyNameMap.keySet()) {
-            String file = fontToFileMap.get(font);
-            if (file == null) {
-                if (font.indexOf("  ") > 0) {
-                    String newName = font.replaceFirst("  ", " ");
-                    file = fontToFileMap.get(newName);
-                    /* If this name exists and isn't for a valid name
-                     * replace the mapping to the file with this font
-                     */
-                    if (file != null &&
-                        !fontToFamilyNameMap.containsKey(newName)) {
-                        fontToFileMap.remove(newName);
-                        fontToFileMap.put(font, file);
-                    }
-                } else if (font.equals("marlett")) {
-                    fontToFileMap.put(font, "marlett.ttf");
-                } else if (font.equals("david")) {
-                    file = fontToFileMap.get("david regular");
-                    if (file != null) {
-                        fontToFileMap.remove("david regular");
-                        fontToFileMap.put("david", file);
-                    }
-                } else {
-                    if (unmappedFontNames == null) {
-                        unmappedFontNames = new ArrayList<String>();
-                    }
-                    unmappedFontNames.add(font);
-                }
-            }
-        }
-
-        if (unmappedFontNames != null) {
-            HashSet<String> unmappedFontFiles = new HashSet<String>();
-
-            /* Every font key in fontToFileMap ought to correspond to a
-             * font key in fontToFamilyNameMap. Entries that don't seem
-             * to correspond are likely fonts that were named differently
-             * by GDI than in the registry. One known cause of this is when
-             * Windows has had its regional settings changed so that from
-             * GDI we get a localised (eg Chinese or Japanese) name for the
-             * font, but the registry retains the English version of the name
-             * that corresponded to the "install" locale for windows.
-             * Since we are in this code block because there are unmapped
-             * font names, we can look to find unused font->file mappings
-             * and then open the files to read the names. We don't generally
-             * want to open font files, as its a performance hit, but this
-             * occurs only for a small number of fonts on specific system
-             * configs - ie is believed that a "true" Japanese windows would
-             * have JA names in the registry too.
-             * Clone fontToFileMap and remove from the clone all keys which
-             * match a fontToFamilyNameMap key. What remains maps to the
-             * files we want to open to find the fonts GDI returned.
-             * A font in such a file is added to the fontToFileMap after
-             * checking its one of the unmappedFontNames we are looking for.
-             * The original name that didn't map is removed from fontToFileMap
-             * so essentially this "fixes up" fontToFileMap to use the same
-             * name as GDI.
-             * Also note that typically the fonts for which this occurs in
-             * CJK locales are TTC fonts and not all fonts in a TTC may have
-             * localised names. Eg MSGOTHIC.TTC contains 3 fonts and one of
-             * them "MS UI Gothic" has no JA name whereas the other two do.
-             * So not every font in these files is unmapped or new.
-             */
-            HashMap<String,String> ffmapCopy =
-                (HashMap<String,String>)(fontToFileMap.clone());
-            for (String key : fontToFamilyNameMap.keySet()) {
-                ffmapCopy.remove(key);
-            }
-            for (String key : ffmapCopy.keySet()) {
-                unmappedFontFiles.add(ffmapCopy.get(key));
-                fontToFileMap.remove(key);
-            }
-
-            resolveFontFiles(unmappedFontFiles, unmappedFontNames);
-
-            /* If there are still unmapped font names, this means there's
-             * something that wasn't in the registry. We need to get all
-             * the font files directly and look at the ones that weren't
-             * found in the registry.
-             */
-            if (unmappedFontNames.size() > 0) {
-
-                /* getFontFilesFromPath() returns all lower case names.
-                 * To compare we also need lower case
-                 * versions of the names from the registry.
-                 */
-                ArrayList<String> registryFiles = new ArrayList<String>();
-
-                for (String regFile : fontToFileMap.values()) {
-                    registryFiles.add(regFile.toLowerCase());
-                }
-                /* We don't look for Type1 files here as windows will
-                 * not enumerate these, so aren't useful in reconciling
-                 * GDI's unmapped files. We do find these later when
-                 * we enumerate all fonts.
-                 */
-                for (String pathFile : getFontFilesFromPath(true)) {
-                    if (!registryFiles.contains(pathFile)) {
-                        unmappedFontFiles.add(pathFile);
-                    }
-                }
-
-                resolveFontFiles(unmappedFontFiles, unmappedFontNames);
-            }
-
-            /* remove from the set of names that will be returned to the
-             * user any fonts that can't be mapped to files.
-             */
-            if (unmappedFontNames.size() > 0) {
-                int sz = unmappedFontNames.size();
-                for (int i=0; i<sz; i++) {
-                    String name = unmappedFontNames.get(i);
-                    String familyName = fontToFamilyNameMap.get(name);
-                    if (familyName != null) {
-                        ArrayList family = familyToFontListMap.get(familyName);
-                        if (family != null) {
-                            if (family.size() <= 1) {
-                                familyToFontListMap.remove(familyName);
-                            }
-                        }
-                    }
-                    fontToFamilyNameMap.remove(name);
-                    if (logging) {
-                        logger.info("No file for font:" + name);
-                    }
-                }
-            }
-        }
-    }
+    public void deRegisterBadFont(Font2D font2D);
 
     /**
-     * In some cases windows may have fonts in the fonts folder that
-     * don't show up in the registry or in the GDI calls to enumerate fonts.
-     * The only way to find these is to list the directory. We invoke this
-     * only in getAllFonts/Families, so most searches for a specific
-     * font that is satisfied by the GDI/registry calls don't take the
-     * additional hit of listing the directory. This hit is small enough
-     * that its not significant in these 'enumerate all the fonts' cases.
-     * The basic approach is to cross-reference the files windows found
-     * with the ones in the directory listing approach, and for each
-     * in the latter list that is missing from the former list, register it.
-     */
-    private static synchronized void checkForUnreferencedFontFiles() {
-        if (haveCheckedUnreferencedFontFiles) {
-            return;
-        }
-        haveCheckedUnreferencedFontFiles = true;
-        if (!isWindows) {
-            return;
-        }
-        /* getFontFilesFromPath() returns all lower case names.
-         * To compare we also need lower case
-         * versions of the names from the registry.
-         */
-        ArrayList<String> registryFiles = new ArrayList<String>();
-        for (String regFile : fontToFileMap.values()) {
-            registryFiles.add(regFile.toLowerCase());
-        }
-
-        /* To avoid any issues with concurrent modification, create
-         * copies of the existing maps, add the new fonts into these
-         * and then replace the references to the old ones with the
-         * new maps. ConcurrentHashmap is another option but its a lot
-         * more changes and with this exception, these maps are intended
-         * to be static.
-         */
-        HashMap<String,String> fontToFileMap2 = null;
-        HashMap<String,String> fontToFamilyNameMap2 = null;
-        HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
-
-        for (String pathFile : getFontFilesFromPath(false)) {
-            if (!registryFiles.contains(pathFile)) {
-                if (logging) {
-                    logger.info("Found non-registry file : " + pathFile);
-                }
-                PhysicalFont f = registerFontFile(getPathName(pathFile));
-                if (f == null) {
-                    continue;
-                }
-                if (fontToFileMap2 == null) {
-                    fontToFileMap2 = new HashMap<String,String>(fontToFileMap);
-                    fontToFamilyNameMap2 =
-                        new HashMap<String,String>(fontToFamilyNameMap);
-                    familyToFontListMap2 = new
-                        HashMap<String,ArrayList<String>>(familyToFontListMap);
-                }
-                String fontName = f.getFontName(null);
-                String family = f.getFamilyName(null);
-                String familyLC = family.toLowerCase();
-                fontToFamilyNameMap2.put(fontName, family);
-                fontToFileMap2.put(fontName, pathFile);
-                ArrayList<String> fonts = familyToFontListMap2.get(familyLC);
-                if (fonts == null) {
-                    fonts = new ArrayList<String>();
-                } else {
-                    fonts = new ArrayList<String>(fonts);
-                }
-                fonts.add(fontName);
-                familyToFontListMap2.put(familyLC, fonts);
-            }
-        }
-        if (fontToFileMap2 != null) {
-            fontToFileMap = fontToFileMap2;
-            familyToFontListMap = familyToFontListMap2;
-            fontToFamilyNameMap = fontToFamilyNameMap2;
-        }
-    }
-
-    private static void resolveFontFiles(HashSet<String> unmappedFiles,
-                                         ArrayList<String> unmappedFonts) {
-
-        Locale l = SunToolkit.getStartupLocale();
-
-        for (String file : unmappedFiles) {
-            try {
-                int fn = 0;
-                TrueTypeFont ttf;
-                String fullPath = getPathName(file);
-                if (logging) {
-                    logger.info("Trying to resolve file " + fullPath);
-                }
-                do {
-                    ttf = new TrueTypeFont(fullPath, null, fn++, true);
-                    //  prefer the font's locale name.
-                    String fontName = ttf.getFontName(l).toLowerCase();
-                    if (unmappedFonts.contains(fontName)) {
-                        fontToFileMap.put(fontName, file);
-                        unmappedFonts.remove(fontName);
-                        if (logging) {
-                            logger.info("Resolved absent registry entry for " +
-                                        fontName + " located in " + fullPath);
-                        }
-                    }
-                }
-                while (fn < ttf.getFontCount());
-            } catch (Exception e) {
-            }
-        }
-    }
-
-    private static synchronized HashMap<String,String> getFullNameToFileMap() {
-        if (fontToFileMap == null) {
-
-            initSGEnv();
-            pathDirs = sgEnv.getPlatformFontDirs();
-
-            fontToFileMap = new HashMap<String,String>(100);
-            fontToFamilyNameMap = new HashMap<String,String>(100);
-            familyToFontListMap = new HashMap<String,ArrayList<String>>(50);
-            populateFontFileNameMap(fontToFileMap,
-                                    fontToFamilyNameMap,
-                                    familyToFontListMap,
-                                    Locale.ENGLISH);
-            if (isWindows) {
-                resolveWindowsFonts();
-            }
-            if (logging) {
-                logPlatformFontInfo();
-            }
-        }
-        return fontToFileMap;
-    }
-
-    private static void logPlatformFontInfo() {
-        for (int i=0; i< pathDirs.length;i++) {
-            logger.info("fontdir="+pathDirs[i]);
-        }
-        for (String keyName : fontToFileMap.keySet()) {
-            logger.info("font="+keyName+" file="+ fontToFileMap.get(keyName));
-        }
-        for (String keyName : fontToFamilyNameMap.keySet()) {
-            logger.info("font="+keyName+" family="+
-                        fontToFamilyNameMap.get(keyName));
-        }
-        for (String keyName : familyToFontListMap.keySet()) {
-            logger.info("family="+keyName+ " fonts="+
-                        familyToFontListMap.get(keyName));
-        }
-    }
-
-    /* Note this return list excludes logical fonts and JRE fonts */
-    public static String[] getFontNamesFromPlatform() {
-        if (getFullNameToFileMap().size() == 0) {
-            return null;
-        }
-        checkForUnreferencedFontFiles();
-        /* This odd code with TreeMap is used to preserve a historical
-         * behaviour wrt the sorting order .. */
-        ArrayList<String> fontNames = new ArrayList<String>();
-        for (ArrayList<String> a : familyToFontListMap.values()) {
-            for (String s : a) {
-                fontNames.add(s);
-            }
-        }
-        return fontNames.toArray(STR_ARRAY);
-    }
-
-    public static boolean gotFontsFromPlatform() {
-        return getFullNameToFileMap().size() != 0;
-    }
-
-    public static String getFileNameForFontName(String fontName) {
-        String fontNameLC = fontName.toLowerCase(Locale.ENGLISH);
-        return fontToFileMap.get(fontNameLC);
-    }
-
-    private static PhysicalFont registerFontFile(String file) {
-        if (new File(file).isAbsolute() &&
-            !registeredFontFiles.contains(file)) {
-            int fontFormat = FONTFORMAT_NONE;
-            int fontRank = Font2D.UNKNOWN_RANK;
-            if (SunGraphicsEnvironment.ttFilter.accept(null, file)) {
-                fontFormat = FONTFORMAT_TRUETYPE;
-                fontRank = Font2D.TTF_RANK;
-            } else if
-                (SunGraphicsEnvironment.t1Filter.accept(null, file)) {
-                fontFormat = FONTFORMAT_TYPE1;
-                fontRank = Font2D.TYPE1_RANK;
-            }
-            if (fontFormat == FONTFORMAT_NONE) {
-                return null;
-            }
-            return registerFontFile(file, null, fontFormat, false, fontRank);
-        }
-        return null;
-    }
-
-    /* Used to register any font files that are found by platform APIs
-     * that weren't previously found in the standard font locations.
-     * the isAbsolute() check is needed since that's whats stored in the
-     * set, and on windows, the fonts in the system font directory that
-     * are in the fontToFileMap are just basenames. We don't want to try
-     * to register those again, but we do want to register other registry
-     * installed fonts.
-     */
-    public static void registerOtherFontFiles(HashSet registeredFontFiles) {
-        if (getFullNameToFileMap().size() == 0) {
-            return;
-        }
-        for (String file : fontToFileMap.values()) {
-            registerFontFile(file);
-        }
-    }
-
-    public static boolean
-        getFamilyNamesFromPlatform(TreeMap<String,String> familyNames,
-                                   Locale requestedLocale) {
-        if (getFullNameToFileMap().size() == 0) {
-            return false;
-        }
-        checkForUnreferencedFontFiles();
-        for (String name : fontToFamilyNameMap.values()) {
-            familyNames.put(name.toLowerCase(requestedLocale), name);
-        }
-        return true;
-    }
-
-    /* Path may be absolute or a base file name relative to one of
-     * the platform font directories
-     */
-    private static String getPathName(final String s) {
-        File f = new File(s);
-        if (f.isAbsolute()) {
-            return s;
-        } else if (pathDirs.length==1) {
-            return pathDirs[0] + File.separator + s;
-        } else {
-            String path = java.security.AccessController.doPrivileged(
-                 new java.security.PrivilegedAction<String>() {
-                     public String run() {
-                         for (int p=0; p<pathDirs.length; p++) {
-                             File f = new File(pathDirs[p] +File.separator+ s);
-                             if (f.exists()) {
-                                 return f.getAbsolutePath();
-                             }
-                         }
-                         return null;
-                     }
-                });
-            if (path != null) {
-                return path;
-            }
-        }
-        return s; // shouldn't happen, but harmless
-    }
-
-    /* lcName is required to be lower case for use as a key.
-     * lcName may be a full name, or a family name, and style may
-     * be specified in addition to either of these. So be sure to
-     * get the right one. Since an app *could* ask for "Foo Regular"
-     * and later ask for "Foo Italic", if we don't register all the
-     * styles, then logic in findFont2D may try to style the original
-     * so we register the entire family if we get a match here.
-     * This is still a big win because this code is invoked where
-     * otherwise we would register all fonts.
-     * It's also useful for the case where "Foo Bold" was specified with
-     * style Font.ITALIC, as we would want in that case to try to return
-     * "Foo Bold Italic" if it exists, and it is only by locating "Foo Bold"
-     * and opening it that we really "know" it's Bold, and can look for
-     * a font that supports that and the italic style.
-     * The code in here is not overtly windows-specific but in fact it
-     * is unlikely to be useful as is on other platforms. It is maintained
-     * in this shared source file to be close to its sole client and
-     * because so much of the logic is intertwined with the logic in
-     * findFont2D.
-     */
-    private static Font2D findFontFromPlatform(String lcName, int style) {
-        if (getFullNameToFileMap().size() == 0) {
-            return null;
-        }
-
-        ArrayList<String> family = null;
-        String fontFile = null;
-        String familyName = fontToFamilyNameMap.get(lcName);
-        if (familyName != null) {
-            fontFile = fontToFileMap.get(lcName);
-            family = familyToFontListMap.get
-                (familyName.toLowerCase(Locale.ENGLISH));
-        } else {
-            family = familyToFontListMap.get(lcName); // is lcName is a family?
-            if (family != null && family.size() > 0) {
-                String lcFontName = family.get(0).toLowerCase(Locale.ENGLISH);
-                if (lcFontName != null) {
-                    familyName = fontToFamilyNameMap.get(lcFontName);
-                }
-            }
-        }
-        if (family == null || familyName == null) {
-            return null;
-        }
-        String [] fontList = (String[])family.toArray(STR_ARRAY);
-        if (fontList.length == 0) {
-            return null;
-        }
-
-        /* first check that for every font in this family we can find
-         * a font file. The specific reason for doing this is that
-         * in at least one case on Windows a font has the face name "David"
-         * but the registry entry is "David Regular". That is the "unique"
-         * name of the font but in other cases the registry contains the
-         * "full" name. See the specifications of name ids 3 and 4 in the
-         * TrueType 'name' table.
-         * In general this could cause a problem that we fail to register
-         * if we all members of a family that we may end up mapping to
-         * the wrong font member: eg return Bold when Plain is needed.
-         */
-        for (int f=0;f<fontList.length;f++) {
-            String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
-            String fileName = fontToFileMap.get(fontNameLC);
-            if (fileName == null) {
-                if (logging) {
-                    logger.info("Platform lookup : No file for font " +
-                                fontList[f] + " in family " +familyName);
-                }
-                return null;
-            }
-        }
-
-        /* Currently this code only looks for TrueType fonts, so format
-         * and rank can be specified without looking at the filename.
-         */
-        PhysicalFont physicalFont = null;
-        if (fontFile != null) {
-            physicalFont = registerFontFile(getPathName(fontFile), null,
-                                            FONTFORMAT_TRUETYPE, false,
-                                            Font2D.TTF_RANK);
-        }
-        /* Register all fonts in this family. */
-        for (int f=0;f<fontList.length;f++) {
-            String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
-            String fileName = fontToFileMap.get(fontNameLC);
-            if (fontFile != null && fontFile.equals(fileName)) {
-                continue;
-            }
-            /* Currently this code only looks for TrueType fonts, so format
-             * and rank can be specified without looking at the filename.
-             */
-            registerFontFile(getPathName(fileName), null,
-                             FONTFORMAT_TRUETYPE, false, Font2D.TTF_RANK);
-        }
-
-        Font2D font = null;
-        FontFamily fontFamily = FontFamily.getFamily(familyName);
-        /* Handle case where request "MyFont Bold", style=Font.ITALIC */
-        if (physicalFont != null) {
-            style |= physicalFont.style;
-        }
-        if (fontFamily != null) {
-            font = fontFamily.getFont(style);
-            if (font == null) {
-                font = fontFamily.getClosestStyle(style);
-            }
-        }
-        return font;
-    }
-
-    private static ConcurrentHashMap<String, Font2D> fontNameCache =
-        new ConcurrentHashMap<String, Font2D>();
-
-    /*
      * The client supplies a name and a style.
      * The name could be a family name, or a full name.
      * A font may exist with the specified style, or it may
      * exist only in some other style. For non-native fonts the scaler
      * may be able to emulate the required style.
      */
-    public static Font2D findFont2D(String name, int style, int fallback) {
-        String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
-        String mapName = lowerCaseName + dotStyleStr(style);
-        Font2D font;
-
-        /* If preferLocaleFonts() or preferProportionalFonts() has been
-         * called we may be using an alternate set of composite fonts in this
-         * app context. The presence of a pre-built name map indicates whether
-         * this is so, and gives access to the alternate composite for the
-         * name.
-         */
-        if (usingPerAppContextComposites) {
-            ConcurrentHashMap<String, Font2D> altNameCache =
-                (ConcurrentHashMap<String, Font2D>)
-                AppContext.getAppContext().get(CompositeFont.class);
-            if (altNameCache != null) {
-                font = (Font2D)altNameCache.get(mapName);
-            } else {
-                font = null;
-            }
-        } else {
-            font = fontNameCache.get(mapName);
-        }
-        if (font != null) {
-            return font;
-        }
-
-        if (logging) {
-            logger.info("Search for font: " + name);
-        }
-
-        // The check below is just so that the bitmap fonts being set by
-        // AWT and Swing thru the desktop properties do not trigger the
-        // the load fonts case. The two bitmap fonts are now mapped to
-        // appropriate equivalents for serif and sansserif.
-        // Note that the cost of this comparison is only for the first
-        // call until the map is filled.
-        if (isWindows) {
-            if (lowerCaseName.equals("ms sans serif")) {
-                name = "sansserif";
-            } else if (lowerCaseName.equals("ms serif")) {
-                name = "serif";
-            }
-        }
-
-        /* This isn't intended to support a client passing in the
-         * string default, but if a client passes in null for the name
-         * the java.awt.Font class internally substitutes this name.
-         * So we need to recognise it here to prevent a loadFonts
-         * on the unrecognised name. The only potential problem with
-         * this is it would hide any real font called "default"!
-         * But that seems like a potential problem we can ignore for now.
-         */
-        if (lowerCaseName.equals("default")) {
-            name = "dialog";
-        }
-
-        /* First see if its a family name. */
-        FontFamily family = FontFamily.getFamily(name);
-        if (family != null) {
-            font = family.getFontWithExactStyleMatch(style);
-            if (font == null) {
-                font = findDeferredFont(name, style);
-            }
-            if (font == null) {
-                font = family.getFont(style);
-            }
-            if (font == null) {
-                font = family.getClosestStyle(style);
-            }
-            if (font != null) {
-                fontNameCache.put(mapName, font);
-                return font;
-            }
-        }
-
-        /* If it wasn't a family name, it should be a full name of
-         * either a composite, or a physical font
-         */
-        font = fullNameToFont.get(lowerCaseName);
-        if (font != null) {
-            /* Check that the requested style matches the matched font's style.
-             * But also match style automatically if the requested style is
-             * "plain". This because the existing behaviour is that the fonts
-             * listed via getAllFonts etc always list their style as PLAIN.
-             * This does lead to non-commutative behaviours where you might
-             * start with "Lucida Sans Regular" and ask for a BOLD version
-             * and get "Lucida Sans DemiBold" but if you ask for the PLAIN
-             * style of "Lucida Sans DemiBold" you get "Lucida Sans DemiBold".
-             * This consistent however with what happens if you have a bold
-             * version of a font and no plain version exists - alg. styling
-             * doesn't "unbolden" the font.
-             */
-            if (font.style == style || style == Font.PLAIN) {
-                fontNameCache.put(mapName, font);
-                return font;
-            } else {
-                /* If it was a full name like "Lucida Sans Regular", but
-                 * the style requested is "bold", then we want to see if
-                 * there's the appropriate match against another font in
-                 * that family before trying to load all fonts, or applying a
-                 * algorithmic styling
-                 */
-                family = FontFamily.getFamily(font.getFamilyName(null));
-                if (family != null) {
-                    Font2D familyFont = family.getFont(style|font.style);
-                    /* We exactly matched the requested style, use it! */
-                    if (familyFont != null) {
-                        fontNameCache.put(mapName, familyFont);
-                        return familyFont;
-                    } else {
-                        /* This next call is designed to support the case
-                         * where bold italic is requested, and if we must
-                         * style, then base it on either bold or italic -
-                         * not on plain!
-                         */
-                        familyFont = family.getClosestStyle(style|font.style);
-                        if (familyFont != null) {
-                            /* The next check is perhaps one
-                             * that shouldn't be done. ie if we get this
-                             * far we have probably as close a match as we
-                             * are going to get. We could load all fonts to
-                             * see if somehow some parts of the family are
-                             * loaded but not all of it.
-                             */
-                            if (familyFont.canDoStyle(style|font.style)) {
-                                fontNameCache.put(mapName, familyFont);
-                                return familyFont;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        /* If reach here its possible that this is in a client which never
-         * loaded the GraphicsEnvironment, so we haven't even loaded ANY of
-         * the fonts from the environment. Do so now and recurse.
-         */
-        if (sgEnv == null) {
-            initSGEnv();
-            return findFont2D(name, style, fallback);
-        }
-
-        if (isWindows) {
-            /* Don't want Windows to return a Lucida Sans font from
-             * C:\Windows\Fonts
-             */
-            if (deferredFontFiles.size() > 0) {
-                font = findJREDeferredFont(lowerCaseName, style);
-                if (font != null) {
-                    fontNameCache.put(mapName, font);
-                    return font;
-                }
-            }
-            font = findFontFromPlatform(lowerCaseName, style);
-            if (font != null) {
-                if (logging) {
-                    logger.info("Found font via platform API for request:\"" +
-                                name + "\":, style="+style+
-                                " found font: " + font);
-                }
-                fontNameCache.put(mapName, font);
-                return font;
-            }
-        }
-
-        /* If reach here and no match has been located, then if there are
-         * uninitialised deferred fonts, load as many of those as needed
-         * to find the deferred font. If none is found through that
-         * search continue on.
-         * There is possibly a minor issue when more than one
-         * deferred font implements the same font face. Since deferred
-         * fonts are only those in font configuration files, this is a
-         * controlled situation, the known case being Solaris euro_fonts
-         * versions of Arial, Times New Roman, Courier New. However
-         * the larger font will transparently replace the smaller one
-         *  - see addToFontList() - when it is needed by the composite font.
-         */
-        if (deferredFontFiles.size() > 0) {
-            font = findDeferredFont(name, style);
-            if (font != null) {
-                fontNameCache.put(mapName, font);
-                return font;
-            }
-        }
-
-        /* Some apps use deprecated 1.0 names such as helvetica and courier. On
-         * Solaris these are Type1 fonts in /usr/openwin/lib/X11/fonts/Type1.
-         * If running on Solaris will register all the fonts in this
-         * directory.
-         * May as well register the whole directory without actually testing
-         * the font name is one of the deprecated names as the next step would
-         * load all fonts which are in this directory anyway.
-         * In the event that this lookup is successful it potentially "hides"
-         * TrueType versions of such fonts that are elsewhere but since they
-         * do not exist on Solaris this is not a problem.
-         * Set a flag to indicate we've done this registration to avoid
-         * repetition and more seriously, to avoid recursion.
-         */
-        if (isSolaris&&!loaded1dot0Fonts) {
-            /* "timesroman" is a special case since that's not the
-             * name of any known font on Solaris or elsewhere.
-             */
-            if (lowerCaseName.equals("timesroman")) {
-                font = findFont2D("serif", style, fallback);
-                fontNameCache.put(mapName, font);
-            }
-            sgEnv.register1dot0Fonts();
-            loaded1dot0Fonts = true;
-            Font2D ff = findFont2D(name, style, fallback);
-            return ff;
-        }
-
-        /* We check for application registered fonts before
-         * explicitly loading all fonts as if necessary the registration
-         * code will have done so anyway. And we don't want to needlessly
-         * load the actual files for all fonts.
-         * Just as for installed fonts we check for family before fullname.
-         * We do not add these fonts to fontNameCache for the
-         * app context case which eliminates the overhead of a per context
-         * cache for these.
-         */
-
-        if (fontsAreRegistered || fontsAreRegisteredPerAppContext) {
-            Hashtable<String, FontFamily> familyTable = null;
-            Hashtable<String, Font2D> nameTable;
-
-            if (fontsAreRegistered) {
-                familyTable = createdByFamilyName;
-                nameTable = createdByFullName;
-            } else {
-                AppContext appContext = AppContext.getAppContext();
-                familyTable =
-                    (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
-                nameTable =
-                    (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
-            }
-
-            family = familyTable.get(lowerCaseName);
-            if (family != null) {
-                font = family.getFontWithExactStyleMatch(style);
-                if (font == null) {
-                    font = family.getFont(style);
-                }
-                if (font == null) {
-                    font = family.getClosestStyle(style);
-                }
-                if (font != null) {
-                    if (fontsAreRegistered) {
-                        fontNameCache.put(mapName, font);
-                    }
-                    return font;
-                }
-            }
-            font = nameTable.get(lowerCaseName);
-            if (font != null) {
-                if (fontsAreRegistered) {
-                    fontNameCache.put(mapName, font);
-                }
-                return font;
-            }
-        }
-
-        /* If reach here and no match has been located, then if all fonts
-         * are not yet loaded, do so, and then recurse.
-         */
-        if (!loadedAllFonts) {
-            if (logging) {
-                logger.info("Load fonts looking for:" + name);
-            }
-            sgEnv.loadFonts();
-            loadedAllFonts = true;
-            return findFont2D(name, style, fallback);
-        }
-
-        if (!loadedAllFontFiles) {
-            if (logging) {
-                logger.info("Load font files looking for:" + name);
-            }
-            sgEnv.loadFontFiles();
-            loadedAllFontFiles = true;
-            return findFont2D(name, style, fallback);
-        }
-
-        /* The primary name is the locale default - ie not US/English but
-         * whatever is the default in this locale. This is the way it always
-         * has been but may be surprising to some developers if "Arial Regular"
-         * were hard-coded in their app and yet "Arial Regular" was not the
-         * default name. Fortunately for them, as a consequence of the JDK
-         * supporting returning names and family names for arbitrary locales,
-         * we also need to support searching all localised names for a match.
-         * But because this case of the name used to reference a font is not
-         * the same as the default for this locale is rare, it makes sense to
-         * search a much shorter list of default locale names and only go to
-         * a longer list of names in the event that no match was found.
-         * So add here code which searches localised names too.
-         * As in 1.4.x this happens only after loading all fonts, which
-         * is probably the right order.
-         */
-        if ((font = findFont2DAllLocales(name, style)) != null) {
-            fontNameCache.put(mapName, font);
-            return font;
-        }
-
-        /* Perhaps its a "compatibility" name - timesroman, helvetica,
-         * or courier, which 1.0 apps used for logical fonts.
-         * We look for these "late" after a loadFonts as we must not
-         * hide real fonts of these names.
-         * Map these appropriately:
-         * On windows this means according to the rules specified by the
-         * FontConfiguration : do it only for encoding==Cp1252
-         *
-         * REMIND: this is something we plan to remove.
-         */
-        if (isWindows) {
-            String compatName =
-                sgEnv.getFontConfiguration().getFallbackFamilyName(name, null);
-            if (compatName != null) {
-                font = findFont2D(compatName, style, fallback);
-                fontNameCache.put(mapName, font);
-                return font;
-            }
-        } else if (lowerCaseName.equals("timesroman")) {
-            font = findFont2D("serif", style, fallback);
-            fontNameCache.put(mapName, font);
-            return font;
-        } else if (lowerCaseName.equals("helvetica")) {
-            font = findFont2D("sansserif", style, fallback);
-            fontNameCache.put(mapName, font);
-            return font;
-        } else if (lowerCaseName.equals("courier")) {
-            font = findFont2D("monospaced", style, fallback);
-            fontNameCache.put(mapName, font);
-            return font;
-        }
-
-        if (logging) {
-            logger.info("No font found for:" + name);
-        }
-
-        switch (fallback) {
-        case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
-        case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
-        default: return null;
-        }
-    }
-
-    /* This method can be more efficient as it will only need to
-     * do the lookup once, and subsequent calls on the java.awt.Font
-     * instance can utilise the cached Font2D on that object.
-     * Its unfortunate it needs to be a native method, but the font2D
-     * variable has to be private.
-     */
-    public static native Font2D getFont2D(Font font);
-
-    /* Stuff below was in NativeFontWrapper and needed a new home */
-
-    /*
-     * Workaround for apps which are dependent on a font metrics bug
-     * in JDK 1.1. This is an unsupported win32 private setting.
-     */
-    public static boolean usePlatformFontMetrics() {
-        return usePlatformFontMetrics;
-    }
-
-    static native boolean getPlatformFontVar();
-
-    private static final short US_LCID = 0x0409;  // US English - default
-    private static Map<String, Short> lcidMap;
-
-    // Return a Microsoft LCID from the given Locale.
-    // Used when getting localized font data.
-
-    public static short getLCIDFromLocale(Locale locale) {
-        // optimize for common case
-        if (locale.equals(Locale.US)) {
-            return US_LCID;
-        }
-
-        if (lcidMap == null) {
-            createLCIDMap();
-        }
-
-        String key = locale.toString();
-        while (!"".equals(key)) {
-            Short lcidObject = (Short) lcidMap.get(key);
-            if (lcidObject != null) {
-                return lcidObject.shortValue();
-            }
-            int pos = key.lastIndexOf('_');
-            if (pos < 1) {
-                return US_LCID;
-            }
-            key = key.substring(0, pos);
-        }
-
-        return US_LCID;
-    }
-
-
-    private static void addLCIDMapEntry(Map<String, Short> map,
-                                        String key, short value) {
-        map.put(key, Short.valueOf(value));
-    }
-
-    private static synchronized void createLCIDMap() {
-        if (lcidMap != null) {
-            return;
-        }
-
-        Map<String, Short> map = new HashMap<String, Short>(200);
+    public Font2D findFont2D(String name, int style, int fallback);
 
-        // the following statements are derived from the langIDMap
-        // in src/windows/native/java/lang/java_props_md.c using the following
-        // awk script:
-        //    $1~/\/\*/   { next}
-        //    $3~/\?\?/   { next }
-        //    $3!~/_/     { next }
-        //    $1~/0x0409/ { next }
-        //    $1~/0x0c0a/ { next }
-        //    $1~/0x042c/ { next }
-        //    $1~/0x0443/ { next }
-        //    $1~/0x0812/ { next }
-        //    $1~/0x04/   { print "        addLCIDMapEntry(map, " substr($3, 0, 3) "\", (short) " substr($1, 0, 6) ");" ; next }
-        //    $3~/,/      { print "        addLCIDMapEntry(map, " $3  " (short) " substr($1, 0, 6) ");" ; next }
-        //                { print "        addLCIDMapEntry(map, " $3 ", (short) " substr($1, 0, 6) ");" ; next }
-        // The lines of this script:
-        // - eliminate comments
-        // - eliminate questionable locales
-        // - eliminate language-only locales
-        // - eliminate the default LCID value
-        // - eliminate a few other unneeded LCID values
-        // - print language-only locale entries for x04* LCID values
-        //   (apparently Microsoft doesn't use language-only LCID values -
-        //   see http://www.microsoft.com/OpenType/otspec/name.htm
-        // - print complete entries for all other LCID values
-        // Run
-        //     awk -f awk-script langIDMap > statements
-        addLCIDMapEntry(map, "ar", (short) 0x0401);
-        addLCIDMapEntry(map, "bg", (short) 0x0402);
-        addLCIDMapEntry(map, "ca", (short) 0x0403);
-        addLCIDMapEntry(map, "zh", (short) 0x0404);
-        addLCIDMapEntry(map, "cs", (short) 0x0405);
-        addLCIDMapEntry(map, "da", (short) 0x0406);
-        addLCIDMapEntry(map, "de", (short) 0x0407);
-        addLCIDMapEntry(map, "el", (short) 0x0408);
-        addLCIDMapEntry(map, "es", (short) 0x040a);
-        addLCIDMapEntry(map, "fi", (short) 0x040b);
-        addLCIDMapEntry(map, "fr", (short) 0x040c);
-        addLCIDMapEntry(map, "iw", (short) 0x040d);
-        addLCIDMapEntry(map, "hu", (short) 0x040e);
-        addLCIDMapEntry(map, "is", (short) 0x040f);
-        addLCIDMapEntry(map, "it", (short) 0x0410);
-        addLCIDMapEntry(map, "ja", (short) 0x0411);
-        addLCIDMapEntry(map, "ko", (short) 0x0412);
-        addLCIDMapEntry(map, "nl", (short) 0x0413);
-        addLCIDMapEntry(map, "no", (short) 0x0414);
-        addLCIDMapEntry(map, "pl", (short) 0x0415);
-        addLCIDMapEntry(map, "pt", (short) 0x0416);
-        addLCIDMapEntry(map, "rm", (short) 0x0417);
-        addLCIDMapEntry(map, "ro", (short) 0x0418);
-        addLCIDMapEntry(map, "ru", (short) 0x0419);
-        addLCIDMapEntry(map, "hr", (short) 0x041a);
-        addLCIDMapEntry(map, "sk", (short) 0x041b);
-        addLCIDMapEntry(map, "sq", (short) 0x041c);
-        addLCIDMapEntry(map, "sv", (short) 0x041d);
-        addLCIDMapEntry(map, "th", (short) 0x041e);
-        addLCIDMapEntry(map, "tr", (short) 0x041f);
-        addLCIDMapEntry(map, "ur", (short) 0x0420);
-        addLCIDMapEntry(map, "in", (short) 0x0421);
-        addLCIDMapEntry(map, "uk", (short) 0x0422);
-        addLCIDMapEntry(map, "be", (short) 0x0423);
-        addLCIDMapEntry(map, "sl", (short) 0x0424);
-        addLCIDMapEntry(map, "et", (short) 0x0425);
-        addLCIDMapEntry(map, "lv", (short) 0x0426);
-        addLCIDMapEntry(map, "lt", (short) 0x0427);
-        addLCIDMapEntry(map, "fa", (short) 0x0429);
-        addLCIDMapEntry(map, "vi", (short) 0x042a);
-        addLCIDMapEntry(map, "hy", (short) 0x042b);
-        addLCIDMapEntry(map, "eu", (short) 0x042d);
-        addLCIDMapEntry(map, "mk", (short) 0x042f);
-        addLCIDMapEntry(map, "tn", (short) 0x0432);
-        addLCIDMapEntry(map, "xh", (short) 0x0434);
-        addLCIDMapEntry(map, "zu", (short) 0x0435);
-        addLCIDMapEntry(map, "af", (short) 0x0436);
-        addLCIDMapEntry(map, "ka", (short) 0x0437);
-        addLCIDMapEntry(map, "fo", (short) 0x0438);
-        addLCIDMapEntry(map, "hi", (short) 0x0439);
-        addLCIDMapEntry(map, "mt", (short) 0x043a);
-        addLCIDMapEntry(map, "se", (short) 0x043b);
-        addLCIDMapEntry(map, "gd", (short) 0x043c);
-        addLCIDMapEntry(map, "ms", (short) 0x043e);
-        addLCIDMapEntry(map, "kk", (short) 0x043f);
-        addLCIDMapEntry(map, "ky", (short) 0x0440);
-        addLCIDMapEntry(map, "sw", (short) 0x0441);
-        addLCIDMapEntry(map, "tt", (short) 0x0444);
-        addLCIDMapEntry(map, "bn", (short) 0x0445);
-        addLCIDMapEntry(map, "pa", (short) 0x0446);
-        addLCIDMapEntry(map, "gu", (short) 0x0447);
-        addLCIDMapEntry(map, "ta", (short) 0x0449);
-        addLCIDMapEntry(map, "te", (short) 0x044a);
-        addLCIDMapEntry(map, "kn", (short) 0x044b);
-        addLCIDMapEntry(map, "ml", (short) 0x044c);
-        addLCIDMapEntry(map, "mr", (short) 0x044e);
-        addLCIDMapEntry(map, "sa", (short) 0x044f);
-        addLCIDMapEntry(map, "mn", (short) 0x0450);
-        addLCIDMapEntry(map, "cy", (short) 0x0452);
-        addLCIDMapEntry(map, "gl", (short) 0x0456);
-        addLCIDMapEntry(map, "dv", (short) 0x0465);
-        addLCIDMapEntry(map, "qu", (short) 0x046b);
-        addLCIDMapEntry(map, "mi", (short) 0x0481);
-        addLCIDMapEntry(map, "ar_IQ", (short) 0x0801);
-        addLCIDMapEntry(map, "zh_CN", (short) 0x0804);
-        addLCIDMapEntry(map, "de_CH", (short) 0x0807);
-        addLCIDMapEntry(map, "en_GB", (short) 0x0809);
-        addLCIDMapEntry(map, "es_MX", (short) 0x080a);
-        addLCIDMapEntry(map, "fr_BE", (short) 0x080c);
-        addLCIDMapEntry(map, "it_CH", (short) 0x0810);
-        addLCIDMapEntry(map, "nl_BE", (short) 0x0813);
-        addLCIDMapEntry(map, "no_NO_NY", (short) 0x0814);
-        addLCIDMapEntry(map, "pt_PT", (short) 0x0816);
-        addLCIDMapEntry(map, "ro_MD", (short) 0x0818);
-        addLCIDMapEntry(map, "ru_MD", (short) 0x0819);
-        addLCIDMapEntry(map, "sr_CS", (short) 0x081a);
-        addLCIDMapEntry(map, "sv_FI", (short) 0x081d);
-        addLCIDMapEntry(map, "az_AZ", (short) 0x082c);
-        addLCIDMapEntry(map, "se_SE", (short) 0x083b);
-        addLCIDMapEntry(map, "ga_IE", (short) 0x083c);
-        addLCIDMapEntry(map, "ms_BN", (short) 0x083e);
-        addLCIDMapEntry(map, "uz_UZ", (short) 0x0843);
-        addLCIDMapEntry(map, "qu_EC", (short) 0x086b);
-        addLCIDMapEntry(map, "ar_EG", (short) 0x0c01);
-        addLCIDMapEntry(map, "zh_HK", (short) 0x0c04);
-        addLCIDMapEntry(map, "de_AT", (short) 0x0c07);
-        addLCIDMapEntry(map, "en_AU", (short) 0x0c09);
-        addLCIDMapEntry(map, "fr_CA", (short) 0x0c0c);
-        addLCIDMapEntry(map, "sr_CS", (short) 0x0c1a);
-        addLCIDMapEntry(map, "se_FI", (short) 0x0c3b);
-        addLCIDMapEntry(map, "qu_PE", (short) 0x0c6b);
-        addLCIDMapEntry(map, "ar_LY", (short) 0x1001);
-        addLCIDMapEntry(map, "zh_SG", (short) 0x1004);
-        addLCIDMapEntry(map, "de_LU", (short) 0x1007);
-        addLCIDMapEntry(map, "en_CA", (short) 0x1009);
-        addLCIDMapEntry(map, "es_GT", (short) 0x100a);
-        addLCIDMapEntry(map, "fr_CH", (short) 0x100c);
-        addLCIDMapEntry(map, "hr_BA", (short) 0x101a);
-        addLCIDMapEntry(map, "ar_DZ", (short) 0x1401);
-        addLCIDMapEntry(map, "zh_MO", (short) 0x1404);
-        addLCIDMapEntry(map, "de_LI", (short) 0x1407);
-        addLCIDMapEntry(map, "en_NZ", (short) 0x1409);
-        addLCIDMapEntry(map, "es_CR", (short) 0x140a);
-        addLCIDMapEntry(map, "fr_LU", (short) 0x140c);
-        addLCIDMapEntry(map, "bs_BA", (short) 0x141a);
-        addLCIDMapEntry(map, "ar_MA", (short) 0x1801);
-        addLCIDMapEntry(map, "en_IE", (short) 0x1809);
-        addLCIDMapEntry(map, "es_PA", (short) 0x180a);
-        addLCIDMapEntry(map, "fr_MC", (short) 0x180c);
-        addLCIDMapEntry(map, "sr_BA", (short) 0x181a);
-        addLCIDMapEntry(map, "ar_TN", (short) 0x1c01);
-        addLCIDMapEntry(map, "en_ZA", (short) 0x1c09);
-        addLCIDMapEntry(map, "es_DO", (short) 0x1c0a);
-        addLCIDMapEntry(map, "sr_BA", (short) 0x1c1a);
-        addLCIDMapEntry(map, "ar_OM", (short) 0x2001);
-        addLCIDMapEntry(map, "en_JM", (short) 0x2009);
-        addLCIDMapEntry(map, "es_VE", (short) 0x200a);
-        addLCIDMapEntry(map, "ar_YE", (short) 0x2401);
-        addLCIDMapEntry(map, "es_CO", (short) 0x240a);
-        addLCIDMapEntry(map, "ar_SY", (short) 0x2801);
-        addLCIDMapEntry(map, "en_BZ", (short) 0x2809);
-        addLCIDMapEntry(map, "es_PE", (short) 0x280a);
-        addLCIDMapEntry(map, "ar_JO", (short) 0x2c01);
-        addLCIDMapEntry(map, "en_TT", (short) 0x2c09);
-        addLCIDMapEntry(map, "es_AR", (short) 0x2c0a);
-        addLCIDMapEntry(map, "ar_LB", (short) 0x3001);
-        addLCIDMapEntry(map, "en_ZW", (short) 0x3009);
-        addLCIDMapEntry(map, "es_EC", (short) 0x300a);
-        addLCIDMapEntry(map, "ar_KW", (short) 0x3401);
-        addLCIDMapEntry(map, "en_PH", (short) 0x3409);
-        addLCIDMapEntry(map, "es_CL", (short) 0x340a);
-        addLCIDMapEntry(map, "ar_AE", (short) 0x3801);
-        addLCIDMapEntry(map, "es_UY", (short) 0x380a);
-        addLCIDMapEntry(map, "ar_BH", (short) 0x3c01);
-        addLCIDMapEntry(map, "es_PY", (short) 0x3c0a);
-        addLCIDMapEntry(map, "ar_QA", (short) 0x4001);
-        addLCIDMapEntry(map, "es_BO", (short) 0x400a);
-        addLCIDMapEntry(map, "es_SV", (short) 0x440a);
-        addLCIDMapEntry(map, "es_HN", (short) 0x480a);
-        addLCIDMapEntry(map, "es_NI", (short) 0x4c0a);
-        addLCIDMapEntry(map, "es_PR", (short) 0x500a);
-
-        lcidMap = map;
-    }
-
-    public static int getNumFonts() {
-        return physicalFonts.size()+maxCompFont;
-    }
-
-    private static boolean fontSupportsEncoding(Font font, String encoding) {
-        return getFont2D(font).supportsEncoding(encoding);
-    }
-
-    public synchronized static native String getFontPath(boolean noType1Fonts);
-    public synchronized static native void setNativeFontPath(String fontPath);
-
-
-    private static Thread fileCloser = null;
-    static Vector<File> tmpFontFiles = null;
-
-    public static Font2D createFont2D(File fontFile, int fontFormat,
-                                      boolean isCopy,
-                                      CreatedFontTracker tracker)
-        throws FontFormatException {
-
-        String fontFilePath = fontFile.getPath();
-        FileFont font2D = null;
-        final File fFile = fontFile;
-        final CreatedFontTracker _tracker = tracker;
-        try {
-            switch (fontFormat) {
-            case Font.TRUETYPE_FONT:
-                font2D = new TrueTypeFont(fontFilePath, null, 0, true);
-                break;
-            case Font.TYPE1_FONT:
-                font2D = new Type1Font(fontFilePath, null, isCopy);
-                break;
-            default:
-                throw new FontFormatException("Unrecognised Font Format");
-            }
-        } catch (FontFormatException e) {
-            if (isCopy) {
-                java.security.AccessController.doPrivileged(
-                     new java.security.PrivilegedAction() {
-                          public Object run() {
-                              if (_tracker != null) {
-                                  _tracker.subBytes((int)fFile.length());
-                              }
-                              fFile.delete();
-                              return null;
-                          }
-                });
-            }
-            throw(e);
-        }
-        if (isCopy) {
-            font2D.setFileToRemove(fontFile, tracker);
-            synchronized (FontManager.class) {
-
-                if (tmpFontFiles == null) {
-                    tmpFontFiles = new Vector<File>();
-                }
-                tmpFontFiles.add(fontFile);
-
-                if (fileCloser == null) {
-                    final Runnable fileCloserRunnable = new Runnable() {
-                      public void run() {
-                         java.security.AccessController.doPrivileged(
-                         new java.security.PrivilegedAction() {
-                         public Object run() {
-
-                            for (int i=0;i<CHANNELPOOLSIZE;i++) {
-                                if (fontFileCache[i] != null) {
-                                    try {
-                                        fontFileCache[i].close();
-                                    } catch (Exception e) {
-                                    }
-                                }
-                            }
-                            if (tmpFontFiles != null) {
-                                File[] files = new File[tmpFontFiles.size()];
-                                files = tmpFontFiles.toArray(files);
-                                for (int f=0; f<files.length;f++) {
-                                    try {
-                                        files[f].delete();
-                                    } catch (Exception e) {
-                                    }
-                                }
-                            }
-
-                            return null;
-                          }
+    /**
+     * Creates a Font2D for the specified font file, that is expected
+     * to be in the specified font format (according to the constants
+     * in java.awt.Font). The parameter {@code isCopy} is set to true
+     * when the specified font file is actually a copy of the font data
+     * and needs to be deleted afterwards. This method is called
+     * for the Font.createFont() methods.
+     *
+     * @param fontFile the file holding the font data
+     * @param fontFormat the expected font format
+     * @param isCopy {@code true} if the file is a copy and needs to be
+     *        deleted, {@code false} otherwise
+     *
+     * @return the created Font2D instance
+     */
+    public Font2D createFont2D(File fontFile, int fontFormat,
+                               boolean isCopy, CreatedFontTracker tracker)
+        throws FontFormatException;
 
-                          });
-                      }
-                    };
-                    java.security.AccessController.doPrivileged(
-                       new java.security.PrivilegedAction() {
-                          public Object run() {
-                              /* The thread must be a member of a thread group
-                               * which will not get GCed before VM exit.
-                               * Make its parent the top-level thread group.
-                               */
-                              ThreadGroup tg =
-                                  Thread.currentThread().getThreadGroup();
-                              for (ThreadGroup tgn = tg;
-                                   tgn != null;
-                                   tg = tgn, tgn = tg.getParent());
-                              fileCloser = new Thread(tg, fileCloserRunnable);
-                              Runtime.getRuntime().addShutdownHook(fileCloser);
-                              return null;
-                          }
-                    });
-                }
-            }
-        }
-        return font2D;
-    }
-
-    /* remind: used in X11GraphicsEnvironment and called often enough
-     * that we ought to obsolete this code
-     */
-    public synchronized static String getFullNameByFileName(String fileName) {
-        PhysicalFont[] physFonts = getPhysicalFonts();
-        for (int i=0;i<physFonts.length;i++) {
-            if (physFonts[i].platName.equals(fileName)) {
-                return (physFonts[i].getFontName(null));
-            }
-        }
-        return null;
-    }
-
-    /*
-     * This is called when font is determined to be invalid/bad.
-     * It designed to be called (for example) by the font scaler
-     * when in processing a font file it is discovered to be incorrect.
-     * This is different than the case where fonts are discovered to
-     * be incorrect during initial verification, as such fonts are
-     * never registered.
-     * Handles to this font held are re-directed to a default font.
-     * This default may not be an ideal substitute buts it better than
-     * crashing This code assumes a PhysicalFont parameter as it doesn't
-     * make sense for a Composite to be "bad".
-     */
-    public static synchronized void deRegisterBadFont(Font2D font2D) {
-        if (!(font2D instanceof PhysicalFont)) {
-            /* We should never reach here, but just in case */
-            return;
-        } else {
-            if (logging) {
-                logger.severe("Deregister bad font: " + font2D);
-            }
-            replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
-        }
-    }
-
-    /*
-     * This encapsulates all the work that needs to be done when a
-     * Font2D is replaced by a different Font2D.
-     */
-    public static synchronized void replaceFont(PhysicalFont oldFont,
-                                                PhysicalFont newFont) {
-
-        if (oldFont.handle.font2D != oldFont) {
-            /* already done */
-            return;
-        }
-
-        /* If we try to replace the font with itself, that won't work,
-         * so pick any alternative physical font
-         */
-        if (oldFont == newFont) {
-            if (logging) {
-                logger.severe("Can't replace bad font with itself " + oldFont);
-            }
-            PhysicalFont[] physFonts = getPhysicalFonts();
-            for (int i=0; i<physFonts.length;i++) {
-                if (physFonts[i] != newFont) {
-                    newFont = physFonts[i];
-                    break;
-                }
-            }
-            if (oldFont == newFont) {
-                if (logging) {
-                    logger.severe("This is bad. No good physicalFonts found.");
-                }
-                return;
-            }
-        }
-
-        /* eliminate references to this font, so it won't be located
-         * by future callers, and will be eligible for GC when all
-         * references are removed
-         */
-        oldFont.handle.font2D = newFont;
-        physicalFonts.remove(oldFont.fullName);
-        fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
-        FontFamily.remove(oldFont);
-
-        if (localeFullNamesToFont != null) {
-            Map.Entry[] mapEntries =
-                (Map.Entry[])localeFullNamesToFont.entrySet().
-                toArray(new Map.Entry[0]);
-            /* Should I be replacing these, or just I just remove
-             * the names from the map?
-             */
-            for (int i=0; i<mapEntries.length;i++) {
-                if (mapEntries[i].getValue() == oldFont) {
-                    try {
-                        mapEntries[i].setValue(newFont);
-                    } catch (Exception e) {
-                        /* some maps don't support this operation.
-                         * In this case just give up and remove the entry.
-                         */
-                        localeFullNamesToFont.remove(mapEntries[i].getKey());
-                    }
-                }
-            }
-        }
-
-        for (int i=0; i<maxCompFont; i++) {
-            /* Deferred initialization of composites shouldn't be
-             * a problem for this case, since a font must have been
-             * initialised to be discovered to be bad.
-             * Some JRE composites on Solaris use two versions of the same
-             * font. The replaced font isn't bad, just "smaller" so there's
-             * no need to make the slot point to the new font.
-             * Since composites have a direct reference to the Font2D (not
-             * via a handle) making this substitution is not safe and could
-             * cause an additional problem and so this substitution is
-             * warranted only when a font is truly "bad" and could cause
-             * a crash. So we now replace it only if its being substituted
-             * with some font other than a fontconfig rank font
-             * Since in practice a substitution will have the same rank
-             * this may never happen, but the code is safer even if its
-             * also now a no-op.
-             * The only obvious "glitch" from this stems from the current
-             * implementation that when asked for the number of glyphs in a
-             * composite it lies and returns the number in slot 0 because
-             * composite glyphs aren't contiguous. Since we live with that
-             * we can live with the glitch that depending on how it was
-             * initialised a composite may return different values for this.
-             * Fixing the issues with composite glyph ids is tricky as
-             * there are exclusion ranges and unlike other fonts even the
-             * true "numGlyphs" isn't a contiguous range. Likely the only
-             * solution is an API that returns an array of glyph ranges
-             * which takes precedence over the existing API. That might
-             * also need to address excluding ranges which represent a
-             * code point supported by an earlier component.
-             */
-            if (newFont.getRank() > Font2D.FONT_CONFIG_RANK) {
-                compFonts[i].replaceComponentFont(oldFont, newFont);
-            }
-        }
-    }
-
-    private static synchronized void loadLocaleNames() {
-        if (localeFullNamesToFont != null) {
-            return;
-        }
-        localeFullNamesToFont = new HashMap<String, TrueTypeFont>();
-        Font2D[] fonts = getRegisteredFonts();
-        for (int i=0; i<fonts.length; i++) {
-            if (fonts[i] instanceof TrueTypeFont) {
-                TrueTypeFont ttf = (TrueTypeFont)fonts[i];
-                String[] fullNames = ttf.getAllFullNames();
-                for (int n=0; n<fullNames.length; n++) {
-                    localeFullNamesToFont.put(fullNames[n], ttf);
-                }
-                FontFamily family = FontFamily.getFamily(ttf.familyName);
-                if (family != null) {
-                    FontFamily.addLocaleNames(family, ttf.getAllFamilyNames());
-                }
-            }
-        }
-    }
-
-    /* This replicate the core logic of findFont2D but operates on
-     * all the locale names. This hasn't been merged into findFont2D to
-     * keep the logic simpler and reduce overhead, since this case is
-     * almost never used. The main case in which it is called is when
-     * a bogus font name is used and we need to check all possible names
-     * before returning the default case.
-     */
-    private static Font2D findFont2DAllLocales(String name, int style) {
-
-        if (logging) {
-            logger.info("Searching localised font names for:" + name);
-        }
-
-        /* If reach here and no match has been located, then if we have
-         * not yet built the map of localeFullNamesToFont for TT fonts, do so
-         * now. This method must be called after all fonts have been loaded.
-         */
-        if (localeFullNamesToFont == null) {
-            loadLocaleNames();
-        }
-        String lowerCaseName = name.toLowerCase();
-        Font2D font = null;
-
-        /* First see if its a family name. */
-        FontFamily family = FontFamily.getLocaleFamily(lowerCaseName);
-        if (family != null) {
-          font = family.getFont(style);
-          if (font == null) {
-            font = family.getClosestStyle(style);
-          }
-          if (font != null) {
-              return font;
-          }
-        }
-
-        /* If it wasn't a family name, it should be a full name. */
-        synchronized (FontManager.class) {
-            font = localeFullNamesToFont.get(name);
-        }
-        if (font != null) {
-            if (font.style == style || style == Font.PLAIN) {
-                return font;
-            } else {
-                family = FontFamily.getFamily(font.getFamilyName(null));
-                if (family != null) {
-                    Font2D familyFont = family.getFont(style);
-                    /* We exactly matched the requested style, use it! */
-                    if (familyFont != null) {
-                        return familyFont;
-                    } else {
-                        familyFont = family.getClosestStyle(style);
-                        if (familyFont != null) {
-                            /* The next check is perhaps one
-                             * that shouldn't be done. ie if we get this
-                             * far we have probably as close a match as we
-                             * are going to get. We could load all fonts to
-                             * see if somehow some parts of the family are
-                             * loaded but not all of it.
-                             * This check is commented out for now.
-                             */
-                            if (!familyFont.canDoStyle(style)) {
-                                familyFont = null;
-                            }
-                            return familyFont;
-                        }
-                    }
-                }
-            }
-        }
-        return font;
-    }
-
-    /* Supporting "alternate" composite fonts on 2D graphics objects
-     * is accessed by the application by calling methods on the local
-     * GraphicsEnvironment. The overall implementation is described
-     * in one place, here, since otherwise the implementation is spread
-     * around it may be difficult to track.
-     * The methods below call into SunGraphicsEnvironment which creates a
-     * new FontConfiguration instance. The FontConfiguration class,
-     * and its platform sub-classes are updated to take parameters requesting
-     * these behaviours. This is then used to create new composite font
-     * instances. Since this calls the initCompositeFont method in
-     * SunGraphicsEnvironment it performs the same initialization as is
-     * performed normally. There may be some duplication of effort, but
-     * that code is already written to be able to perform properly if called
-     * to duplicate work. The main difference is that if we detect we are
-     * running in an applet/browser/Java plugin environment these new fonts
-     * are not placed in the "default" maps but into an AppContext instance.
-     * The font lookup mechanism in java.awt.Font.getFont2D() is also updated
-     * so that look-up for composite fonts will in that case always
-     * do a lookup rather than returning a cached result.
-     * This is inefficient but necessary else singleton java.awt.Font
-     * instances would not retrieve the correct Font2D for the appcontext.
-     * sun.font.FontManager.findFont2D is also updated to that it uses
-     * a name map cache specific to that appcontext.
-     *
-     * Getting an AppContext is expensive, so there is a global variable
-     * that records whether these methods have ever been called and can
-     * avoid the expense for almost all applications. Once the correct
-     * CompositeFont is associated with the Font, everything should work
-     * through existing mechanisms.
-     * A special case is that GraphicsEnvironment.getAllFonts() must
-     * return an AppContext specific list.
-     *
-     * Calling the methods below is "heavyweight" but it is expected that
-     * these methods will be called very rarely.
-     *
+    /**
      * If usingPerAppContextComposites is true, we are in "applet"
      * (eg browser) enviroment and at least one context has selected
      * an alternate composite font behaviour.
-     * If usingAlternateComposites is true, we are not in an "applet"
-     * environment and the (single) application has selected
-     * an alternate composite font behaviour.
-     *
-     * - Printing: The implementation delegates logical fonts to an AWT
-     * mechanism which cannot use these alternate configurations.
-     * We can detect that alternate fonts are in use and back-off to 2D, but
-     * that uses outlines. Much of this can be fixed with additional work
-     * but that may have to wait. The results should be correct, just not
-     * optimal.
-     */
-    private static final Object altJAFontKey       = new Object();
-    private static final Object localeFontKey       = new Object();
-    private static final Object proportionalFontKey = new Object();
-    public static boolean usingPerAppContextComposites = false;
-    private static boolean usingAlternateComposites = false;
-
-    /* These values are used only if we are running as a standalone
-     * application, as determined by maybeMultiAppContext();
-     */
-    private static boolean gAltJAFont = false;
-    private static boolean gLocalePref = false;
-    private static boolean gPropPref = false;
-
-    /* This method doesn't check if alternates are selected in this app
-     * context. Its used by the FontMetrics caching code which in such
-     * a case cannot retrieve a cached metrics solely on the basis of
-     * the Font.equals() method since it needs to also check if the Font2D
-     * is the same.
-     * We also use non-standard composites for Swing native L&F fonts on
-     * Windows. In that case the policy is that the metrics reported are
-     * based solely on the physical font in the first slot which is the
-     * visible java.awt.Font. So in that case the metrics cache which tests
-     * the Font does what we want. In the near future when we expand the GTK
-     * logical font definitions we may need to revisit this if GTK reports
-     * combined metrics instead. For now though this test can be simple.
-     */
-    static boolean maybeUsingAlternateCompositeFonts() {
-       return usingAlternateComposites || usingPerAppContextComposites;
-    }
-
-    public static boolean usingAlternateCompositeFonts() {
-        return (usingAlternateComposites ||
-                (usingPerAppContextComposites &&
-                AppContext.getAppContext().get(CompositeFont.class) != null));
-    }
-
-    private static boolean maybeMultiAppContext() {
-        Boolean appletSM = (Boolean)
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
-                        public Object run() {
-                            SecurityManager sm = System.getSecurityManager();
-                            return new Boolean
-                                (sm instanceof sun.applet.AppletSecurity);
-                        }
-                    });
-        return appletSM.booleanValue();
-    }
-
-    /* Modifies the behaviour of a subsequent call to preferLocaleFonts()
-     * to use Mincho instead of Gothic for dialoginput in JA locales
-     * on windows. Not needed on other platforms.
-     */
-    public static synchronized void useAlternateFontforJALocales() {
-
-        if (!isWindows) {
-            return;
-        }
-
-        initSGEnv();
-        if (!maybeMultiAppContext()) {
-            gAltJAFont = true;
-        } else {
-            AppContext appContext = AppContext.getAppContext();
-            appContext.put(altJAFontKey, altJAFontKey);
-        }
-    }
-
-    public static boolean usingAlternateFontforJALocales() {
-        if (!maybeMultiAppContext()) {
-            return gAltJAFont;
-        } else {
-            AppContext appContext = AppContext.getAppContext();
-            return appContext.get(altJAFontKey) == altJAFontKey;
-        }
-    }
-
-    public static synchronized void preferLocaleFonts() {
-
-        initSGEnv();
-
-        /* Test if re-ordering will have any effect */
-        if (!FontConfiguration.willReorderForStartupLocale()) {
-            return;
-        }
-
-        if (!maybeMultiAppContext()) {
-            if (gLocalePref == true) {
-                return;
-            }
-            gLocalePref = true;
-            sgEnv.createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
-            usingAlternateComposites = true;
-        } else {
-            AppContext appContext = AppContext.getAppContext();
-            if (appContext.get(localeFontKey) == localeFontKey) {
-                return;
-            }
-            appContext.put(localeFontKey, localeFontKey);
-            boolean acPropPref =
-                appContext.get(proportionalFontKey) == proportionalFontKey;
-            ConcurrentHashMap<String, Font2D>
-                altNameCache = new ConcurrentHashMap<String, Font2D> ();
-            /* If there is an existing hashtable, we can drop it. */
-            appContext.put(CompositeFont.class, altNameCache);
-            usingPerAppContextComposites = true;
-            sgEnv.createCompositeFonts(altNameCache, true, acPropPref);
-        }
-    }
-
-    public static synchronized void preferProportionalFonts() {
-
-        /* If no proportional fonts are configured, there's no need
-         * to take any action.
-         */
-        if (!FontConfiguration.hasMonoToPropMap()) {
-            return;
-        }
-
-        initSGEnv();
-
-        if (!maybeMultiAppContext()) {
-            if (gPropPref == true) {
-                return;
-            }
-            gPropPref = true;
-            sgEnv.createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
-            usingAlternateComposites = true;
-        } else {
-            AppContext appContext = AppContext.getAppContext();
-            if (appContext.get(proportionalFontKey) == proportionalFontKey) {
-                return;
-            }
-            appContext.put(proportionalFontKey, proportionalFontKey);
-            boolean acLocalePref =
-                appContext.get(localeFontKey) == localeFontKey;
-            ConcurrentHashMap<String, Font2D>
-                altNameCache = new ConcurrentHashMap<String, Font2D> ();
-            /* If there is an existing hashtable, we can drop it. */
-            appContext.put(CompositeFont.class, altNameCache);
-            usingPerAppContextComposites = true;
-            sgEnv.createCompositeFonts(altNameCache, acLocalePref, true);
-        }
-    }
-
-    private static HashSet<String> installedNames = null;
-    private static HashSet<String> getInstalledNames() {
-        if (installedNames == null) {
-           Locale l = sgEnv.getSystemStartupLocale();
-           String[] installedFamilies = sgEnv.getInstalledFontFamilyNames(l);
-           Font[] installedFonts = sgEnv.getAllInstalledFonts();
-           HashSet<String> names = new HashSet<String>();
-           for (int i=0; i<installedFamilies.length; i++) {
-               names.add(installedFamilies[i].toLowerCase(l));
-           }
-           for (int i=0; i<installedFonts.length; i++) {
-               names.add(installedFonts[i].getFontName(l).toLowerCase(l));
-           }
-           installedNames = names;
-        }
-        return installedNames;
-    }
-
-    /* Keys are used to lookup per-AppContext Hashtables */
-    private static final Object regFamilyKey  = new Object();
-    private static final Object regFullNameKey = new Object();
-    private static Hashtable<String,FontFamily> createdByFamilyName;
-    private static Hashtable<String,Font2D>     createdByFullName;
-    private static boolean fontsAreRegistered = false;
-    private static boolean fontsAreRegisteredPerAppContext = false;
-
-    public static boolean registerFont(Font font) {
-        /* This method should not be called with "null".
-         * It is the caller's responsibility to ensure that.
-         */
-        if (font == null) {
-            return false;
-        }
-
-        /* Initialise these objects only once we start to use this API */
-        synchronized (regFamilyKey) {
-            if (createdByFamilyName == null) {
-                createdByFamilyName = new Hashtable<String,FontFamily>();
-                createdByFullName = new Hashtable<String,Font2D>();
-            }
-        }
-
-        if (!isCreatedFont(font)) {
-            return false;
-        }
-        if (sgEnv == null) {
-            initSGEnv();
-        }
-        /* We want to ensure that this font cannot override existing
-         * installed fonts. Check these conditions :
-         * - family name is not that of an installed font
-         * - full name is not that of an installed font
-         * - family name is not the same as the full name of an installed font
-         * - full name is not the same as the family name of an installed font
-         * The last two of these may initially look odd but the reason is
-         * that (unfortunately) Font constructors do not distinuguish these.
-         * An extreme example of such a problem would be a font which has
-         * family name "Dialog.Plain" and full name of "Dialog".
-         * The one arguably overly stringent restriction here is that if an
-         * application wants to supply a new member of an existing family
-         * It will get rejected. But since the JRE can perform synthetic
-         * styling in many cases its not necessary.
-         * We don't apply the same logic to registered fonts. If apps want
-         * to do this lets assume they have a reason. It won't cause problems
-         * except for themselves.
-         */
-        HashSet<String> names = getInstalledNames();
-        Locale l = sgEnv.getSystemStartupLocale();
-        String familyName = font.getFamily(l).toLowerCase();
-        String fullName = font.getFontName(l).toLowerCase();
-        if (names.contains(familyName) || names.contains(fullName)) {
-            return false;
-        }
-
-        /* Checks passed, now register the font */
-        Hashtable<String,FontFamily> familyTable;
-        Hashtable<String,Font2D> fullNameTable;
-        if (!maybeMultiAppContext()) {
-            familyTable = createdByFamilyName;
-            fullNameTable = createdByFullName;
-            fontsAreRegistered = true;
-        } else {
-            AppContext appContext = AppContext.getAppContext();
-            familyTable =
-                (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
-            fullNameTable =
-                (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
-            if (familyTable == null) {
-                familyTable = new Hashtable<String,FontFamily>();
-                fullNameTable = new Hashtable<String,Font2D>();
-                appContext.put(regFamilyKey, familyTable);
-                appContext.put(regFullNameKey, fullNameTable);
-            }
-            fontsAreRegisteredPerAppContext = true;
-        }
-        /* Create the FontFamily and add font to the tables */
-        Font2D font2D = getFont2D(font);
-        int style = font2D.getStyle();
-        FontFamily family = familyTable.get(familyName);
-        if (family == null) {
-            family = new FontFamily(font.getFamily(l));
-            familyTable.put(familyName, family);
-        }
-        /* Remove name cache entries if not using app contexts.
-         * To accommodate a case where code may have registered first a plain
-         * family member and then used it and is now registering a bold family
-         * member, we need to remove all members of the family, so that the
-         * new style can get picked up rather than continuing to synthesise.
-         */
-        if (fontsAreRegistered) {
-            removeFromCache(family.getFont(Font.PLAIN));
-            removeFromCache(family.getFont(Font.BOLD));
-            removeFromCache(family.getFont(Font.ITALIC));
-            removeFromCache(family.getFont(Font.BOLD|Font.ITALIC));
-            removeFromCache(fullNameTable.get(fullName));
-        }
-        family.setFont(font2D, style);
-        fullNameTable.put(fullName, font2D);
-        return true;
-    }
-
-    /* Remove from the name cache all references to the Font2D */
-    private static void removeFromCache(Font2D font) {
-        if (font == null) {
-            return;
-        }
-        String[] keys = (String[])(fontNameCache.keySet().toArray(STR_ARRAY));
-        for (int k=0; k<keys.length;k++) {
-            if (fontNameCache.get(keys[k]) == font) {
-                fontNameCache.remove(keys[k]);
-            }
-        }
-    }
-
-    // It may look odd to use TreeMap but its more convenient to the caller.
-    public static TreeMap<String, String> getCreatedFontFamilyNames() {
-
-        Hashtable<String,FontFamily> familyTable;
-        if (fontsAreRegistered) {
-            familyTable = createdByFamilyName;
-        } else if (fontsAreRegisteredPerAppContext) {
-            AppContext appContext = AppContext.getAppContext();
-            familyTable =
-                (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
-        } else {
-            return null;
-        }
-
-        Locale l = sgEnv.getSystemStartupLocale();
-        synchronized (familyTable) {
-            TreeMap<String, String> map = new TreeMap<String, String>();
-            for (FontFamily f : familyTable.values()) {
-                Font2D font2D = f.getFont(Font.PLAIN);
-                if (font2D == null) {
-                    font2D = f.getClosestStyle(Font.PLAIN);
-                }
-                String name = font2D.getFamilyName(l);
-                map.put(name.toLowerCase(l), name);
-            }
-            return map;
-        }
-    }
-
-    public static Font[] getCreatedFonts() {
-
-        Hashtable<String,Font2D> nameTable;
-        if (fontsAreRegistered) {
-            nameTable = createdByFullName;
-        } else if (fontsAreRegisteredPerAppContext) {
-            AppContext appContext = AppContext.getAppContext();
-            nameTable =
-                (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
-        } else {
-            return null;
-        }
-
-        Locale l = sgEnv.getSystemStartupLocale();
-        synchronized (nameTable) {
-            Font[] fonts = new Font[nameTable.size()];
-            int i=0;
-            for (Font2D font2D : nameTable.values()) {
-                fonts[i++] = new Font(font2D.getFontName(l), Font.PLAIN, 1);
-            }
-            return fonts;
-        }
-    }
-
-    /* Begin support for GTK Look and Feel - query libfontconfig and
-     * return a composite Font to Swing that uses the desktop font(s).
-     */
-
-    /* A small "map" from GTK/fontconfig names to the equivalent JDK
-     * logical font name.
-    */
-    private static final String[][] nameMap = {
-        {"sans",       "sansserif"},
-        {"sans-serif", "sansserif"},
-        {"serif",      "serif"},
-        {"monospace",  "monospaced"}
-    };
-
-    public static String mapFcName(String name) {
-        for (int i = 0; i < nameMap.length; i++) {
-            if (name.equals(nameMap[i][0])) {
-                return nameMap[i][1];
-            }
-        }
-        return null;
-    }
-
-    /* fontconfig recognises slants roman, italic, as well as oblique,
-     * and a slew of weights, where the ones that matter here are
-     * regular and bold.
-     * To fully qualify what we want, we can for example ask for (eg)
-     * Font.PLAIN             : "serif:regular:roman"
-     * Font.BOLD              : "serif:bold:roman"
-     * Font.ITALIC            : "serif:regular:italic"
-     * Font.BOLD|Font.ITALIC  : "serif:bold:italic"
-     */
-    private static String[] fontConfigNames = {
-        "sans:regular:roman",
-        "sans:bold:roman",
-        "sans:regular:italic",
-        "sans:bold:italic",
-
-        "serif:regular:roman",
-        "serif:bold:roman",
-        "serif:regular:italic",
-        "serif:bold:italic",
-
-        "monospace:regular:roman",
-        "monospace:bold:roman",
-        "monospace:regular:italic",
-        "monospace:bold:italic",
-    };
-
-    /* These next three classes are just data structures.
-     */
-    static class FontConfigFont {
-        String familyName;        // eg Bitstream Vera Sans
-        String styleStr;          // eg Bold
-        String fullName;          // eg Bitstream Vera Sans Bold
-        String fontFile;          // eg /usr/X11/lib/fonts/foo.ttf
-    }
-
-    static class FcCompFont {
-        String fcName;            // eg sans
-        String fcFamily;          // eg sans
-        String jdkName;           // eg sansserif
-        int style;                // eg 0=PLAIN
-        FontConfigFont firstFont;
-        FontConfigFont[] allFonts;
-        //boolean preferBitmaps;    // if embedded bitmaps preferred over AA
-        CompositeFont compFont;   // null if not yet created/known.
-    }
-
-    static class FontConfigInfo {
-        int fcVersion;
-        String[] cacheDirs = new String[4];
-    }
-
-    private static String getFCLocaleStr() {
-        Locale l = SunToolkit.getStartupLocale();
-        String localeStr = l.getLanguage();
-        String country = l.getCountry();
-        if (!country.equals("")) {
-            localeStr = localeStr + "-" + country;
-        }
-        return localeStr;
-    }
-
-    /* This does cause the native libfontconfig to be loaded and unloaded,
-     * but it does not incur the overhead of initialisation of its
-     * data structures, so shouldn't have a measurable impact.
-     */
-    public static native int getFontConfigVersion();
-
-    private static native int
-        getFontConfigAASettings(String locale, String fcFamily);
-
-    /* This is public solely so that for debugging purposes it can be called
-     * with other names, which might (eg) include a size, eg "sans-24"
-     * The return value is a text aa rendering hint value.
-     * Normally we should call the no-args version.
      */
-    public static Object getFontConfigAAHint(String fcFamily) {
-        if (isWindows) {
-            return null;
-        } else {
-            int hint = getFontConfigAASettings(getFCLocaleStr(), fcFamily);
-            if (hint < 0) {
-                return null;
-            } else {
-                return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
-                                          hint);
-            }
-        }
-    }
-
-    /* Called from code that needs to know what are the AA settings
-     * that apps using FC would pick up for the default desktop font.
-     * Note apps can change the default desktop font. etc, so this
-     * isn't certain to be right but its going to correct for most cases.
-     * Native return values map to the text aa values in sun.awt.SunHints.
-     * which is used to look up the renderinghint value object.
-     */
-    public static Object getFontConfigAAHint() {
-        return getFontConfigAAHint("sans");
-    }
-
-    /* This is populated by native */
-    private static final FontConfigInfo fcInfo = new FontConfigInfo();
-
-    /* This array has the array elements created in Java code and is
-     * passed down to native to be filled in.
-     */
-    private static FcCompFont[] fontConfigFonts;
-
-    /* Return an array of FcCompFont structs describing the primary
-     * font located for each of fontconfig/GTK/Pango's logical font names.
-     */
-    private static native void getFontConfig(String locale,
-                                             FontConfigInfo fcInfo,
-                                             FcCompFont[] fonts,
-                                             boolean includeFallbacks);
-
-    static void populateFontConfig(FcCompFont[] fcInfo) {
-        fontConfigFonts = fcInfo;
-    }
-
-    static FcCompFont[] loadFontConfig() {
-        initFontConfigFonts(true);
-        return fontConfigFonts;
-    }
-
-    static FontConfigInfo getFontConfigInfo() {
-        initFontConfigFonts(true);
-        return fcInfo;
-    }
-
-    /* This can be made public if it's needed to force a re-read
-     * rather than using the cached values. The re-read would be needed
-     * only if some event signalled that the fontconfig has changed.
-     * In that event this method would need to return directly the array
-     * to be used by the caller in case it subsequently changed.
-     */
-    private static synchronized void
-        initFontConfigFonts(boolean includeFallbacks) {
-
-        if (fontConfigFonts != null) {
-            if (!includeFallbacks || (fontConfigFonts[0].allFonts != null)) {
-                return;
-            }
-        }
-
-        if (isWindows || fontConfigFailed) {
-            return;
-        }
-
-        long t0 = 0;
-        if (logging) {
-            t0 = System.nanoTime();
-        }
-
-        FcCompFont[] fontArr = new FcCompFont[fontConfigNames.length];
-        for (int i = 0; i< fontArr.length; i++) {
-            fontArr[i] = new FcCompFont();
-            fontArr[i].fcName = fontConfigNames[i];
-            int colonPos = fontArr[i].fcName.indexOf(':');
-            fontArr[i].fcFamily = fontArr[i].fcName.substring(0, colonPos);
-            fontArr[i].jdkName = mapFcName(fontArr[i].fcFamily);
-            fontArr[i].style = i % 4; // depends on array order.
-        }
-        getFontConfig(getFCLocaleStr(), fcInfo, fontArr, includeFallbacks);
-        /* If don't find anything (eg no libfontconfig), then just return */
-        for (int i = 0; i< fontArr.length; i++) {
-            FcCompFont fci = fontArr[i];
-            if (fci.firstFont == null) {
-                if (logging) {
-                    logger.info("Fontconfig returned no fonts.");
-                }
-                fontConfigFailed = true;
-                return;
-            }
-        }
-        fontConfigFonts = fontArr;
-
-        if (logging) {
-            long t1 = System.nanoTime();
-            logger.info("Time spent accessing fontconfig="+
-                        (t1-t0)/1000000+"ms.");
+    public boolean usingPerAppContextComposites();
 
-            for (int i = 0; i< fontConfigFonts.length; i++) {
-                FcCompFont fci = fontConfigFonts[i];
-                logger.info("FC font " + fci.fcName+" maps to family " +
-                            fci.firstFont.familyName +
-                            " in file " + fci.firstFont.fontFile);
-                if (fci.allFonts != null) {
-                    for (int f=0;f<fci.allFonts.length;f++) {
-                        FontConfigFont fcf = fci.allFonts[f];
-                        logger.info("Family=" + fcf.familyName +
-                                    " Style="+ fcf.styleStr +
-                                    " Fullname="+fcf.fullName +
-                                    " File="+fcf.fontFile);
-                    }
-                }
-            }
-        }
-    }
-
-    private static PhysicalFont registerFromFcInfo(FcCompFont fcInfo) {
-
-        /* If it's a TTC file we need to know that as we will need to
-         * make sure we return the right font */
-        String fontFile = fcInfo.firstFont.fontFile;
-        int offset = fontFile.length()-4;
-        if (offset <= 0) {
-            return null;
-        }
-        String ext = fontFile.substring(offset).toLowerCase();
-        boolean isTTC = ext.equals(".ttc");
-
-        /* If this file is already registered, can just return its font.
-         * However we do need to check in case it's a TTC as we need
-         * a specific font, so rather than directly returning it, let
-         * findFont2D resolve that.
-         */
-        PhysicalFont physFont = registeredFontFiles.get(fontFile);
-        if (physFont != null) {
-            if (isTTC) {
-                Font2D f2d = findFont2D(fcInfo.firstFont.familyName,
-                                        fcInfo.style, NO_FALLBACK);
-                if (f2d instanceof PhysicalFont) { /* paranoia */
-                    return (PhysicalFont)f2d;
-                } else {
-                    return null;
-                }
-            } else {
-                return physFont;
-            }
-        }
-
-        /* If the font may hide a JRE font (eg fontconfig says it is
-         * Lucida Sans), we want to use the JRE version, so make it
-         * point to the JRE font.
-         */
-        physFont = findJREDeferredFont(fcInfo.firstFont.familyName,
-                                       fcInfo.style);
-
-        /* It is also possible the font file is on the "deferred" list,
-         * in which case we can just initialise it now.
-         */
-        if (physFont == null &&
-            deferredFontFiles.get(fontFile) != null)
-        {
-            physFont = initialiseDeferredFont(fcInfo.firstFont.fontFile);
-            /* use findFont2D to get the right font from TTC's */
-            if (physFont != null) {
-                if (isTTC) {
-                    Font2D f2d = findFont2D(fcInfo.firstFont.familyName,
-                                            fcInfo.style, NO_FALLBACK);
-                    if (f2d instanceof PhysicalFont) { /* paranoia */
-                        return (PhysicalFont)f2d;
-                    } else {
-                        return null;
-                    }
-                } else {
-                    return physFont;
-                }
-            }
-        }
-
-        /* In the majority of cases we reach here, and need to determine
-         * the type and rank to register the font.
-         */
-        if (physFont == null) {
-            int fontFormat = FONTFORMAT_NONE;
-            int fontRank = Font2D.UNKNOWN_RANK;
-
-            if (ext.equals(".ttf") || ext.equals(".otf") || isTTC) {
-                fontFormat = FONTFORMAT_TRUETYPE;
-                fontRank = Font2D.TTF_RANK;
-            } else if (ext.equals(".pfa") || ext.equals(".pfb")) {
-                fontFormat = FONTFORMAT_TYPE1;
-                fontRank = Font2D.TYPE1_RANK;
-            }
-            physFont = registerFontFile(fcInfo.firstFont.fontFile, null,
-                                      fontFormat, true, fontRank);
-        }
-        return physFont;
-    }
-
-    private static String[] getPlatformFontDirs() {
-        String path = getFontPath(true);
-        StringTokenizer parser =
-            new StringTokenizer(path, File.pathSeparator);
-        ArrayList<String> pathList = new ArrayList<String>();
-        try {
-            while (parser.hasMoreTokens()) {
-                pathList.add(parser.nextToken());
-            }
-        } catch (NoSuchElementException e) {
-        }
-        return pathList.toArray(new String[0]);
-    }
-
-    /** returns an array of two strings. The first element is the
-     * name of the font. The second element is the file name.
+    /**
+     * Creates a derived composite font from the specified font (handle).
+     *
+     * @param family the font family of the derived font
+     * @param style the font style of the derived font
+     * @param handle the original font (handle)
+     *
+     * @return the handle for the derived font
      */
-    private static String[] defaultPlatformFont = null;
-    public static String[] getDefaultPlatformFont() {
-
-        if (defaultPlatformFont != null) {
-            return defaultPlatformFont;
-        }
-
-        String[] info = new String[2];
-        if (isWindows) {
-            info[0] = "Arial";
-            info[1] = "c:\\windows\\fonts";
-            final String[] dirs = getPlatformFontDirs();
-            if (dirs.length > 1) {
-                String dir = (String)
-                    AccessController.doPrivileged(new PrivilegedAction() {
-                        public Object run() {
-                            for (int i=0; i<dirs.length; i++) {
-                                String path =
-                                    dirs[i] + File.separator + "arial.ttf";
-                                File file = new File(path);
-                                if (file.exists()) {
-                                    return dirs[i];
-                                }
-                            }
-                            return null;
-                        }
-                });
-                if (dir != null) {
-                    info[1] = dir;
-                }
-            } else {
-                info[1] = dirs[0];
-            }
-            info[1] = info[1] + File.separator + "arial.ttf";
-        } else {
-            initFontConfigFonts(false);
-            for (int i=0; i<fontConfigFonts.length; i++) {
-                if ("sans".equals(fontConfigFonts[i].fcFamily) &&
-                    0 == fontConfigFonts[i].style) {
-                    info[0] = fontConfigFonts[i].firstFont.familyName;
-                    info[1] = fontConfigFonts[i].firstFont.fontFile;
-                    break;
-                }
-            }
-            /* Absolute last ditch attempt in the face of fontconfig problems.
-             * If we didn't match, pick the first, or just make something
-             * up so we don't NPE.
-             */
-            if (info[0] == null) {
-                 if (fontConfigFonts.length > 0 &&
-                     fontConfigFonts[0].firstFont.fontFile != null) {
-                     info[0] = fontConfigFonts[0].firstFont.familyName;
-                     info[1] = fontConfigFonts[0].firstFont.fontFile;
-                 } else {
-                     info[0] = "Dialog";
-                     info[1] = "/dialog.ttf";
-                 }
-            }
-        }
-        defaultPlatformFont = info;
-        return defaultPlatformFont;
-    }
-
-    private FcCompFont getFcCompFont() {
-         initFontConfigFonts(false);
-         for (int i=0; i<fontConfigFonts.length; i++) {
-             if ("sans".equals(fontConfigFonts[i].fcFamily) &&
-                 0 == fontConfigFonts[i].style) {
-                 return fontConfigFonts[i];
-             }
-         }
-         return null;
-    }
-    /*
-     * We need to return a Composite font which has as the font in
-     * its first slot one obtained from fontconfig.
-     */
-    private static CompositeFont getFontConfigFont(String name, int style) {
-
-        name = name.toLowerCase();
-
-        initFontConfigFonts(false);
-
-        FcCompFont fcInfo = null;
-        for (int i=0; i<fontConfigFonts.length; i++) {
-            if (name.equals(fontConfigFonts[i].fcFamily) &&
-                style == fontConfigFonts[i].style) {
-                fcInfo = fontConfigFonts[i];
-                break;
-            }
-        }
-        if (fcInfo == null) {
-            fcInfo = fontConfigFonts[0];
-        }
-
-        if (logging) {
-            logger.info("FC name=" + name + " style=" + style + " uses " +
-                        fcInfo.firstFont.familyName +
-                        " in file: " + fcInfo.firstFont.fontFile);
-        }
-
-        if (fcInfo.compFont != null) {
-            return fcInfo.compFont;
-        }
-
-        /* jdkFont is going to be used for slots 1..N and as a fallback.
-         * Slot 0 will be the physical font from fontconfig.
-         */
-        CompositeFont jdkFont = (CompositeFont)
-            findFont2D(fcInfo.jdkName, style, LOGICAL_FALLBACK);
-
-        if (fcInfo.firstFont.familyName == null ||
-            fcInfo.firstFont.fontFile == null) {
-            return (fcInfo.compFont = jdkFont);
-        }
-
-        /* First, see if the family and exact style is already registered.
-         * If it is, use it. If it's not, then try to register it.
-         * If that registration fails (signalled by null) just return the
-         * regular JDK composite.
-         * Algorithmically styled fonts won't match on exact style, so
-         * will fall through this code, but the regisration code will
-         * find that file already registered and return its font.
-         */
-        FontFamily family = FontFamily.getFamily(fcInfo.firstFont.familyName);
-        PhysicalFont physFont = null;
-        if (family != null) {
-            Font2D f2D = family.getFontWithExactStyleMatch(fcInfo.style);
-            if (f2D instanceof PhysicalFont) {
-                physFont = (PhysicalFont)f2D;
-            }
-        }
-
-        if (physFont == null ||
-            !fcInfo.firstFont.fontFile.equals(physFont.platName)) {
-            physFont = registerFromFcInfo(fcInfo);
-            if (physFont == null) {
-                return (fcInfo.compFont = jdkFont);
-            }
-            family = FontFamily.getFamily(physFont.getFamilyName(null));
-        }
-
-        /* Now register the fonts in the family (the other styles) after
-         * checking that they aren't already registered and are actually in
-         * a different file. They may be the same file in CJK cases.
-         * For cases where they are different font files - eg as is common for
-         * Latin fonts, then we rely on fontconfig to report these correctly.
-         * Assume that all styles of this font are found by fontconfig,
-         * so we can find all the family members which must be registered
-         * together to prevent synthetic styling.
-         */
-        for (int i=0; i<fontConfigFonts.length; i++) {
-            FcCompFont fc = fontConfigFonts[i];
-            if (fc != fcInfo &&
-                physFont.getFamilyName(null).equals(fc.firstFont.familyName) &&
-                !fc.firstFont.fontFile.equals(physFont.platName) &&
-                family.getFontWithExactStyleMatch(fc.style) == null) {
-
-                registerFromFcInfo(fontConfigFonts[i]);
-            }
-        }
-
-        /* Now we have a physical font. We will back this up with the JDK
-         * logical font (sansserif, serif, or monospaced) that corresponds
-         * to the Pango/GTK/FC logical font name.
-         */
-        return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
-    }
-
-    /* This is called by Swing passing in a fontconfig family name
-     * such as "sans". In return Swing gets a FontUIResource instance
-     * that has queried fontconfig to resolve the font(s) used for this.
-     * Fontconfig will if asked return a list of fonts to give the largest
-     * possible code point coverage.
-     * For now we use only the first font returned by fontconfig, and
-     * back it up with the most closely matching JDK logical font.
-     * Essentially this means pre-pending what we return now with fontconfig's
-     * preferred physical font. This could lead to some duplication in cases,
-     * if we already included that font later. We probably should remove such
-     * duplicates, but it is not a significant problem. It can be addressed
-     * later as part of creating a Composite which uses more of the
-     * same fonts as fontconfig. At that time we also should pay more
-     * attention to the special rendering instructions fontconfig returns,
-     * such as whether we should prefer embedded bitmaps over antialiasing.
-     * There's no way to express that via a Font at present.
-     */
-    public static FontUIResource getFontConfigFUIR(String fcFamily,
-                                                   int style, int size) {
-
-        String mappedName = mapFcName(fcFamily);
-        if (mappedName == null) {
-            mappedName = "sansserif";
-        }
-
-        /* If GTK L&F were to be used on windows, we need to return
-         * something. Since on windows Swing won't have the code to
-         * call fontconfig, even if it is present, fcFamily and mapped
-         * name will default to sans and therefore sansserif so this
-         * should be fine.
-         */
-        if (isWindows) {
-            return new FontUIResource(mappedName, style, size);
-        }
-
-        CompositeFont font2D = getFontConfigFont(fcFamily, style);
-        if (font2D == null) { // Not expected, just a precaution.
-           return new FontUIResource(mappedName, style, size);
-        }
-
-        /* The name of the font will be that of the physical font in slot,
-         * but by setting the handle to that of the CompositeFont it
-         * renders as that CompositeFont.
-         * It also needs to be marked as a created font which is the
-         * current mechanism to signal that deriveFont etc must copy
-         * the handle from the original font.
-         */
-        FontUIResource fuir =
-            new FontUIResource(font2D.getFamilyName(null), style, size);
-        setFont2D(fuir, font2D.handle);
-        setCreatedFont(fuir);
-        return fuir;
-    }
-
-    /* The following fields and methods which relate to layout
-     * perhaps belong in some other class but FontManager is already
-     * widely used as an entry point for other JDK code that needs
-     * access to the font system internals.
-     */
+    public Font2DHandle getNewComposite(String family, int style,
+                                        Font2DHandle handle);
 
     /**
-     * Referenced by code in the JDK which wants to test for the
-     * minimum char code for which layout may be required.
-     * Note that even basic latin text can benefit from ligatures,
-     * eg "ffi" but we presently apply those only if explicitly
-     * requested with TextAttribute.LIGATURES_ON.
-     * The value here indicates the lowest char code for which failing
-     * to invoke layout would prevent acceptable rendering.
-     */
-    public static final int MIN_LAYOUT_CHARCODE = 0x0300;
-
-    /**
-     * Referenced by code in the JDK which wants to test for the
-     * maximum char code for which layout may be required.
-     * Note this does not account for supplementary characters
-     * where the caller interprets 'layout' to mean any case where
-     * one 'char' (ie the java type char) does not map to one glyph
-     */
-    public static final int MAX_LAYOUT_CHARCODE = 0x206F;
-
-    /* If the character code falls into any of a number of unicode ranges
-     * where we know that simple left->right layout mapping chars to glyphs
-     * 1:1 and accumulating advances is going to produce incorrect results,
-     * we want to know this so the caller can use a more intelligent layout
-     * approach. A caller who cares about optimum performance may want to
-     * check the first case and skip the method call if its in that range.
-     * Although there's a lot of tests in here, knowing you can skip
-     * CTL saves a great deal more. The rest of the checks are ordered
-     * so that rather than checking explicitly if (>= start & <= end)
-     * which would mean all ranges would need to be checked so be sure
-     * CTL is not needed, the method returns as soon as it recognises
-     * the code point is outside of a CTL ranges.
-     * NOTE: Since this method accepts an 'int' it is asssumed to properly
-     * represent a CHARACTER. ie it assumes the caller has already
-     * converted surrogate pairs into supplementary characters, and so
-     * can handle this case and doesn't need to be told such a case is
-     * 'complex'.
+     * Indicates a preference for locale-specific fonts in the mapping of
+     * logical fonts to physical fonts. Calling this method indicates that font
+     * rendering should primarily use fonts specific to the primary writing
+     * system (the one indicated by the default encoding and the initial
+     * default locale). For example, if the primary writing system is
+     * Japanese, then characters should be rendered using a Japanese font
+     * if possible, and other fonts should only be used for characters for
+     * which the Japanese font doesn't have glyphs.
+     * <p>
+     * The actual change in font rendering behavior resulting from a call
+     * to this method is implementation dependent; it may have no effect at
+     * all, or the requested behavior may already match the default behavior.
+     * The behavior may differ between font rendering in lightweight
+     * and peered components.  Since calling this method requests a
+     * different font, clients should expect different metrics, and may need
+     * to recalculate window sizes and layout. Therefore this method should
+     * be called before user interface initialisation.
+     *
+     * @see #preferProportionalFonts()
+     * @since 1.5
      */
-    static boolean isComplexCharCode(int code) {
-
-        if (code < MIN_LAYOUT_CHARCODE || code > MAX_LAYOUT_CHARCODE) {
-            return false;
-        }
-        else if (code <= 0x036f) {
-            // Trigger layout for combining diacriticals 0x0300->0x036f
-            return true;
-        }
-        else if (code < 0x0590) {
-            // No automatic layout for Greek, Cyrillic, Armenian.
-             return false;
-        }
-        else if (code <= 0x06ff) {
-            // Hebrew 0590 - 05ff
-            // Arabic 0600 - 06ff
-            return true;
-        }
-        else if (code < 0x0900) {
-            return false; // Syriac and Thaana
-        }
-        else if (code <= 0x0e7f) {
-            // if Indic, assume shaping for conjuncts, reordering:
-            // 0900 - 097F Devanagari
-            // 0980 - 09FF Bengali
-            // 0A00 - 0A7F Gurmukhi
-            // 0A80 - 0AFF Gujarati
-            // 0B00 - 0B7F Oriya
-            // 0B80 - 0BFF Tamil
-            // 0C00 - 0C7F Telugu
-            // 0C80 - 0CFF Kannada
-            // 0D00 - 0D7F Malayalam
-            // 0D80 - 0DFF Sinhala
-            // 0E00 - 0E7F if Thai, assume shaping for vowel, tone marks
-            return true;
-        }
-        else if (code < 0x1780) {
-            return false;
-        }
-        else if (code <= 0x17ff) { // 1780 - 17FF Khmer
-            return true;
-        }
-        else if (code < 0x200c) {
-            return false;
-        }
-        else if (code <= 0x200d) { //  zwj or zwnj
-            return true;
-        }
-        else if (code >= 0x202a && code <= 0x202e) { // directional control
-            return true;
-        }
-        else if (code >= 0x206a && code <= 0x206f) { // directional control
-            return true;
-        }
-        return false;
-    }
-
-    /* This is almost the same as the method above, except it takes a
-     * char which means it may include undecoded surrogate pairs.
-     * The distinction is made so that code which needs to identify all
-     * cases in which we do not have a simple mapping from
-     * char->unicode character->glyph can be be identified.
-     * For example measurement cannot simply sum advances of 'chars',
-     * the caret in editable text cannot advance one 'char' at a time, etc.
-     * These callers really are asking for more than whether 'layout'
-     * needs to be run, they need to know if they can assume 1->1
-     * char->glyph mapping.
-     */
-    static boolean isNonSimpleChar(char ch) {
-        return
-            isComplexCharCode(ch) ||
-            (ch >= CharToGlyphMapper.HI_SURROGATE_START &&
-             ch <= CharToGlyphMapper.LO_SURROGATE_END);
-    }
+    public void preferLocaleFonts();
 
     /**
-     * If there is anything in the text which triggers a case
-     * where char->glyph does not map 1:1 in straightforward
-     * left->right ordering, then this method returns true.
-     * Scripts which might require it but are not treated as such
-     * due to JDK implementations will not return true.
-     * ie a 'true' return is an indication of the treatment by
-     * the implementation.
-     * Whether supplementary characters should be considered is dependent
-     * on the needs of the caller. Since this method accepts the 'char' type
-     * then such chars are always represented by a pair. From a rendering
-     * perspective these will all (in the cases I know of) still be one
-     * unicode character -> one glyph. But if a caller is using this to
-     * discover any case where it cannot make naive assumptions about
-     * the number of chars, and how to index through them, then it may
-     * need the option to have a 'true' return in such a case.
+     * preferLocaleFonts() and preferProportionalFonts() are called to inform
+     * that the application could be using an alternate set of composite
+     * fonts, and so the implementation should try to create a CompositeFonts
+     * with this directive in mind.
+     *
+     * @see #preferLocaleFonts()
      */
-    public static boolean isComplexText(char [] chs, int start, int limit) {
-
-        for (int i = start; i < limit; i++) {
-            if (chs[i] < MIN_LAYOUT_CHARCODE) {
-                continue;
-            }
-            else if (isNonSimpleChar(chs[i])) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Used by windows printing to assess if a font is likely to
-     * be layout compatible with JDK
-     * TrueType fonts should be, but if they have no GPOS table,
-     * but do have a GSUB table, then they are probably older
-     * fonts GDI handles differently.
-     */
-    public static boolean textLayoutIsCompatible(Font font) {
-
-        Font2D font2D = FontManager.getFont2D(font);
-        if (font2D instanceof TrueTypeFont) {
-            TrueTypeFont ttf = (TrueTypeFont)font2D;
-            return
-                ttf.getDirectoryEntry(TrueTypeFont.GSUBTag) == null ||
-                ttf.getDirectoryEntry(TrueTypeFont.GPOSTag) != null;
-        } else {
-            return false;
-        }
-    }
-
-    private static FontScaler nullScaler = null;
-    private static Constructor<FontScaler> scalerConstructor = null;
+    public void preferProportionalFonts();
 
-    //Find preferred font scaler
-    //
-    //NB: we can allow property based preferences
-    //   (theoretically logic can be font type specific)
-    static {
-        Class scalerClass = null;
-        Class arglst[] = new Class[] {Font2D.class, int.class,
-        boolean.class, int.class};
-
-        try {
-            if (SunGraphicsEnvironment.isOpenJDK()) {
-                scalerClass = Class.forName("sun.font.FreetypeFontScaler");
-            } else {
-                scalerClass = Class.forName("sun.font.T2KFontScaler");
-            }
-        } catch (ClassNotFoundException e) {
-                scalerClass = NullFontScaler.class;
-        }
-
-        //NB: rewrite using factory? constructor is ugly way
-        try {
-            scalerConstructor = scalerClass.getConstructor(arglst);
-        } catch (NoSuchMethodException e) {
-            //should not happen
-        }
-    }
-
-    /* At the moment it is harmless to create 2 null scalers
-       so, technically, syncronized keyword is not needed.
-
-       But it is safer to keep it to avoid subtle problems if we will be
-       adding checks like whether scaler is null scaler. */
-    public synchronized static FontScaler getNullScaler() {
-        if (nullScaler == null) {
-            nullScaler = new NullFontScaler();
-        }
-        return nullScaler;
-    }
-
-    /* This is the only place to instantiate new FontScaler.
-     * Therefore this is very convinient place to register
-     * scaler with Disposer as well as trigger deregistring bad font
-     * in case when scaler reports this.
-     */
-
-    public static FontScaler getScaler(Font2D font,
-                                       int indexInCollection,
-                                       boolean supportsCJK,
-                                       int filesize) {
-        FontScaler scaler = null;
-
-        try {
-            Object args[] = new Object[] {font, indexInCollection,
-                                          supportsCJK, filesize};
-            scaler = scalerConstructor.newInstance(args);
-            Disposer.addObjectRecord(font, scaler);
-        } catch (Throwable e) {
-            scaler = nullScaler;
-
-            //if we can not instantiate scaler assume bad font
-            //NB: technically it could be also because of internal scaler
-            //    error but here we are assuming scaler is ok.
-            deRegisterBadFont(font);
-        }
-        return scaler;
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/font/FontManagerFactory.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.AWTError;
+import java.awt.Font;
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import sun.security.action.GetPropertyAction;
+
+
+/**
+ * Factory class used to retrieve a valid FontManager instance for the current
+ * platform.
+ *
+ * A default implementation is given for Linux, Solaris and Windows.
+ * You can alter the behaviour of the {@link #getInstance()} method by setting
+ * the {@code sun.font.fontmanager} property. For example:
+ * {@code sun.font.fontmanager=sun.awt.X11FontManager}
+ */
+public final class FontManagerFactory {
+
+    /** Our singleton instance. */
+    private static FontManager instance = null;
+
+    private static final String DEFAULT_CLASS;
+    static {
+        if (FontUtilities.isWindows)
+            DEFAULT_CLASS = "sun.awt.Win32FontManager";
+        else
+            DEFAULT_CLASS = "sun.awt.X11FontManager";
+    }
+
+    /**
+     * Get a valid FontManager implementation for the current platform.
+     *
+     * @return a valid FontManager instance for the current platform
+     */
+    public static synchronized FontManager getInstance() {
+
+        if (instance != null) {
+            return instance;
+        }
+
+        String fmClassName = AccessController.doPrivileged(
+                new GetPropertyAction("sun.font.fontmanager",
+                                      DEFAULT_CLASS));
+
+        try {
+            @SuppressWarnings("unchecked")
+            ClassLoader cl = (ClassLoader)
+                AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run() {
+                        return ClassLoader.getSystemClassLoader();
+                    }
+                });
+
+            @SuppressWarnings("unchecked")
+            Class fmClass = Class.forName(fmClassName, true, cl);
+            instance = (FontManager) fmClass.newInstance();
+
+        } catch (ClassNotFoundException ex) {
+            InternalError err = new InternalError();
+            err.initCause(ex);
+            throw err;
+
+        } catch (InstantiationException ex) {
+            InternalError err = new InternalError();
+            err.initCause(ex);
+            throw err;
+
+        } catch (IllegalAccessException ex) {
+            InternalError err = new InternalError();
+            err.initCause(ex);
+            throw err;
+        }
+
+        return instance;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/font/FontManagerForSGE.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+import java.util.Locale;
+import java.util.TreeMap;
+
+/**
+ * This is an extension of the {@link FontManager} interface which has to
+ * be implemented on systems that want to use SunGraphicsEnvironment. It
+ * adds a couple of methods that are only required by SGE. Graphics
+ * implementations that use their own GraphicsEnvironment are not required
+ * to implement this and can use plain FontManager instead.
+ */
+public interface FontManagerForSGE extends FontManager {
+
+    /**
+     * Return an array of created Fonts, or null, if no fonts were created yet.
+     */
+    public Font[] getCreatedFonts();
+
+    /**
+     * Similar to getCreatedFonts, but returns a TreeMap of fonts by family name.
+     */
+    public TreeMap<String, String> getCreatedFontFamilyNames();
+
+    /**
+     * Returns all fonts installed in this environment.
+     */
+    public Font[] getAllInstalledFonts();
+
+    public String[] getInstalledFontFamilyNames(Locale requestedLocale);
+}
--- a/jdk/src/share/classes/sun/font/FontManagerNativeLibrary.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FontManagerNativeLibrary.java	Wed Jul 05 17:01:52 2017 +0200
@@ -34,7 +34,7 @@
             public Object run() {
                /* REMIND do we really have to load awt here? */
                System.loadLibrary("awt");
-               if (SunGraphicsEnvironment.isOpenJDK() &&
+               if (FontUtilities.isOpenJDK &&
                    System.getProperty("os.name").startsWith("Windows")) {
                    /* Ideally fontmanager library should not depend on
                       particular implementation of the font scaler.
--- a/jdk/src/share/classes/sun/font/FontResolver.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FontResolver.java	Wed Jul 05 17:01:52 2017 +0200
@@ -114,7 +114,7 @@
 
             for (int i=0; i<getAllFonts().length; i++) {
                 Font font = allFonts[i];
-                Font2D font2D = FontManager.getFont2D(font);
+                Font2D font2D = FontUtilities.getFont2D(font);
                 if (font2D.hasSupplementaryChars()) {
                     fonts.add(font);
                     indices.add(Integer.valueOf(i));
--- a/jdk/src/share/classes/sun/font/FontScaler.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FontScaler.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,6 +29,9 @@
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
 import java.lang.ref.WeakReference;
+import java.lang.reflect.Constructor;
+
+import sun.java2d.Disposer;
 import sun.java2d.DisposerRecord;
 
 /* FontScaler is "internal interface" to font rasterizer library.
@@ -77,6 +80,79 @@
  *     this (and this is probably more important for Type1 fonts).
  */
 public abstract class FontScaler implements DisposerRecord {
+
+    private static FontScaler nullScaler = null;
+    private static Constructor<FontScaler> scalerConstructor = null;
+
+    //Find preferred font scaler
+    //
+    //NB: we can allow property based preferences
+    //   (theoretically logic can be font type specific)
+    static {
+        Class scalerClass = null;
+        Class arglst[] = new Class[] {Font2D.class, int.class,
+        boolean.class, int.class};
+
+        try {
+            if (FontUtilities.isOpenJDK) {
+                scalerClass = Class.forName("sun.font.FreetypeFontScaler");
+            } else {
+                scalerClass = Class.forName("sun.font.T2KFontScaler");
+            }
+        } catch (ClassNotFoundException e) {
+                scalerClass = NullFontScaler.class;
+        }
+
+        //NB: rewrite using factory? constructor is ugly way
+        try {
+            scalerConstructor = scalerClass.getConstructor(arglst);
+        } catch (NoSuchMethodException e) {
+            //should not happen
+        }
+    }
+
+    /* This is the only place to instantiate new FontScaler.
+     * Therefore this is very convinient place to register
+     * scaler with Disposer as well as trigger deregistring bad font
+     * in case when scaler reports this.
+     */
+    public static FontScaler getScaler(Font2D font,
+                                int indexInCollection,
+                                boolean supportsCJK,
+                                int filesize) {
+        FontScaler scaler = null;
+
+        try {
+            Object args[] = new Object[] {font, indexInCollection,
+                                          supportsCJK, filesize};
+            scaler = scalerConstructor.newInstance(args);
+            Disposer.addObjectRecord(font, scaler);
+        } catch (Throwable e) {
+            scaler = nullScaler;
+
+            //if we can not instantiate scaler assume bad font
+            //NB: technically it could be also because of internal scaler
+            //    error but here we are assuming scaler is ok.
+            FontManager fm = FontManagerFactory.getInstance();
+            fm.deRegisterBadFont(font);
+        }
+        return scaler;
+    }
+
+    /*
+     * At the moment it is harmless to create 2 null scalers so, technically,
+     * syncronized keyword is not needed.
+     *
+     * But it is safer to keep it to avoid subtle problems if we will be adding
+     * checks like whether scaler is null scaler.
+     */
+    public static synchronized FontScaler getNullScaler() {
+        if (nullScaler == null) {
+            nullScaler = new NullFontScaler();
+        }
+        return nullScaler;
+    }
+
     protected WeakReference<Font2D> font = null;
     protected long nativeScaler = 0; //used by decendants
                                      //that have native state
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/font/FontUtilities.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,485 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+
+import javax.swing.plaf.FontUIResource;
+
+import sun.security.action.GetPropertyAction;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * A collection of utility methods.
+ */
+public final class FontUtilities {
+
+    public static final boolean isSolaris;
+
+    public static final boolean isLinux;
+
+    public static final boolean isSolaris8;
+
+    public static final boolean isSolaris9;
+
+    public static final boolean isOpenSolaris;
+
+    public static final boolean useT2K;
+
+    public static final boolean isWindows;
+
+    public static final boolean isOpenJDK;
+
+    static final String LUCIDA_FILE_NAME = "LucidaSansRegular.ttf";
+
+    // This static initializer block figures out the OS constants.
+    static {
+
+        String osName = AccessController.doPrivileged(
+                                new GetPropertyAction("os.name", "unknownOS"));
+        isSolaris = osName.startsWith("SunOS");
+
+        isLinux = osName.startsWith("Linux");
+
+        String t2kStr = AccessController.doPrivileged(
+                              new GetPropertyAction("sun.java2d.font.scaler"));
+        if (t2kStr != null) {
+            useT2K = "t2k".equals(t2kStr);
+        } else {
+            useT2K = false;
+        }
+        if (isSolaris) {
+            String version = AccessController.doPrivileged(
+                                   new GetPropertyAction("os.version", "0.0"));
+            isSolaris8 = version.startsWith("5.8");
+            isSolaris9 = version.startsWith("5.9");
+            float ver = Float.parseFloat(version);
+            if (ver > 5.10f) {
+                File f = new File("/etc/release");
+                String line = null;
+                try {
+                    FileInputStream fis = new FileInputStream(f);
+                    InputStreamReader isr = new InputStreamReader(
+                                                            fis, "ISO-8859-1");
+                    BufferedReader br = new BufferedReader(isr);
+                    line = br.readLine();
+                    fis.close();
+                } catch (Exception ex) {
+                    // Nothing to do here.
+                }
+                if (line != null && line.indexOf("OpenSolaris") >= 0) {
+                    isOpenSolaris = true;
+                } else {
+                    isOpenSolaris = false;
+                }
+            } else {
+                isOpenSolaris= false;
+            }
+        } else {
+            isSolaris8 = false;
+            isSolaris9 = false;
+            isOpenSolaris = false;
+        }
+        isWindows = osName.startsWith("Windows");
+        String jreLibDirName = AccessController.doPrivileged(
+               new GetPropertyAction("java.home","")) + File.separator + "lib";
+        String jreFontDirName = jreLibDirName + File.separator + "fonts";
+        File lucidaFile =
+                new File(jreFontDirName + File.separator + LUCIDA_FILE_NAME);
+        isOpenJDK = !lucidaFile.exists();
+    }
+
+    /**
+     * Referenced by code in the JDK which wants to test for the
+     * minimum char code for which layout may be required.
+     * Note that even basic latin text can benefit from ligatures,
+     * eg "ffi" but we presently apply those only if explicitly
+     * requested with TextAttribute.LIGATURES_ON.
+     * The value here indicates the lowest char code for which failing
+     * to invoke layout would prevent acceptable rendering.
+     */
+    public static final int MIN_LAYOUT_CHARCODE = 0x0300;
+
+    /**
+     * Referenced by code in the JDK which wants to test for the
+     * maximum char code for which layout may be required.
+     * Note this does not account for supplementary characters
+     * where the caller interprets 'layout' to mean any case where
+     * one 'char' (ie the java type char) does not map to one glyph
+     */
+    public static final int MAX_LAYOUT_CHARCODE = 0x206F;
+
+    private static boolean debugFonts = false;
+    private static PlatformLogger logger = null;
+    private static boolean logging;
+
+    static {
+
+        String debugLevel =
+            System.getProperty("sun.java2d.debugfonts");
+
+        if (debugLevel != null && !debugLevel.equals("false")) {
+            debugFonts = true;
+            logger = PlatformLogger.getLogger("sun.java2d");
+            if (debugLevel.equals("warning")) {
+                logger.setLevel(PlatformLogger.WARNING);
+            } else if (debugLevel.equals("severe")) {
+                logger.setLevel(PlatformLogger.SEVERE);
+            }
+        }
+
+        if (debugFonts) {
+            logger = PlatformLogger.getLogger("sun.java2d");
+            logging = logger.isEnabled();
+        }
+
+    }
+
+    /**
+     * Calls the private getFont2D() method in java.awt.Font objects.
+     *
+     * @param font the font object to call
+     *
+     * @return the Font2D object returned by Font.getFont2D()
+     */
+    public static Font2D getFont2D(Font font) {
+        return FontAccess.getFontAccess().getFont2D(font);
+    }
+
+    /**
+     * If there is anything in the text which triggers a case
+     * where char->glyph does not map 1:1 in straightforward
+     * left->right ordering, then this method returns true.
+     * Scripts which might require it but are not treated as such
+     * due to JDK implementations will not return true.
+     * ie a 'true' return is an indication of the treatment by
+     * the implementation.
+     * Whether supplementary characters should be considered is dependent
+     * on the needs of the caller. Since this method accepts the 'char' type
+     * then such chars are always represented by a pair. From a rendering
+     * perspective these will all (in the cases I know of) still be one
+     * unicode character -> one glyph. But if a caller is using this to
+     * discover any case where it cannot make naive assumptions about
+     * the number of chars, and how to index through them, then it may
+     * need the option to have a 'true' return in such a case.
+     */
+    public static boolean isComplexText(char [] chs, int start, int limit) {
+
+        for (int i = start; i < limit; i++) {
+            if (chs[i] < MIN_LAYOUT_CHARCODE) {
+                continue;
+            }
+            else if (isNonSimpleChar(chs[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /* This is almost the same as the method above, except it takes a
+     * char which means it may include undecoded surrogate pairs.
+     * The distinction is made so that code which needs to identify all
+     * cases in which we do not have a simple mapping from
+     * char->unicode character->glyph can be be identified.
+     * For example measurement cannot simply sum advances of 'chars',
+     * the caret in editable text cannot advance one 'char' at a time, etc.
+     * These callers really are asking for more than whether 'layout'
+     * needs to be run, they need to know if they can assume 1->1
+     * char->glyph mapping.
+     */
+    public static boolean isNonSimpleChar(char ch) {
+        return
+            isComplexCharCode(ch) ||
+            (ch >= CharToGlyphMapper.HI_SURROGATE_START &&
+             ch <= CharToGlyphMapper.LO_SURROGATE_END);
+    }
+
+    /* If the character code falls into any of a number of unicode ranges
+     * where we know that simple left->right layout mapping chars to glyphs
+     * 1:1 and accumulating advances is going to produce incorrect results,
+     * we want to know this so the caller can use a more intelligent layout
+     * approach. A caller who cares about optimum performance may want to
+     * check the first case and skip the method call if its in that range.
+     * Although there's a lot of tests in here, knowing you can skip
+     * CTL saves a great deal more. The rest of the checks are ordered
+     * so that rather than checking explicitly if (>= start & <= end)
+     * which would mean all ranges would need to be checked so be sure
+     * CTL is not needed, the method returns as soon as it recognises
+     * the code point is outside of a CTL ranges.
+     * NOTE: Since this method accepts an 'int' it is asssumed to properly
+     * represent a CHARACTER. ie it assumes the caller has already
+     * converted surrogate pairs into supplementary characters, and so
+     * can handle this case and doesn't need to be told such a case is
+     * 'complex'.
+     */
+    public static boolean isComplexCharCode(int code) {
+
+        if (code < MIN_LAYOUT_CHARCODE || code > MAX_LAYOUT_CHARCODE) {
+            return false;
+        }
+        else if (code <= 0x036f) {
+            // Trigger layout for combining diacriticals 0x0300->0x036f
+            return true;
+        }
+        else if (code < 0x0590) {
+            // No automatic layout for Greek, Cyrillic, Armenian.
+             return false;
+        }
+        else if (code <= 0x06ff) {
+            // Hebrew 0590 - 05ff
+            // Arabic 0600 - 06ff
+            return true;
+        }
+        else if (code < 0x0900) {
+            return false; // Syriac and Thaana
+        }
+        else if (code <= 0x0e7f) {
+            // if Indic, assume shaping for conjuncts, reordering:
+            // 0900 - 097F Devanagari
+            // 0980 - 09FF Bengali
+            // 0A00 - 0A7F Gurmukhi
+            // 0A80 - 0AFF Gujarati
+            // 0B00 - 0B7F Oriya
+            // 0B80 - 0BFF Tamil
+            // 0C00 - 0C7F Telugu
+            // 0C80 - 0CFF Kannada
+            // 0D00 - 0D7F Malayalam
+            // 0D80 - 0DFF Sinhala
+            // 0E00 - 0E7F if Thai, assume shaping for vowel, tone marks
+            return true;
+        }
+        else if (code < 0x1780) {
+            return false;
+        }
+        else if (code <= 0x17ff) { // 1780 - 17FF Khmer
+            return true;
+        }
+        else if (code < 0x200c) {
+            return false;
+        }
+        else if (code <= 0x200d) { //  zwj or zwnj
+            return true;
+        }
+        else if (code >= 0x202a && code <= 0x202e) { // directional control
+            return true;
+        }
+        else if (code >= 0x206a && code <= 0x206f) { // directional control
+            return true;
+        }
+        return false;
+    }
+
+    public static PlatformLogger getLogger() {
+        return logger;
+    }
+
+    public static boolean isLogging() {
+        return logging;
+    }
+
+    public static boolean debugFonts() {
+        return debugFonts;
+    }
+
+
+    // The following methods are used by Swing.
+
+    /* Revise the implementation to in fact mean "font is a composite font.
+     * This ensures that Swing components will always benefit from the
+     * fall back fonts
+     */
+    public static boolean fontSupportsDefaultEncoding(Font font) {
+        return getFont2D(font) instanceof CompositeFont;
+    }
+
+    /**
+     * This method is provided for internal and exclusive use by Swing.
+     *
+     * It may be used in conjunction with fontSupportsDefaultEncoding(Font)
+     * In the event that a desktop properties font doesn't directly
+     * support the default encoding, (ie because the host OS supports
+     * adding support for the current locale automatically for native apps),
+     * then Swing calls this method to get a font which  uses the specified
+     * font for the code points it covers, but also supports this locale
+     * just as the standard composite fonts do.
+     * Note: this will over-ride any setting where an application
+     * specifies it prefers locale specific composite fonts.
+     * The logic for this, is that this method is used only where the user or
+     * application has specified that the native L&F be used, and that
+     * we should honour that request to use the same font as native apps use.
+     *
+     * The behaviour of this method is to construct a new composite
+     * Font object that uses the specified physical font as its first
+     * component, and adds all the components of "dialog" as fall back
+     * components.
+     * The method currently assumes that only the size and style attributes
+     * are set on the specified font. It doesn't copy the font transform or
+     * other attributes because they aren't set on a font created from
+     * the desktop. This will need to be fixed if use is broadened.
+     *
+     * Operations such as Font.deriveFont will work properly on the
+     * font returned by this method for deriving a different point size.
+     * Additionally it tries to support a different style by calling
+     * getNewComposite() below. That also supports replacing slot zero
+     * with a different physical font but that is expected to be "rare".
+     * Deriving with a different style is needed because its been shown
+     * that some applications try to do this for Swing FontUIResources.
+     * Also operations such as new Font(font.getFontName(..), Font.PLAIN, 14);
+     * will NOT yield the same result, as the new underlying CompositeFont
+     * cannot be "looked up" in the font registry.
+     * This returns a FontUIResource as that is the Font sub-class needed
+     * by Swing.
+     * Suggested usage is something like :
+     * FontUIResource fuir;
+     * Font desktopFont = getDesktopFont(..);
+     * // NOTE even if fontSupportsDefaultEncoding returns true because
+     * // you get Tahoma and are running in an English locale, you may
+     * // still want to just call getCompositeFontUIResource() anyway
+     * // as only then will you get fallback fonts - eg for CJK.
+     * if (FontManager.fontSupportsDefaultEncoding(desktopFont)) {
+     *   fuir = new FontUIResource(..);
+     * } else {
+     *   fuir = FontManager.getCompositeFontUIResource(desktopFont);
+     * }
+     * return fuir;
+     */
+    public static FontUIResource getCompositeFontUIResource(Font font) {
+
+        FontUIResource fuir =
+            new FontUIResource(font.getName(),font.getStyle(),font.getSize());
+        Font2D font2D = FontUtilities.getFont2D(font);
+
+        if (!(font2D instanceof PhysicalFont)) {
+            /* Swing should only be calling this when a font is obtained
+             * from desktop properties, so should generally be a physical font,
+             * an exception might be for names like "MS Serif" which are
+             * automatically mapped to "Serif", so there's no need to do
+             * anything special in that case. But note that suggested usage
+             * is first to call fontSupportsDefaultEncoding(Font) and this
+             * method should not be called if that were to return true.
+             */
+             return fuir;
+        }
+
+        FontManager fm = FontManagerFactory.getInstance();
+        CompositeFont dialog2D =
+          (CompositeFont) fm.findFont2D("dialog", font.getStyle(), FontManager.NO_FALLBACK);
+        if (dialog2D == null) { /* shouldn't happen */
+            return fuir;
+        }
+        PhysicalFont physicalFont = (PhysicalFont)font2D;
+        CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
+        FontAccess.getFontAccess().setFont2D(fuir, compFont.handle);
+        /* marking this as a created font is needed as only created fonts
+         * copy their creator's handles.
+         */
+        FontAccess.getFontAccess().setCreatedFont(fuir);
+        return fuir;
+    }
+
+   /* A small "map" from GTK/fontconfig names to the equivalent JDK
+    * logical font name.
+    */
+    private static final String[][] nameMap = {
+        {"sans",       "sansserif"},
+        {"sans-serif", "sansserif"},
+        {"serif",      "serif"},
+        {"monospace",  "monospaced"}
+    };
+
+    public static String mapFcName(String name) {
+        for (int i = 0; i < nameMap.length; i++) {
+            if (name.equals(nameMap[i][0])) {
+                return nameMap[i][1];
+            }
+        }
+        return null;
+    }
+
+
+    /* This is called by Swing passing in a fontconfig family name
+     * such as "sans". In return Swing gets a FontUIResource instance
+     * that has queried fontconfig to resolve the font(s) used for this.
+     * Fontconfig will if asked return a list of fonts to give the largest
+     * possible code point coverage.
+     * For now we use only the first font returned by fontconfig, and
+     * back it up with the most closely matching JDK logical font.
+     * Essentially this means pre-pending what we return now with fontconfig's
+     * preferred physical font. This could lead to some duplication in cases,
+     * if we already included that font later. We probably should remove such
+     * duplicates, but it is not a significant problem. It can be addressed
+     * later as part of creating a Composite which uses more of the
+     * same fonts as fontconfig. At that time we also should pay more
+     * attention to the special rendering instructions fontconfig returns,
+     * such as whether we should prefer embedded bitmaps over antialiasing.
+     * There's no way to express that via a Font at present.
+     */
+    public static FontUIResource getFontConfigFUIR(String fcFamily,
+                                                   int style, int size) {
+
+        String mapped = mapFcName(fcFamily);
+        if (mapped == null) {
+            mapped = "sansserif";
+        }
+
+        FontUIResource fuir;
+        FontManager fm = FontManagerFactory.getInstance();
+        if (fm instanceof SunFontManager) {
+            SunFontManager sfm = (SunFontManager) fm;
+            fuir = sfm.getFontConfigFUIR(mapped, style, size);
+        } else {
+            fuir = new FontUIResource(mapped, style, size);
+        }
+        return fuir;
+    }
+
+
+    /**
+     * Used by windows printing to assess if a font is likely to
+     * be layout compatible with JDK
+     * TrueType fonts should be, but if they have no GPOS table,
+     * but do have a GSUB table, then they are probably older
+     * fonts GDI handles differently.
+     */
+    public static boolean textLayoutIsCompatible(Font font) {
+
+        Font2D font2D = getFont2D(font);
+        if (font2D instanceof TrueTypeFont) {
+            TrueTypeFont ttf = (TrueTypeFont) font2D;
+            return
+                ttf.getDirectoryEntry(TrueTypeFont.GSUBTag) == null ||
+                ttf.getDirectoryEntry(TrueTypeFont.GPOSTag) != null;
+        } else {
+            return false;
+        }
+    }
+
+}
--- a/jdk/src/share/classes/sun/font/FreetypeFontScaler.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/FreetypeFontScaler.java	Wed Jul 05 17:01:52 2017 +0200
@@ -79,7 +79,7 @@
                                             pScalerContext,
                                             nativeScaler);
         }
-        return FontManager.getNullScaler().getFontMetrics(0L);
+        return FontScaler.getNullScaler().getFontMetrics(0L);
     }
 
     synchronized float getGlyphAdvance(long pScalerContext, int glyphCode)
@@ -90,7 +90,8 @@
                                          nativeScaler,
                                          glyphCode);
         }
-        return FontManager.getNullScaler().getGlyphAdvance(0L, glyphCode);
+        return FontScaler.getNullScaler().
+            getGlyphAdvance(0L, glyphCode);
     }
 
     synchronized void getGlyphMetrics(long pScalerContext,
@@ -104,7 +105,8 @@
                                   metrics);
             return;
         }
-        FontManager.getNullScaler().getGlyphMetrics(0L, glyphCode, metrics);
+        FontScaler.getNullScaler().
+            getGlyphMetrics(0L, glyphCode, metrics);
     }
 
     synchronized long getGlyphImage(long pScalerContext, int glyphCode)
@@ -115,7 +117,8 @@
                                        nativeScaler,
                                        glyphCode);
         }
-        return FontManager.getNullScaler().getGlyphImage(0L, glyphCode);
+        return FontScaler.getNullScaler().
+            getGlyphImage(0L, glyphCode);
     }
 
     synchronized Rectangle2D.Float getGlyphOutlineBounds(
@@ -127,7 +130,8 @@
                                                nativeScaler,
                                                glyphCode);
         }
-        return FontManager.getNullScaler().getGlyphOutlineBounds(0L,glyphCode);
+        return FontScaler.getNullScaler().
+            getGlyphOutlineBounds(0L,glyphCode);
     }
 
     synchronized GeneralPath getGlyphOutline(
@@ -140,7 +144,8 @@
                                          glyphCode,
                                          x, y);
         }
-        return FontManager.getNullScaler().getGlyphOutline(0L, glyphCode, x,y);
+        return FontScaler.getNullScaler().
+            getGlyphOutline(0L, glyphCode, x,y);
     }
 
     synchronized GeneralPath getGlyphVectorOutline(
@@ -154,8 +159,8 @@
                                                numGlyphs,
                                                x, y);
         }
-        return FontManager.getNullScaler().getGlyphVectorOutline(
-                   0L, glyphs, numGlyphs, x, y);
+        return FontScaler
+            .getNullScaler().getGlyphVectorOutline(0L, glyphs, numGlyphs, x, y);
     }
 
     synchronized long getLayoutTableCache() throws FontScalerException {
@@ -173,21 +178,21 @@
         if (nativeScaler != 0L) {
             return getNumGlyphsNative(nativeScaler);
         }
-        return FontManager.getNullScaler().getNumGlyphs();
+        return FontScaler.getNullScaler().getNumGlyphs();
     }
 
     synchronized int getMissingGlyphCode()  throws FontScalerException {
         if (nativeScaler != 0L) {
             return getMissingGlyphCodeNative(nativeScaler);
         }
-        return FontManager.getNullScaler().getMissingGlyphCode();
+        return FontScaler.getNullScaler().getMissingGlyphCode();
     }
 
     synchronized int getGlyphCode(char charCode) throws FontScalerException {
         if (nativeScaler != 0L) {
             return getGlyphCodeNative(nativeScaler, charCode);
         }
-        return FontManager.getNullScaler().getGlyphCode(charCode);
+        return FontScaler.getNullScaler().getGlyphCode(charCode);
     }
 
     synchronized Point2D.Float getGlyphPoint(long pScalerContext,
@@ -197,7 +202,7 @@
             return getGlyphPointNative(font.get(), pScalerContext,
                                       nativeScaler, glyphCode, ptNumber);
         }
-        return FontManager.getNullScaler().getGlyphPoint(
+        return FontScaler.getNullScaler().getGlyphPoint(
                    pScalerContext, glyphCode,  ptNumber);
     }
 
--- a/jdk/src/share/classes/sun/font/GlyphLayout.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/GlyphLayout.java	Wed Jul 05 17:01:52 2017 +0200
@@ -259,7 +259,7 @@
              */
             int aa =
                 FontStrikeDesc.getAAHintIntVal(frc.getAntiAliasingHint(),
-                                               FontManager.getFont2D(font),
+                                               FontUtilities.getFont2D(font),
                                                (int)Math.abs(ptSize));
             int fm = FontStrikeDesc.getFMHintIntVal
                 (frc.getFractionalMetricsHint());
@@ -407,7 +407,7 @@
 
         int lang = -1; // default for now
 
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
 
         _textRecord.init(text, offset, lim, min, max);
         int start = offset;
--- a/jdk/src/share/classes/sun/font/PhysicalStrike.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/PhysicalStrike.java	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,14 @@
 public abstract class PhysicalStrike extends FontStrike {
 
     static final long INTMASK = 0xffffffffL;
+    static boolean longAddresses;
+    static {
+        switch (StrikeCache.nativeAddressSize) {
+        case 8: longAddresses = true; break;
+        case 4: longAddresses = false; break;
+        default: throw new RuntimeException("Unexpected address size");
+        }
+    }
 
     private PhysicalFont physicalFont;
     protected CharToGlyphMapper mapper;
--- a/jdk/src/share/classes/sun/font/StandardGlyphVector.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/StandardGlyphVector.java	Wed Jul 05 17:01:52 2017 +0200
@@ -197,7 +197,7 @@
 
             // how do we know its a base glyph
             // for now, it is if the natural advance of the glyph is non-zero
-            Font2D f2d = FontManager.getFont2D(font);
+            Font2D f2d = FontUtilities.getFont2D(font);
             FontStrike strike = f2d.getStrike(font, frc);
 
             float[] deltas = { trackPt.x, trackPt.y };
@@ -1116,7 +1116,7 @@
     }
 
     private void initFontData() {
-        font2D = FontManager.getFont2D(font);
+        font2D = FontUtilities.getFont2D(font);
         float s = font.getSize2D();
         if (font.isTransformed()) {
             ftx = font.getTransform();
--- a/jdk/src/share/classes/sun/font/StrikeCache.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/StrikeCache.java	Wed Jul 05 17:01:52 2017 +0200
@@ -237,7 +237,7 @@
              * any glyphs. In this case we still want to free the scaler
              * context.
              */
-            if (FontManager.longAddresses) {
+            if (longAddresses()) {
                 freeLongMemory(new long[0], disposer.pScalerContext);
             } else {
                 freeIntMemory(new int[0], disposer.pScalerContext);
@@ -245,6 +245,10 @@
         }
     }
 
+    private static boolean longAddresses() {
+        return nativeAddressSize == 8;
+    }
+
     static void disposeStrike(final FontStrikeDisposer disposer) {
         // we need to execute the strike disposal on the rendering thread
         // because they may be accessed on that thread at the time of the
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/font/SunFontManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,3674 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+import java.awt.FontFormatException;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.swing.plaf.FontUIResource;
+import sun.awt.AppContext;
+import sun.awt.FontConfiguration;
+import sun.awt.SunToolkit;
+import sun.java2d.FontSupport;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * The base implementation of the {@link FontManager} interface. It implements
+ * the platform independent, shared parts of OpenJDK's FontManager
+ * implementations. The platform specific parts are declared as abstract
+ * methods that have to be implemented by specific implementations.
+ */
+public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
+
+    private static class TTFilter implements FilenameFilter {
+        public boolean accept(File dir,String name) {
+            /* all conveniently have the same suffix length */
+            int offset = name.length()-4;
+            if (offset <= 0) { /* must be at least A.ttf */
+                return false;
+            } else {
+                return(name.startsWith(".ttf", offset) ||
+                       name.startsWith(".TTF", offset) ||
+                       name.startsWith(".ttc", offset) ||
+                       name.startsWith(".TTC", offset));
+            }
+        }
+    }
+
+    private static class T1Filter implements FilenameFilter {
+        public boolean accept(File dir,String name) {
+            if (noType1Font) {
+                return false;
+            }
+            /* all conveniently have the same suffix length */
+            int offset = name.length()-4;
+            if (offset <= 0) { /* must be at least A.pfa */
+                return false;
+            } else {
+                return(name.startsWith(".pfa", offset) ||
+                       name.startsWith(".pfb", offset) ||
+                       name.startsWith(".PFA", offset) ||
+                       name.startsWith(".PFB", offset));
+            }
+        }
+    }
+
+     private static class TTorT1Filter implements FilenameFilter {
+        public boolean accept(File dir, String name) {
+
+            /* all conveniently have the same suffix length */
+            int offset = name.length()-4;
+            if (offset <= 0) { /* must be at least A.ttf or A.pfa */
+                return false;
+            } else {
+                boolean isTT =
+                    name.startsWith(".ttf", offset) ||
+                    name.startsWith(".TTF", offset) ||
+                    name.startsWith(".ttc", offset) ||
+                    name.startsWith(".TTC", offset);
+                if (isTT) {
+                    return true;
+                } else if (noType1Font) {
+                    return false;
+                } else {
+                    return(name.startsWith(".pfa", offset) ||
+                           name.startsWith(".pfb", offset) ||
+                           name.startsWith(".PFA", offset) ||
+                           name.startsWith(".PFB", offset));
+                }
+            }
+        }
+    }
+
+     public static final int FONTFORMAT_NONE = -1;
+     public static final int FONTFORMAT_TRUETYPE = 0;
+     public static final int FONTFORMAT_TYPE1 = 1;
+     public static final int FONTFORMAT_T2K = 2;
+     public static final int FONTFORMAT_TTC = 3;
+     public static final int FONTFORMAT_COMPOSITE = 4;
+     public static final int FONTFORMAT_NATIVE = 5;
+
+     /* Pool of 20 font file channels chosen because some UTF-8 locale
+      * composite fonts can use up to 16 platform fonts (including the
+      * Lucida fall back). This should prevent channel thrashing when
+      * dealing with one of these fonts.
+      * The pool array stores the fonts, rather than directly referencing
+      * the channels, as the font needs to do the open/close work.
+      */
+     private static final int CHANNELPOOLSIZE = 20;
+     private int lastPoolIndex = 0;
+     private FileFont fontFileCache[] = new FileFont[CHANNELPOOLSIZE];
+
+    /* Need to implement a simple linked list scheme for fast
+     * traversal and lookup.
+     * Also want to "fast path" dialog so there's minimal overhead.
+     */
+    /* There are at exactly 20 composite fonts: 5 faces (but some are not
+     * usually different), in 4 styles. The array may be auto-expanded
+     * later if more are needed, eg for user-defined composites or locale
+     * variants.
+     */
+    private int maxCompFont = 0;
+    private CompositeFont [] compFonts = new CompositeFont[20];
+    private ConcurrentHashMap<String, CompositeFont>
+        compositeFonts = new ConcurrentHashMap<String, CompositeFont>();
+    private ConcurrentHashMap<String, PhysicalFont>
+        physicalFonts = new ConcurrentHashMap<String, PhysicalFont>();
+    private ConcurrentHashMap<String, PhysicalFont>
+        registeredFonts = new ConcurrentHashMap<String, PhysicalFont>();
+
+    /* given a full name find the Font. Remind: there's duplication
+     * here in that this contains the content of compositeFonts +
+     * physicalFonts.
+     */
+    private ConcurrentHashMap<String, Font2D>
+        fullNameToFont = new ConcurrentHashMap<String, Font2D>();
+
+    /* TrueType fonts have localised names. Support searching all
+     * of these before giving up on a name.
+     */
+    private HashMap<String, TrueTypeFont> localeFullNamesToFont;
+
+    private PhysicalFont defaultPhysicalFont;
+
+    static boolean longAddresses;
+    private boolean loaded1dot0Fonts = false;
+    boolean loadedAllFonts = false;
+    boolean loadedAllFontFiles = false;
+    HashMap<String,String> jreFontMap;
+    HashSet<String> jreLucidaFontFiles;
+    String[] jreOtherFontFiles;
+    boolean noOtherJREFontFiles = false; // initial assumption.
+
+    public static final String lucidaFontName = "Lucida Sans Regular";
+    public static String jreLibDirName;
+    public static String jreFontDirName;
+    private static HashSet<String> missingFontFiles = null;
+    private String defaultFontName;
+    private String defaultFontFileName;
+    protected HashSet registeredFontFiles = new HashSet();
+
+    private ArrayList badFonts;
+    /* fontPath is the location of all fonts on the system, excluding the
+     * JRE's own font directory but including any path specified using the
+     * sun.java2d.fontpath property. Together with that property,  it is
+     * initialised by the getPlatformFontPath() method
+     * This call must be followed by a call to registerFontDirs(fontPath)
+     * once any extra debugging path has been appended.
+     */
+    protected String fontPath;
+    private FontConfiguration fontConfig;
+    /* discoveredAllFonts is set to true when all fonts on the font path are
+     * discovered. This usually also implies opening, validating and
+     * registering, but an implementation may be optimized to avold this.
+     * So see also "loadedAllFontFiles"
+     */
+    private boolean discoveredAllFonts = false;
+
+    /* No need to keep consing up new instances - reuse a singleton.
+     * The trade-off is that these objects don't get GC'd.
+     */
+    private static final FilenameFilter ttFilter = new TTFilter();
+    private static final FilenameFilter t1Filter = new T1Filter();
+
+    private Font[] allFonts;
+    private String[] allFamilies; // cache for default locale only
+    private Locale lastDefaultLocale;
+
+    public static boolean noType1Font;
+
+    /* Used to indicate required return type from toArray(..); */
+    private static String[] STR_ARRAY = new String[0];
+
+    /**
+     * Deprecated, unsupported hack - actually invokes a bug!
+     * Left in for a customer, don't remove.
+     */
+    private boolean usePlatformFontMetrics = false;
+
+    /**
+     * Returns the global SunFontManager instance. This is similar to
+     * {@link FontManagerFactory#getInstance()} but it returns a
+     * SunFontManager instance instead. This is only used in internal classes
+     * where we can safely assume that a SunFontManager is to be used.
+     *
+     * @return the global SunFontManager instance
+     */
+    public static SunFontManager getInstance() {
+        FontManager fm = FontManagerFactory.getInstance();
+        return (SunFontManager) fm;
+    }
+
+    public FilenameFilter getTrueTypeFilter() {
+        return ttFilter;
+    }
+
+    public FilenameFilter getType1Filter() {
+        return t1Filter;
+    }
+
+    @Override
+    public boolean usingPerAppContextComposites() {
+        return _usingPerAppContextComposites;
+    }
+
+    private void initJREFontMap() {
+
+        /* Key is familyname+style value as an int.
+         * Value is filename containing the font.
+         * If no mapping exists, it means there is no font file for the style
+         * If the mapping exists but the file doesn't exist in the deferred
+         * list then it means its not installed.
+         * This looks like a lot of code and strings but if it saves even
+         * a single file being opened at JRE start-up there's a big payoff.
+         * Lucida Sans is probably the only important case as the others
+         * are rarely used. Consider removing the other mappings if there's
+         * no evidence they are useful in practice.
+         */
+        jreFontMap = new HashMap<String,String>();
+        jreLucidaFontFiles = new HashSet<String>();
+        if (isOpenJDK()) {
+            return;
+        }
+        /* Lucida Sans Family */
+        jreFontMap.put("lucida sans0",   "LucidaSansRegular.ttf");
+        jreFontMap.put("lucida sans1",   "LucidaSansDemiBold.ttf");
+        /* Lucida Sans full names (map Bold and DemiBold to same file) */
+        jreFontMap.put("lucida sans regular0", "LucidaSansRegular.ttf");
+        jreFontMap.put("lucida sans regular1", "LucidaSansDemiBold.ttf");
+        jreFontMap.put("lucida sans bold1", "LucidaSansDemiBold.ttf");
+        jreFontMap.put("lucida sans demibold1", "LucidaSansDemiBold.ttf");
+
+        /* Lucida Sans Typewriter Family */
+        jreFontMap.put("lucida sans typewriter0",
+                       "LucidaTypewriterRegular.ttf");
+        jreFontMap.put("lucida sans typewriter1", "LucidaTypewriterBold.ttf");
+        /* Typewriter full names (map Bold and DemiBold to same file) */
+        jreFontMap.put("lucida sans typewriter regular0",
+                       "LucidaTypewriter.ttf");
+        jreFontMap.put("lucida sans typewriter regular1",
+                       "LucidaTypewriterBold.ttf");
+        jreFontMap.put("lucida sans typewriter bold1",
+                       "LucidaTypewriterBold.ttf");
+        jreFontMap.put("lucida sans typewriter demibold1",
+                       "LucidaTypewriterBold.ttf");
+
+        /* Lucida Bright Family */
+        jreFontMap.put("lucida bright0", "LucidaBrightRegular.ttf");
+        jreFontMap.put("lucida bright1", "LucidaBrightDemiBold.ttf");
+        jreFontMap.put("lucida bright2", "LucidaBrightItalic.ttf");
+        jreFontMap.put("lucida bright3", "LucidaBrightDemiItalic.ttf");
+        /* Lucida Bright full names (map Bold and DemiBold to same file) */
+        jreFontMap.put("lucida bright regular0", "LucidaBrightRegular.ttf");
+        jreFontMap.put("lucida bright regular1", "LucidaBrightDemiBold.ttf");
+        jreFontMap.put("lucida bright regular2", "LucidaBrightItalic.ttf");
+        jreFontMap.put("lucida bright regular3", "LucidaBrightDemiItalic.ttf");
+        jreFontMap.put("lucida bright bold1", "LucidaBrightDemiBold.ttf");
+        jreFontMap.put("lucida bright bold3", "LucidaBrightDemiItalic.ttf");
+        jreFontMap.put("lucida bright demibold1", "LucidaBrightDemiBold.ttf");
+        jreFontMap.put("lucida bright demibold3","LucidaBrightDemiItalic.ttf");
+        jreFontMap.put("lucida bright italic2", "LucidaBrightItalic.ttf");
+        jreFontMap.put("lucida bright italic3", "LucidaBrightDemiItalic.ttf");
+        jreFontMap.put("lucida bright bold italic3",
+                       "LucidaBrightDemiItalic.ttf");
+        jreFontMap.put("lucida bright demibold italic3",
+                       "LucidaBrightDemiItalic.ttf");
+        for (String ffile : jreFontMap.values()) {
+            jreLucidaFontFiles.add(ffile);
+        }
+    }
+
+    static {
+
+        java.security.AccessController.doPrivileged(
+                                    new java.security.PrivilegedAction() {
+
+           public Object run() {
+               FontManagerNativeLibrary.load();
+
+               // JNI throws an exception if a class/method/field is not found,
+               // so there's no need to do anything explicit here.
+               initIDs();
+
+               switch (StrikeCache.nativeAddressSize) {
+               case 8: longAddresses = true; break;
+               case 4: longAddresses = false; break;
+               default: throw new RuntimeException("Unexpected address size");
+               }
+
+               noType1Font =
+                   "true".equals(System.getProperty("sun.java2d.noType1Font"));
+               jreLibDirName =
+                   System.getProperty("java.home","") + File.separator + "lib";
+               jreFontDirName = jreLibDirName + File.separator + "fonts";
+               File lucidaFile =
+                   new File(jreFontDirName + File.separator + FontUtilities.LUCIDA_FILE_NAME);
+
+               return null;
+           }
+        });
+    }
+
+    public TrueTypeFont getEUDCFont() {
+        // Overridden in Windows.
+        return null;
+    }
+
+    /* Initialise ptrs used by JNI methods */
+    private static native void initIDs();
+
+    @SuppressWarnings("unchecked")
+    protected SunFontManager() {
+
+        initJREFontMap();
+        java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction() {
+                    public Object run() {
+                        File badFontFile =
+                            new File(jreFontDirName + File.separator +
+                                     "badfonts.txt");
+                        if (badFontFile.exists()) {
+                            FileInputStream fis = null;
+                            try {
+                                badFonts = new ArrayList();
+                                fis = new FileInputStream(badFontFile);
+                                InputStreamReader isr = new InputStreamReader(fis);
+                                BufferedReader br = new BufferedReader(isr);
+                                while (true) {
+                                    String name = br.readLine();
+                                    if (name == null) {
+                                        break;
+                                    } else {
+                                        if (FontUtilities.debugFonts()) {
+                                            FontUtilities.getLogger().warning("read bad font: " +
+                                                           name);
+                                        }
+                                        badFonts.add(name);
+                                    }
+                                }
+                            } catch (IOException e) {
+                                try {
+                                    if (fis != null) {
+                                        fis.close();
+                                    }
+                                } catch (IOException ioe) {
+                                }
+                            }
+                        }
+
+                        /* Here we get the fonts in jre/lib/fonts and register
+                         * them so they are always available and preferred over
+                         * other fonts. This needs to be registered before the
+                         * composite fonts as otherwise some native font that
+                         * corresponds may be found as we don't have a way to
+                         * handle two fonts of the same name, so the JRE one
+                         * must be the first one registered. Pass "true" to
+                         * registerFonts method as on-screen these JRE fonts
+                         * always go through the T2K rasteriser.
+                         */
+                        if (FontUtilities.isLinux) {
+                            /* Linux font configuration uses these fonts */
+                            registerFontDir(jreFontDirName);
+                        }
+                        registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK,
+                                           true, false);
+
+                        /* Create the font configuration and get any font path
+                         * that might be specified.
+                         */
+                        fontConfig = createFontConfiguration();
+                        if (isOpenJDK()) {
+                            String[] fontInfo = getDefaultPlatformFont();
+                            defaultFontName = fontInfo[0];
+                            defaultFontFileName = fontInfo[1];
+                        }
+
+                        String extraFontPath = fontConfig.getExtraFontPath();
+
+                        /* In prior releases the debugging font path replaced
+                         * all normally located font directories except for the
+                         * JRE fonts dir. This directory is still always located
+                         * and placed at the head of the path but as an
+                         * augmentation to the previous behaviour the
+                         * changes below allow you to additionally append to
+                         * the font path by starting with append: or prepend by
+                         * starting with a prepend: sign. Eg: to append
+                         * -Dsun.java2d.fontpath=append:/usr/local/myfonts
+                         * and to prepend
+                         * -Dsun.java2d.fontpath=prepend:/usr/local/myfonts Disp
+                         *
+                         * If there is an appendedfontpath it in the font
+                         * configuration it is used instead of searching the
+                         * system for dirs.
+                         * The behaviour of append and prepend is then similar
+                         * to the normal case. ie it goes after what
+                         * you prepend and * before what you append. If the
+                         * sun.java2d.fontpath property is used, but it
+                         * neither the append or prepend syntaxes is used then
+                         * as except for the JRE dir the path is replaced and it
+                         * is up to you to make sure that all the right
+                         * directories are located. This is platform and
+                         * locale-specific so its almost impossible to get
+                         * right, so it should be used with caution.
+                         */
+                        boolean prependToPath = false;
+                        boolean appendToPath = false;
+                        String dbgFontPath =
+                            System.getProperty("sun.java2d.fontpath");
+
+                        if (dbgFontPath != null) {
+                            if (dbgFontPath.startsWith("prepend:")) {
+                                prependToPath = true;
+                                dbgFontPath =
+                                    dbgFontPath.substring("prepend:".length());
+                            } else if (dbgFontPath.startsWith("append:")) {
+                                appendToPath = true;
+                                dbgFontPath =
+                                    dbgFontPath.substring("append:".length());
+                            }
+                        }
+
+                        if (FontUtilities.debugFonts()) {
+                            PlatformLogger logger = FontUtilities.getLogger();
+                            logger.info("JRE font directory: " + jreFontDirName);
+                            logger.info("Extra font path: " + extraFontPath);
+                            logger.info("Debug font path: " + dbgFontPath);
+                        }
+
+                        if (dbgFontPath != null) {
+                            /* In debugging mode we register all the paths
+                             * Caution: this is a very expensive call on Solaris:-
+                             */
+                            fontPath = getPlatformFontPath(noType1Font);
+
+                            if (extraFontPath != null) {
+                                fontPath =
+                                    extraFontPath + File.pathSeparator + fontPath;
+                            }
+                            if (appendToPath) {
+                                fontPath =
+                                    fontPath + File.pathSeparator + dbgFontPath;
+                            } else if (prependToPath) {
+                                fontPath =
+                                    dbgFontPath + File.pathSeparator + fontPath;
+                            } else {
+                                fontPath = dbgFontPath;
+                            }
+                            registerFontDirs(fontPath);
+                        } else if (extraFontPath != null) {
+                            /* If the font configuration contains an
+                             * "appendedfontpath" entry, it is interpreted as a
+                             * set of locations that should always be registered.
+                             * It may be additional to locations normally found
+                             * for that place, or it may be locations that need
+                             * to have all their paths registered to locate all
+                             * the needed platform names.
+                             * This is typically when the same .TTF file is
+                             * referenced from multiple font.dir files and all
+                             * of these must be read to find all the native
+                             * (XLFD) names for the font, so that X11 font APIs
+                             * can be used for as many code points as possible.
+                             */
+                            registerFontDirs(extraFontPath);
+                        }
+
+                        /* On Solaris, we need to register the Japanese TrueType
+                         * directory so that we can find the corresponding
+                         * bitmap fonts. This could be done by listing the
+                         * directory in the font configuration file, but we
+                         * don't want to confuse users with this quirk. There
+                         * are no bitmap fonts for other writing systems that
+                         * correspond to TrueType fonts and have matching XLFDs.
+                         * We need to register the bitmap fonts only in
+                         * environments where they're on the X font path, i.e.,
+                         * in the Japanese locale. Note that if the X Toolkit
+                         * is in use the font path isn't set up by JDK, but
+                         * users of a JA locale should have it
+                         * set up already by their login environment.
+                         */
+                        if (FontUtilities.isSolaris && Locale.JAPAN.equals(Locale.getDefault())) {
+                            registerFontDir("/usr/openwin/lib/locale/ja/X11/fonts/TT");
+                        }
+
+                        initCompositeFonts(fontConfig, null);
+
+                        return null;
+                    }
+                });
+
+        boolean platformFont = AccessController.doPrivileged(
+                        new PrivilegedAction<Boolean>() {
+                                public Boolean run() {
+                                        String prop =
+                                                System.getProperty("java2d.font.usePlatformFont");
+                                        String env = System.getenv("JAVA2D_USEPLATFORMFONT");
+                                        return "true".equals(prop) || env != null;
+                                }
+                        });
+
+        if (platformFont) {
+            usePlatformFontMetrics = true;
+            System.out.println("Enabling platform font metrics for win32. This is an unsupported option.");
+            System.out.println("This yields incorrect composite font metrics as reported by 1.1.x releases.");
+            System.out.println("It is appropriate only for use by applications which do not use any Java 2");
+            System.out.println("functionality. This property will be removed in a later release.");
+        }
+    }
+
+    /**
+     * This method is provided for internal and exclusive use by Swing.
+     *
+     * @param font representing a physical font.
+     * @return true if the underlying font is a TrueType or OpenType font
+     * that claims to support the Microsoft Windows encoding corresponding to
+     * the default file.encoding property of this JRE instance.
+     * This narrow value is useful for Swing to decide if the font is useful
+     * for the the Windows Look and Feel, or, if a  composite font should be
+     * used instead.
+     * The information used to make the decision is obtained from
+     * the ulCodePageRange fields in the font.
+     * A caller can use isLogicalFont(Font) in this class before calling
+     * this method and would not need to call this method if that
+     * returns true.
+     */
+//     static boolean fontSupportsDefaultEncoding(Font font) {
+//      String encoding =
+//          (String) java.security.AccessController.doPrivileged(
+//                new sun.security.action.GetPropertyAction("file.encoding"));
+
+//      if (encoding == null || font == null) {
+//          return false;
+//      }
+
+//      encoding = encoding.toLowerCase(Locale.ENGLISH);
+
+//      return FontManager.fontSupportsEncoding(font, encoding);
+//     }
+
+    public Font2DHandle getNewComposite(String family, int style,
+                                        Font2DHandle handle) {
+
+        if (!(handle.font2D instanceof CompositeFont)) {
+            return handle;
+        }
+
+        CompositeFont oldComp = (CompositeFont)handle.font2D;
+        PhysicalFont oldFont = oldComp.getSlotFont(0);
+
+        if (family == null) {
+            family = oldFont.getFamilyName(null);
+        }
+        if (style == -1) {
+            style = oldComp.getStyle();
+        }
+
+        Font2D newFont = findFont2D(family, style, NO_FALLBACK);
+        if (!(newFont instanceof PhysicalFont)) {
+            newFont = oldFont;
+        }
+        PhysicalFont physicalFont = (PhysicalFont)newFont;
+        CompositeFont dialog2D =
+            (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
+        if (dialog2D == null) { /* shouldn't happen */
+            return handle;
+        }
+        CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
+        Font2DHandle newHandle = new Font2DHandle(compFont);
+        return newHandle;
+    }
+
+    protected void registerCompositeFont(String compositeName,
+                                      String[] componentFileNames,
+                                      String[] componentNames,
+                                      int numMetricsSlots,
+                                      int[] exclusionRanges,
+                                      int[] exclusionMaxIndex,
+                                      boolean defer) {
+
+        CompositeFont cf = new CompositeFont(compositeName,
+                                             componentFileNames,
+                                             componentNames,
+                                             numMetricsSlots,
+                                             exclusionRanges,
+                                             exclusionMaxIndex, defer, this);
+        addCompositeToFontList(cf, Font2D.FONT_CONFIG_RANK);
+        synchronized (compFonts) {
+            compFonts[maxCompFont++] = cf;
+        }
+    }
+
+    /* This variant is used only when the application specifies
+     * a variant of composite fonts which prefers locale specific or
+     * proportional fonts.
+     */
+    protected static void registerCompositeFont(String compositeName,
+                                                String[] componentFileNames,
+                                                String[] componentNames,
+                                                int numMetricsSlots,
+                                                int[] exclusionRanges,
+                                                int[] exclusionMaxIndex,
+                                                boolean defer,
+                                                ConcurrentHashMap<String, Font2D>
+                                                altNameCache) {
+
+        CompositeFont cf = new CompositeFont(compositeName,
+                                             componentFileNames,
+                                             componentNames,
+                                             numMetricsSlots,
+                                             exclusionRanges,
+                                             exclusionMaxIndex, defer,
+                                             SunFontManager.getInstance());
+
+        /* if the cache has an existing composite for this case, make
+         * its handle point to this new font.
+         * This ensures that when the altNameCache that is passed in
+         * is the global mapNameCache - ie we are running as an application -
+         * that any statically created java.awt.Font instances which already
+         * have a Font2D instance will have that re-directed to the new Font
+         * on subsequent uses. This is particularly important for "the"
+         * default font instance, or similar cases where a UI toolkit (eg
+         * Swing) has cached a java.awt.Font. Note that if Swing is using
+         * a custom composite APIs which update the standard composites have
+         * no effect - this is typically the case only when using the Windows
+         * L&F where these APIs would conflict with that L&F anyway.
+         */
+        Font2D oldFont = (Font2D)
+            altNameCache.get(compositeName.toLowerCase(Locale.ENGLISH));
+        if (oldFont instanceof CompositeFont) {
+            oldFont.handle.font2D = cf;
+        }
+        altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
+    }
+
+    private void addCompositeToFontList(CompositeFont f, int rank) {
+
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger().info("Add to Family "+ f.familyName +
+                        ", Font " + f.fullName + " rank="+rank);
+        }
+        f.setRank(rank);
+        compositeFonts.put(f.fullName, f);
+        fullNameToFont.put(f.fullName.toLowerCase(Locale.ENGLISH), f);
+
+        FontFamily family = FontFamily.getFamily(f.familyName);
+        if (family == null) {
+            family = new FontFamily(f.familyName, true, rank);
+        }
+        family.setFont(f, f.style);
+    }
+
+    /*
+     * Systems may have fonts with the same name.
+     * We want to register only one of such fonts (at least until
+     * such time as there might be APIs which can accommodate > 1).
+     * Rank is 1) font configuration fonts, 2) JRE fonts, 3) OT/TT fonts,
+     * 4) Type1 fonts, 5) native fonts.
+     *
+     * If the new font has the same name as the old font, the higher
+     * ranked font gets added, replacing the lower ranked one.
+     * If the fonts are of equal rank, then make a special case of
+     * font configuration rank fonts, which are on closer inspection,
+     * OT/TT fonts such that the larger font is registered. This is
+     * a heuristic since a font may be "larger" in the sense of more
+     * code points, or be a larger "file" because it has more bitmaps.
+     * So it is possible that using filesize may lead to less glyphs, and
+     * using glyphs may lead to lower quality display. Probably number
+     * of glyphs is the ideal, but filesize is information we already
+     * have and is good enough for the known cases.
+     * Also don't want to register fonts that match JRE font families
+     * but are coming from a source other than the JRE.
+     * This will ensure that we will algorithmically style the JRE
+     * plain font and get the same set of glyphs for all styles.
+     *
+     * Note that this method returns a value
+     * if it returns the same object as its argument that means this
+     * font was newly registered.
+     * If it returns a different object it means this font already exists,
+     * and you should use that one.
+     * If it returns null means this font was not registered and none
+     * in that name is registered. The caller must find a substitute
+     */
+    private PhysicalFont addToFontList(PhysicalFont f, int rank) {
+
+        String fontName = f.fullName;
+        String familyName = f.familyName;
+        if (fontName == null || "".equals(fontName)) {
+            return null;
+        }
+        if (compositeFonts.containsKey(fontName)) {
+            /* Don't register any font that has the same name as a composite */
+            return null;
+        }
+        f.setRank(rank);
+        if (!physicalFonts.containsKey(fontName)) {
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().info("Add to Family "+familyName +
+                            ", Font " + fontName + " rank="+rank);
+            }
+            physicalFonts.put(fontName, f);
+            FontFamily family = FontFamily.getFamily(familyName);
+            if (family == null) {
+                family = new FontFamily(familyName, false, rank);
+                family.setFont(f, f.style);
+            } else if (family.getRank() >= rank) {
+                family.setFont(f, f.style);
+            }
+            fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH), f);
+            return f;
+        } else {
+            PhysicalFont newFont = f;
+            PhysicalFont oldFont = physicalFonts.get(fontName);
+            if (oldFont == null) {
+                return null;
+            }
+            /* If the new font is of an equal or higher rank, it is a
+             * candidate to replace the current one, subject to further tests.
+             */
+            if (oldFont.getRank() >= rank) {
+
+                /* All fonts initialise their mapper when first
+                 * used. If the mapper is non-null then this font
+                 * has been accessed at least once. In that case
+                 * do not replace it. This may be overly stringent,
+                 * but its probably better not to replace a font that
+                 * someone is already using without a compelling reason.
+                 * Additionally the primary case where it is known
+                 * this behaviour is important is in certain composite
+                 * fonts, and since all the components of a given
+                 * composite are usually initialised together this
+                 * is unlikely. For this to be a problem, there would
+                 * have to be a case where two different composites used
+                 * different versions of the same-named font, and they
+                 * were initialised and used at separate times.
+                 * In that case we continue on and allow the new font to
+                 * be installed, but replaceFont will continue to allow
+                 * the original font to be used in Composite fonts.
+                 */
+                if (oldFont.mapper != null && rank > Font2D.FONT_CONFIG_RANK) {
+                    return oldFont;
+                }
+
+                /* Normally we require a higher rank to replace a font,
+                 * but as a special case, if the two fonts are the same rank,
+                 * and are instances of TrueTypeFont we want the
+                 * more complete (larger) one.
+                 */
+                if (oldFont.getRank() == rank) {
+                    if (oldFont instanceof TrueTypeFont &&
+                        newFont instanceof TrueTypeFont) {
+                        TrueTypeFont oldTTFont = (TrueTypeFont)oldFont;
+                        TrueTypeFont newTTFont = (TrueTypeFont)newFont;
+                        if (oldTTFont.fileSize >= newTTFont.fileSize) {
+                            return oldFont;
+                        }
+                    } else {
+                        return oldFont;
+                    }
+                }
+                /* Don't replace ever JRE fonts.
+                 * This test is in case a font configuration references
+                 * a Lucida font, which has been mapped to a Lucida
+                 * from the host O/S. The assumption here is that any
+                 * such font configuration file is probably incorrect, or
+                 * the host O/S version is for the use of AWT.
+                 * In other words if we reach here, there's a possible
+                 * problem with our choice of font configuration fonts.
+                 */
+                if (oldFont.platName.startsWith(jreFontDirName)) {
+                    if (FontUtilities.isLogging()) {
+                        FontUtilities.getLogger()
+                              .warning("Unexpected attempt to replace a JRE " +
+                                       " font " + fontName + " from " +
+                                        oldFont.platName +
+                                       " with " + newFont.platName);
+                    }
+                    return oldFont;
+                }
+
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger()
+                          .info("Replace in Family " + familyName +
+                                ",Font " + fontName + " new rank="+rank +
+                                " from " + oldFont.platName +
+                                " with " + newFont.platName);
+                }
+                replaceFont(oldFont, newFont);
+                physicalFonts.put(fontName, newFont);
+                fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH),
+                                   newFont);
+
+                FontFamily family = FontFamily.getFamily(familyName);
+                if (family == null) {
+                    family = new FontFamily(familyName, false, rank);
+                    family.setFont(newFont, newFont.style);
+                } else if (family.getRank() >= rank) {
+                    family.setFont(newFont, newFont.style);
+                }
+                return newFont;
+            } else {
+                return oldFont;
+            }
+        }
+    }
+
+    public Font2D[] getRegisteredFonts() {
+        PhysicalFont[] physFonts = getPhysicalFonts();
+        int mcf = maxCompFont; /* for MT-safety */
+        Font2D[] regFonts = new Font2D[physFonts.length+mcf];
+        System.arraycopy(compFonts, 0, regFonts, 0, mcf);
+        System.arraycopy(physFonts, 0, regFonts, mcf, physFonts.length);
+        return regFonts;
+    }
+
+    protected PhysicalFont[] getPhysicalFonts() {
+        return physicalFonts.values().toArray(new PhysicalFont[0]);
+    }
+
+
+    /* The class FontRegistrationInfo is used when a client says not
+     * to register a font immediately. This mechanism is used to defer
+     * initialisation of all the components of composite fonts at JRE
+     * start-up. The CompositeFont class is "aware" of this and when it
+     * is first used it asks for the registration of its components.
+     * Also in the event that any physical font is requested the
+     * deferred fonts are initialised before triggering a search of the
+     * system.
+     * Two maps are used. One to track the deferred fonts. The
+     * other to track the fonts that have been initialised through this
+     * mechanism.
+     */
+
+    private static final class FontRegistrationInfo {
+
+        String fontFilePath;
+        String[] nativeNames;
+        int fontFormat;
+        boolean javaRasterizer;
+        int fontRank;
+
+        FontRegistrationInfo(String fontPath, String[] names, int format,
+                             boolean useJavaRasterizer, int rank) {
+            this.fontFilePath = fontPath;
+            this.nativeNames = names;
+            this.fontFormat = format;
+            this.javaRasterizer = useJavaRasterizer;
+            this.fontRank = rank;
+        }
+    }
+
+    private final ConcurrentHashMap<String, FontRegistrationInfo>
+        deferredFontFiles =
+        new ConcurrentHashMap<String, FontRegistrationInfo>();
+    private final ConcurrentHashMap<String, Font2DHandle>
+        initialisedFonts = new ConcurrentHashMap<String, Font2DHandle>();
+
+    /* Remind: possibly enhance initialiseDeferredFonts() to be
+     * optionally given a name and a style and it could stop when it
+     * finds that font - but this would be a problem if two of the
+     * fonts reference the same font face name (cf the Solaris
+     * euro fonts).
+     */
+    protected synchronized void initialiseDeferredFonts() {
+        for (String fileName : deferredFontFiles.keySet()) {
+            initialiseDeferredFont(fileName);
+        }
+    }
+
+    protected synchronized void registerDeferredJREFonts(String jreDir) {
+        for (FontRegistrationInfo info : deferredFontFiles.values()) {
+            if (info.fontFilePath != null &&
+                info.fontFilePath.startsWith(jreDir)) {
+                initialiseDeferredFont(info.fontFilePath);
+            }
+        }
+    }
+
+    public boolean isDeferredFont(String fileName) {
+        return deferredFontFiles.containsKey(fileName);
+    }
+
+    /* We keep a map of the files which contain the Lucida fonts so we
+     * don't need to search for them.
+     * But since we know what fonts these files contain, we can also avoid
+     * opening them to look for a font name we don't recognise - see
+     * findDeferredFont().
+     * For typical cases where the font isn't a JRE one the overhead is
+     * this method call, HashMap.get() and null reference test, then
+     * a boolean test of noOtherJREFontFiles.
+     */
+    public
+    /*private*/ PhysicalFont findJREDeferredFont(String name, int style) {
+
+        PhysicalFont physicalFont;
+        String nameAndStyle = name.toLowerCase(Locale.ENGLISH) + style;
+        String fileName = jreFontMap.get(nameAndStyle);
+        if (fileName != null) {
+            fileName = jreFontDirName + File.separator + fileName;
+            if (deferredFontFiles.get(fileName) != null) {
+                physicalFont = initialiseDeferredFont(fileName);
+                if (physicalFont != null &&
+                    (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
+                     physicalFont.getFamilyName(null).equalsIgnoreCase(name))
+                    && physicalFont.style == style) {
+                    return physicalFont;
+                }
+            }
+        }
+
+        /* Iterate over the deferred font files looking for any in the
+         * jre directory that we didn't recognise, open each of these.
+         * In almost all installations this will quickly fall through
+         * because only the Lucidas will be present and jreOtherFontFiles
+         * will be empty.
+         * noOtherJREFontFiles is used so we can skip this block as soon
+         * as its determined that its not needed - almost always after the
+         * very first time through.
+         */
+        if (noOtherJREFontFiles) {
+            return null;
+        }
+        synchronized (jreLucidaFontFiles) {
+            if (jreOtherFontFiles == null) {
+                HashSet<String> otherFontFiles = new HashSet<String>();
+                for (String deferredFile : deferredFontFiles.keySet()) {
+                    File file = new File(deferredFile);
+                    String dir = file.getParent();
+                    String fname = file.getName();
+                    /* skip names which aren't absolute, aren't in the JRE
+                     * directory, or are known Lucida fonts.
+                     */
+                    if (dir == null ||
+                        !dir.equals(jreFontDirName) ||
+                        jreLucidaFontFiles.contains(fname)) {
+                        continue;
+                    }
+                    otherFontFiles.add(deferredFile);
+                }
+                jreOtherFontFiles = otherFontFiles.toArray(STR_ARRAY);
+                if (jreOtherFontFiles.length == 0) {
+                    noOtherJREFontFiles = true;
+                }
+            }
+
+            for (int i=0; i<jreOtherFontFiles.length;i++) {
+                fileName = jreOtherFontFiles[i];
+                if (fileName == null) {
+                    continue;
+                }
+                jreOtherFontFiles[i] = null;
+                physicalFont = initialiseDeferredFont(fileName);
+                if (physicalFont != null &&
+                    (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
+                     physicalFont.getFamilyName(null).equalsIgnoreCase(name))
+                    && physicalFont.style == style) {
+                    return physicalFont;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /* This skips JRE installed fonts. */
+    private PhysicalFont findOtherDeferredFont(String name, int style) {
+        for (String fileName : deferredFontFiles.keySet()) {
+            File file = new File(fileName);
+            String dir = file.getParent();
+            String fname = file.getName();
+            if (dir != null &&
+                dir.equals(jreFontDirName) &&
+                jreLucidaFontFiles.contains(fname)) {
+                continue;
+            }
+            PhysicalFont physicalFont = initialiseDeferredFont(fileName);
+            if (physicalFont != null &&
+                (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
+                physicalFont.getFamilyName(null).equalsIgnoreCase(name)) &&
+                physicalFont.style == style) {
+                return physicalFont;
+            }
+        }
+        return null;
+    }
+
+    private PhysicalFont findDeferredFont(String name, int style) {
+
+        PhysicalFont physicalFont = findJREDeferredFont(name, style);
+        if (physicalFont != null) {
+            return physicalFont;
+        } else {
+            return findOtherDeferredFont(name, style);
+        }
+    }
+
+    public void registerDeferredFont(String fileNameKey,
+                                     String fullPathName,
+                                     String[] nativeNames,
+                                     int fontFormat,
+                                     boolean useJavaRasterizer,
+                                     int fontRank) {
+        FontRegistrationInfo regInfo =
+            new FontRegistrationInfo(fullPathName, nativeNames, fontFormat,
+                                     useJavaRasterizer, fontRank);
+        deferredFontFiles.put(fileNameKey, regInfo);
+    }
+
+
+    public synchronized
+         PhysicalFont initialiseDeferredFont(String fileNameKey) {
+
+        if (fileNameKey == null) {
+            return null;
+        }
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger()
+                            .info("Opening deferred font file " + fileNameKey);
+        }
+
+        PhysicalFont physicalFont;
+        FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
+        if (regInfo != null) {
+            deferredFontFiles.remove(fileNameKey);
+            physicalFont = registerFontFile(regInfo.fontFilePath,
+                                            regInfo.nativeNames,
+                                            regInfo.fontFormat,
+                                            regInfo.javaRasterizer,
+                                            regInfo.fontRank);
+
+
+            if (physicalFont != null) {
+                /* Store the handle, so that if a font is bad, we
+                 * retrieve the substituted font.
+                 */
+                initialisedFonts.put(fileNameKey, physicalFont.handle);
+            } else {
+                initialisedFonts.put(fileNameKey,
+                                     getDefaultPhysicalFont().handle);
+            }
+        } else {
+            Font2DHandle handle = initialisedFonts.get(fileNameKey);
+            if (handle == null) {
+                /* Probably shouldn't happen, but just in case */
+                physicalFont = getDefaultPhysicalFont();
+            } else {
+                physicalFont = (PhysicalFont)(handle.font2D);
+            }
+        }
+        return physicalFont;
+    }
+
+    public boolean isRegisteredFontFile(String name) {
+        return registeredFonts.containsKey(name);
+    }
+
+    public PhysicalFont getRegisteredFontFile(String name) {
+        return registeredFonts.get(name);
+    }
+
+    /* Note that the return value from this method is not always
+     * derived from this file, and may be null. See addToFontList for
+     * some explanation of this.
+     */
+    public PhysicalFont registerFontFile(String fileName,
+                                         String[] nativeNames,
+                                         int fontFormat,
+                                         boolean useJavaRasterizer,
+                                         int fontRank) {
+
+        PhysicalFont regFont = registeredFonts.get(fileName);
+        if (regFont != null) {
+            return regFont;
+        }
+
+        PhysicalFont physicalFont = null;
+        try {
+            String name;
+
+            switch (fontFormat) {
+
+            case FONTFORMAT_TRUETYPE:
+                int fn = 0;
+                TrueTypeFont ttf;
+                do {
+                    ttf = new TrueTypeFont(fileName, nativeNames, fn++,
+                                           useJavaRasterizer);
+                    PhysicalFont pf = addToFontList(ttf, fontRank);
+                    if (physicalFont == null) {
+                        physicalFont = pf;
+                    }
+                }
+                while (fn < ttf.getFontCount());
+                break;
+
+            case FONTFORMAT_TYPE1:
+                Type1Font t1f = new Type1Font(fileName, nativeNames);
+                physicalFont = addToFontList(t1f, fontRank);
+                break;
+
+            case FONTFORMAT_NATIVE:
+                NativeFont nf = new NativeFont(fileName, false);
+                physicalFont = addToFontList(nf, fontRank);
+            default:
+
+            }
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger()
+                      .info("Registered file " + fileName + " as font " +
+                            physicalFont + " rank="  + fontRank);
+            }
+        } catch (FontFormatException ffe) {
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().warning("Unusable font: " +
+                               fileName + " " + ffe.toString());
+            }
+        }
+        if (physicalFont != null &&
+            fontFormat != FONTFORMAT_NATIVE) {
+            registeredFonts.put(fileName, physicalFont);
+        }
+        return physicalFont;
+    }
+
+    public void registerFonts(String[] fileNames,
+                              String[][] nativeNames,
+                              int fontCount,
+                              int fontFormat,
+                              boolean useJavaRasterizer,
+                              int fontRank, boolean defer) {
+
+        for (int i=0; i < fontCount; i++) {
+            if (defer) {
+                registerDeferredFont(fileNames[i],fileNames[i], nativeNames[i],
+                                     fontFormat, useJavaRasterizer, fontRank);
+            } else {
+                registerFontFile(fileNames[i], nativeNames[i],
+                                 fontFormat, useJavaRasterizer, fontRank);
+            }
+        }
+    }
+
+    /*
+     * This is the Physical font used when some other font on the system
+     * can't be located. There has to be at least one font or the font
+     * system is not useful and the graphics environment cannot sustain
+     * the Java platform.
+     */
+    public PhysicalFont getDefaultPhysicalFont() {
+        if (defaultPhysicalFont == null) {
+            /* findFont2D will load all fonts before giving up the search.
+             * If the JRE Lucida isn't found (eg because the JRE fonts
+             * directory is missing), it could find another version of Lucida
+             * from the host system. This is OK because at that point we are
+             * trying to gracefully handle/recover from a system
+             * misconfiguration and this is probably a reasonable substitution.
+             */
+            defaultPhysicalFont = (PhysicalFont)
+                findFont2D("Lucida Sans Regular", Font.PLAIN, NO_FALLBACK);
+            if (defaultPhysicalFont == null) {
+                defaultPhysicalFont = (PhysicalFont)
+                    findFont2D("Arial", Font.PLAIN, NO_FALLBACK);
+            }
+            if (defaultPhysicalFont == null) {
+                /* Because of the findFont2D call above, if we reach here, we
+                 * know all fonts have already been loaded, just accept any
+                 * match at this point. If this fails we are in real trouble
+                 * and I don't know how to recover from there being absolutely
+                 * no fonts anywhere on the system.
+                 */
+                Iterator i = physicalFonts.values().iterator();
+                if (i.hasNext()) {
+                    defaultPhysicalFont = (PhysicalFont)i.next();
+                } else {
+                    throw new Error("Probable fatal error:No fonts found.");
+                }
+            }
+        }
+        return defaultPhysicalFont;
+    }
+
+    public CompositeFont getDefaultLogicalFont(int style) {
+        return (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
+    }
+
+    /*
+     * return String representation of style prepended with "."
+     * This is useful for performance to avoid unnecessary string operations.
+     */
+    private static String dotStyleStr(int num) {
+        switch(num){
+          case Font.BOLD:
+            return ".bold";
+          case Font.ITALIC:
+            return ".italic";
+          case Font.ITALIC | Font.BOLD:
+            return ".bolditalic";
+          default:
+            return ".plain";
+        }
+    }
+
+    /* This is implemented only on windows and is called from code that
+     * executes only on windows. This isn't pretty but its not a precedent
+     * in this file. This very probably should be cleaned up at some point.
+     */
+    protected void
+        populateFontFileNameMap(HashMap<String,String> fontToFileMap,
+                                HashMap<String,String> fontToFamilyNameMap,
+                                HashMap<String,ArrayList<String>>
+                                familyToFontListMap,
+                                Locale locale) {
+    }
+
+    /* Obtained from Platform APIs (windows only)
+     * Map from lower-case font full name to basename of font file.
+     * Eg "arial bold" -> ARIALBD.TTF.
+     * For TTC files, there is a mapping for each font in the file.
+     */
+    private HashMap<String,String> fontToFileMap = null;
+
+    /* Obtained from Platform APIs (windows only)
+     * Map from lower-case font full name to the name of its font family
+     * Eg "arial bold" -> "Arial"
+     */
+    private HashMap<String,String> fontToFamilyNameMap = null;
+
+    /* Obtained from Platform APIs (windows only)
+     * Map from a lower-case family name to a list of full names of
+     * the member fonts, eg:
+     * "arial" -> ["Arial", "Arial Bold", "Arial Italic","Arial Bold Italic"]
+     */
+    private HashMap<String,ArrayList<String>> familyToFontListMap= null;
+
+    /* The directories which contain platform fonts */
+    private String[] pathDirs = null;
+
+    private boolean haveCheckedUnreferencedFontFiles;
+
+    private String[] getFontFilesFromPath(boolean noType1) {
+        final FilenameFilter filter;
+        if (noType1) {
+            filter = ttFilter;
+        } else {
+            filter = new TTorT1Filter();
+        }
+        return (String[])AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+                if (pathDirs.length == 1) {
+                    File dir = new File(pathDirs[0]);
+                    String[] files = dir.list(filter);
+                    if (files == null) {
+                        return new String[0];
+                    }
+                    for (int f=0; f<files.length; f++) {
+                        files[f] = files[f].toLowerCase();
+                    }
+                    return files;
+                } else {
+                    ArrayList<String> fileList = new ArrayList<String>();
+                    for (int i = 0; i< pathDirs.length; i++) {
+                        File dir = new File(pathDirs[i]);
+                        String[] files = dir.list(filter);
+                        if (files == null) {
+                            continue;
+                        }
+                        for (int f=0; f<files.length ; f++) {
+                            fileList.add(files[f].toLowerCase());
+                        }
+                    }
+                    return fileList.toArray(STR_ARRAY);
+                }
+            }
+        });
+    }
+
+    /* This is needed since some windows registry names don't match
+     * the font names.
+     * - UPC styled font names have a double space, but the
+     * registry entry mapping to a file doesn't.
+     * - Marlett is in a hidden file not listed in the registry
+     * - The registry advertises that the file david.ttf contains a
+     * font with the full name "David Regular" when in fact its
+     * just "David".
+     * Directly fix up these known cases as this is faster.
+     * If a font which doesn't match these known cases has no file,
+     * it may be a font that has been temporarily added to the known set
+     * or it may be an installed font with a missing registry entry.
+     * Installed fonts are those in the windows font directories.
+     * Make a best effort attempt to locate these.
+     * We obtain the list of TrueType fonts in these directories and
+     * filter out all the font files we already know about from the registry.
+     * What remains may be "bad" fonts, duplicate fonts, or perhaps the
+     * missing font(s) we are looking for.
+     * Open each of these files to find out.
+     */
+    private void resolveWindowsFonts() {
+
+        ArrayList<String> unmappedFontNames = null;
+        for (String font : fontToFamilyNameMap.keySet()) {
+            String file = fontToFileMap.get(font);
+            if (file == null) {
+                if (font.indexOf("  ") > 0) {
+                    String newName = font.replaceFirst("  ", " ");
+                    file = fontToFileMap.get(newName);
+                    /* If this name exists and isn't for a valid name
+                     * replace the mapping to the file with this font
+                     */
+                    if (file != null &&
+                        !fontToFamilyNameMap.containsKey(newName)) {
+                        fontToFileMap.remove(newName);
+                        fontToFileMap.put(font, file);
+                    }
+                } else if (font.equals("marlett")) {
+                    fontToFileMap.put(font, "marlett.ttf");
+                } else if (font.equals("david")) {
+                    file = fontToFileMap.get("david regular");
+                    if (file != null) {
+                        fontToFileMap.remove("david regular");
+                        fontToFileMap.put("david", file);
+                    }
+                } else {
+                    if (unmappedFontNames == null) {
+                        unmappedFontNames = new ArrayList<String>();
+                    }
+                    unmappedFontNames.add(font);
+                }
+            }
+        }
+
+        if (unmappedFontNames != null) {
+            HashSet<String> unmappedFontFiles = new HashSet<String>();
+
+            /* Every font key in fontToFileMap ought to correspond to a
+             * font key in fontToFamilyNameMap. Entries that don't seem
+             * to correspond are likely fonts that were named differently
+             * by GDI than in the registry. One known cause of this is when
+             * Windows has had its regional settings changed so that from
+             * GDI we get a localised (eg Chinese or Japanese) name for the
+             * font, but the registry retains the English version of the name
+             * that corresponded to the "install" locale for windows.
+             * Since we are in this code block because there are unmapped
+             * font names, we can look to find unused font->file mappings
+             * and then open the files to read the names. We don't generally
+             * want to open font files, as its a performance hit, but this
+             * occurs only for a small number of fonts on specific system
+             * configs - ie is believed that a "true" Japanese windows would
+             * have JA names in the registry too.
+             * Clone fontToFileMap and remove from the clone all keys which
+             * match a fontToFamilyNameMap key. What remains maps to the
+             * files we want to open to find the fonts GDI returned.
+             * A font in such a file is added to the fontToFileMap after
+             * checking its one of the unmappedFontNames we are looking for.
+             * The original name that didn't map is removed from fontToFileMap
+             * so essentially this "fixes up" fontToFileMap to use the same
+             * name as GDI.
+             * Also note that typically the fonts for which this occurs in
+             * CJK locales are TTC fonts and not all fonts in a TTC may have
+             * localised names. Eg MSGOTHIC.TTC contains 3 fonts and one of
+             * them "MS UI Gothic" has no JA name whereas the other two do.
+             * So not every font in these files is unmapped or new.
+             */
+            HashMap<String,String> ffmapCopy =
+                (HashMap<String,String>)(fontToFileMap.clone());
+            for (String key : fontToFamilyNameMap.keySet()) {
+                ffmapCopy.remove(key);
+            }
+            for (String key : ffmapCopy.keySet()) {
+                unmappedFontFiles.add(ffmapCopy.get(key));
+                fontToFileMap.remove(key);
+            }
+
+            resolveFontFiles(unmappedFontFiles, unmappedFontNames);
+
+            /* If there are still unmapped font names, this means there's
+             * something that wasn't in the registry. We need to get all
+             * the font files directly and look at the ones that weren't
+             * found in the registry.
+             */
+            if (unmappedFontNames.size() > 0) {
+
+                /* getFontFilesFromPath() returns all lower case names.
+                 * To compare we also need lower case
+                 * versions of the names from the registry.
+                 */
+                ArrayList<String> registryFiles = new ArrayList<String>();
+
+                for (String regFile : fontToFileMap.values()) {
+                    registryFiles.add(regFile.toLowerCase());
+                }
+                /* We don't look for Type1 files here as windows will
+                 * not enumerate these, so aren't useful in reconciling
+                 * GDI's unmapped files. We do find these later when
+                 * we enumerate all fonts.
+                 */
+                for (String pathFile : getFontFilesFromPath(true)) {
+                    if (!registryFiles.contains(pathFile)) {
+                        unmappedFontFiles.add(pathFile);
+                    }
+                }
+
+                resolveFontFiles(unmappedFontFiles, unmappedFontNames);
+            }
+
+            /* remove from the set of names that will be returned to the
+             * user any fonts that can't be mapped to files.
+             */
+            if (unmappedFontNames.size() > 0) {
+                int sz = unmappedFontNames.size();
+                for (int i=0; i<sz; i++) {
+                    String name = unmappedFontNames.get(i);
+                    String familyName = fontToFamilyNameMap.get(name);
+                    if (familyName != null) {
+                        ArrayList family = familyToFontListMap.get(familyName);
+                        if (family != null) {
+                            if (family.size() <= 1) {
+                                familyToFontListMap.remove(familyName);
+                            }
+                        }
+                    }
+                    fontToFamilyNameMap.remove(name);
+                    if (FontUtilities.isLogging()) {
+                        FontUtilities.getLogger()
+                                             .info("No file for font:" + name);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * In some cases windows may have fonts in the fonts folder that
+     * don't show up in the registry or in the GDI calls to enumerate fonts.
+     * The only way to find these is to list the directory. We invoke this
+     * only in getAllFonts/Families, so most searches for a specific
+     * font that is satisfied by the GDI/registry calls don't take the
+     * additional hit of listing the directory. This hit is small enough
+     * that its not significant in these 'enumerate all the fonts' cases.
+     * The basic approach is to cross-reference the files windows found
+     * with the ones in the directory listing approach, and for each
+     * in the latter list that is missing from the former list, register it.
+     */
+    private synchronized void checkForUnreferencedFontFiles() {
+        if (haveCheckedUnreferencedFontFiles) {
+            return;
+        }
+        haveCheckedUnreferencedFontFiles = true;
+        if (!FontUtilities.isWindows) {
+            return;
+        }
+        /* getFontFilesFromPath() returns all lower case names.
+         * To compare we also need lower case
+         * versions of the names from the registry.
+         */
+        ArrayList<String> registryFiles = new ArrayList<String>();
+        for (String regFile : fontToFileMap.values()) {
+            registryFiles.add(regFile.toLowerCase());
+        }
+
+        /* To avoid any issues with concurrent modification, create
+         * copies of the existing maps, add the new fonts into these
+         * and then replace the references to the old ones with the
+         * new maps. ConcurrentHashmap is another option but its a lot
+         * more changes and with this exception, these maps are intended
+         * to be static.
+         */
+        HashMap<String,String> fontToFileMap2 = null;
+        HashMap<String,String> fontToFamilyNameMap2 = null;
+        HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
+
+        for (String pathFile : getFontFilesFromPath(false)) {
+            if (!registryFiles.contains(pathFile)) {
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger()
+                                 .info("Found non-registry file : " + pathFile);
+                }
+                PhysicalFont f = registerFontFile(getPathName(pathFile));
+                if (f == null) {
+                    continue;
+                }
+                if (fontToFileMap2 == null) {
+                    fontToFileMap2 = new HashMap<String,String>(fontToFileMap);
+                    fontToFamilyNameMap2 =
+                        new HashMap<String,String>(fontToFamilyNameMap);
+                    familyToFontListMap2 = new
+                        HashMap<String,ArrayList<String>>(familyToFontListMap);
+                }
+                String fontName = f.getFontName(null);
+                String family = f.getFamilyName(null);
+                String familyLC = family.toLowerCase();
+                fontToFamilyNameMap2.put(fontName, family);
+                fontToFileMap2.put(fontName, pathFile);
+                ArrayList<String> fonts = familyToFontListMap2.get(familyLC);
+                if (fonts == null) {
+                    fonts = new ArrayList<String>();
+                } else {
+                    fonts = new ArrayList<String>(fonts);
+                }
+                fonts.add(fontName);
+                familyToFontListMap2.put(familyLC, fonts);
+            }
+        }
+        if (fontToFileMap2 != null) {
+            fontToFileMap = fontToFileMap2;
+            familyToFontListMap = familyToFontListMap2;
+            fontToFamilyNameMap = fontToFamilyNameMap2;
+        }
+    }
+
+    private void resolveFontFiles(HashSet<String> unmappedFiles,
+                                  ArrayList<String> unmappedFonts) {
+
+        Locale l = SunToolkit.getStartupLocale();
+
+        for (String file : unmappedFiles) {
+            try {
+                int fn = 0;
+                TrueTypeFont ttf;
+                String fullPath = getPathName(file);
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger()
+                                   .info("Trying to resolve file " + fullPath);
+                }
+                do {
+                    ttf = new TrueTypeFont(fullPath, null, fn++, true);
+                    //  prefer the font's locale name.
+                    String fontName = ttf.getFontName(l).toLowerCase();
+                    if (unmappedFonts.contains(fontName)) {
+                        fontToFileMap.put(fontName, file);
+                        unmappedFonts.remove(fontName);
+                        if (FontUtilities.isLogging()) {
+                            FontUtilities.getLogger()
+                                  .info("Resolved absent registry entry for " +
+                                        fontName + " located in " + fullPath);
+                        }
+                    }
+                }
+                while (fn < ttf.getFontCount());
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    private synchronized HashMap<String,String> getFullNameToFileMap() {
+        if (fontToFileMap == null) {
+
+            pathDirs = getPlatformFontDirs(noType1Font);
+
+            fontToFileMap = new HashMap<String,String>(100);
+            fontToFamilyNameMap = new HashMap<String,String>(100);
+            familyToFontListMap = new HashMap<String,ArrayList<String>>(50);
+            populateFontFileNameMap(fontToFileMap,
+                                    fontToFamilyNameMap,
+                                    familyToFontListMap,
+                                    Locale.ENGLISH);
+            if (FontUtilities.isWindows) {
+                resolveWindowsFonts();
+            }
+            if (FontUtilities.isLogging()) {
+                logPlatformFontInfo();
+            }
+        }
+        return fontToFileMap;
+    }
+
+    private void logPlatformFontInfo() {
+        PlatformLogger logger = FontUtilities.getLogger();
+        for (int i=0; i< pathDirs.length;i++) {
+            logger.info("fontdir="+pathDirs[i]);
+        }
+        for (String keyName : fontToFileMap.keySet()) {
+            logger.info("font="+keyName+" file="+ fontToFileMap.get(keyName));
+        }
+        for (String keyName : fontToFamilyNameMap.keySet()) {
+            logger.info("font="+keyName+" family="+
+                        fontToFamilyNameMap.get(keyName));
+        }
+        for (String keyName : familyToFontListMap.keySet()) {
+            logger.info("family="+keyName+ " fonts="+
+                        familyToFontListMap.get(keyName));
+        }
+    }
+
+    /* Note this return list excludes logical fonts and JRE fonts */
+    protected String[] getFontNamesFromPlatform() {
+        if (getFullNameToFileMap().size() == 0) {
+            return null;
+        }
+        checkForUnreferencedFontFiles();
+        /* This odd code with TreeMap is used to preserve a historical
+         * behaviour wrt the sorting order .. */
+        ArrayList<String> fontNames = new ArrayList<String>();
+        for (ArrayList<String> a : familyToFontListMap.values()) {
+            for (String s : a) {
+                fontNames.add(s);
+            }
+        }
+        return fontNames.toArray(STR_ARRAY);
+    }
+
+    public boolean gotFontsFromPlatform() {
+        return getFullNameToFileMap().size() != 0;
+    }
+
+    public String getFileNameForFontName(String fontName) {
+        String fontNameLC = fontName.toLowerCase(Locale.ENGLISH);
+        return fontToFileMap.get(fontNameLC);
+    }
+
+    private PhysicalFont registerFontFile(String file) {
+        if (new File(file).isAbsolute() &&
+            !registeredFonts.contains(file)) {
+            int fontFormat = FONTFORMAT_NONE;
+            int fontRank = Font2D.UNKNOWN_RANK;
+            if (ttFilter.accept(null, file)) {
+                fontFormat = FONTFORMAT_TRUETYPE;
+                fontRank = Font2D.TTF_RANK;
+            } else if
+                (t1Filter.accept(null, file)) {
+                fontFormat = FONTFORMAT_TYPE1;
+                fontRank = Font2D.TYPE1_RANK;
+            }
+            if (fontFormat == FONTFORMAT_NONE) {
+                return null;
+            }
+            return registerFontFile(file, null, fontFormat, false, fontRank);
+        }
+        return null;
+    }
+
+    /* Used to register any font files that are found by platform APIs
+     * that weren't previously found in the standard font locations.
+     * the isAbsolute() check is needed since that's whats stored in the
+     * set, and on windows, the fonts in the system font directory that
+     * are in the fontToFileMap are just basenames. We don't want to try
+     * to register those again, but we do want to register other registry
+     * installed fonts.
+     */
+    protected void registerOtherFontFiles(HashSet registeredFontFiles) {
+        if (getFullNameToFileMap().size() == 0) {
+            return;
+        }
+        for (String file : fontToFileMap.values()) {
+            registerFontFile(file);
+        }
+    }
+
+    public boolean
+        getFamilyNamesFromPlatform(TreeMap<String,String> familyNames,
+                                   Locale requestedLocale) {
+        if (getFullNameToFileMap().size() == 0) {
+            return false;
+        }
+        checkForUnreferencedFontFiles();
+        for (String name : fontToFamilyNameMap.values()) {
+            familyNames.put(name.toLowerCase(requestedLocale), name);
+        }
+        return true;
+    }
+
+    /* Path may be absolute or a base file name relative to one of
+     * the platform font directories
+     */
+    private String getPathName(final String s) {
+        File f = new File(s);
+        if (f.isAbsolute()) {
+            return s;
+        } else if (pathDirs.length==1) {
+            return pathDirs[0] + File.separator + s;
+        } else {
+            String path = java.security.AccessController.doPrivileged(
+                 new java.security.PrivilegedAction<String>() {
+                     public String run() {
+                         for (int p=0; p<pathDirs.length; p++) {
+                             File f = new File(pathDirs[p] +File.separator+ s);
+                             if (f.exists()) {
+                                 return f.getAbsolutePath();
+                             }
+                         }
+                         return null;
+                     }
+                });
+            if (path != null) {
+                return path;
+            }
+        }
+        return s; // shouldn't happen, but harmless
+    }
+
+    /* lcName is required to be lower case for use as a key.
+     * lcName may be a full name, or a family name, and style may
+     * be specified in addition to either of these. So be sure to
+     * get the right one. Since an app *could* ask for "Foo Regular"
+     * and later ask for "Foo Italic", if we don't register all the
+     * styles, then logic in findFont2D may try to style the original
+     * so we register the entire family if we get a match here.
+     * This is still a big win because this code is invoked where
+     * otherwise we would register all fonts.
+     * It's also useful for the case where "Foo Bold" was specified with
+     * style Font.ITALIC, as we would want in that case to try to return
+     * "Foo Bold Italic" if it exists, and it is only by locating "Foo Bold"
+     * and opening it that we really "know" it's Bold, and can look for
+     * a font that supports that and the italic style.
+     * The code in here is not overtly windows-specific but in fact it
+     * is unlikely to be useful as is on other platforms. It is maintained
+     * in this shared source file to be close to its sole client and
+     * because so much of the logic is intertwined with the logic in
+     * findFont2D.
+     */
+    private Font2D findFontFromPlatform(String lcName, int style) {
+        if (getFullNameToFileMap().size() == 0) {
+            return null;
+        }
+
+        ArrayList<String> family = null;
+        String fontFile = null;
+        String familyName = fontToFamilyNameMap.get(lcName);
+        if (familyName != null) {
+            fontFile = fontToFileMap.get(lcName);
+            family = familyToFontListMap.get
+                (familyName.toLowerCase(Locale.ENGLISH));
+        } else {
+            family = familyToFontListMap.get(lcName); // is lcName is a family?
+            if (family != null && family.size() > 0) {
+                String lcFontName = family.get(0).toLowerCase(Locale.ENGLISH);
+                if (lcFontName != null) {
+                    familyName = fontToFamilyNameMap.get(lcFontName);
+                }
+            }
+        }
+        if (family == null || familyName == null) {
+            return null;
+        }
+        String [] fontList = (String[])family.toArray(STR_ARRAY);
+        if (fontList.length == 0) {
+            return null;
+        }
+
+        /* first check that for every font in this family we can find
+         * a font file. The specific reason for doing this is that
+         * in at least one case on Windows a font has the face name "David"
+         * but the registry entry is "David Regular". That is the "unique"
+         * name of the font but in other cases the registry contains the
+         * "full" name. See the specifications of name ids 3 and 4 in the
+         * TrueType 'name' table.
+         * In general this could cause a problem that we fail to register
+         * if we all members of a family that we may end up mapping to
+         * the wrong font member: eg return Bold when Plain is needed.
+         */
+        for (int f=0;f<fontList.length;f++) {
+            String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
+            String fileName = fontToFileMap.get(fontNameLC);
+            if (fileName == null) {
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger()
+                          .info("Platform lookup : No file for font " +
+                                fontList[f] + " in family " +familyName);
+                }
+                return null;
+            }
+        }
+
+        /* Currently this code only looks for TrueType fonts, so format
+         * and rank can be specified without looking at the filename.
+         */
+        PhysicalFont physicalFont = null;
+        if (fontFile != null) {
+            physicalFont = registerFontFile(getPathName(fontFile), null,
+                                            FONTFORMAT_TRUETYPE, false,
+                                            Font2D.TTF_RANK);
+        }
+        /* Register all fonts in this family. */
+        for (int f=0;f<fontList.length;f++) {
+            String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
+            String fileName = fontToFileMap.get(fontNameLC);
+            if (fontFile != null && fontFile.equals(fileName)) {
+                continue;
+            }
+            /* Currently this code only looks for TrueType fonts, so format
+             * and rank can be specified without looking at the filename.
+             */
+            registerFontFile(getPathName(fileName), null,
+                             FONTFORMAT_TRUETYPE, false, Font2D.TTF_RANK);
+        }
+
+        Font2D font = null;
+        FontFamily fontFamily = FontFamily.getFamily(familyName);
+        /* Handle case where request "MyFont Bold", style=Font.ITALIC */
+        if (physicalFont != null) {
+            style |= physicalFont.style;
+        }
+        if (fontFamily != null) {
+            font = fontFamily.getFont(style);
+            if (font == null) {
+                font = fontFamily.getClosestStyle(style);
+            }
+        }
+        return font;
+    }
+
+    private ConcurrentHashMap<String, Font2D> fontNameCache =
+        new ConcurrentHashMap<String, Font2D>();
+
+    /*
+     * The client supplies a name and a style.
+     * The name could be a family name, or a full name.
+     * A font may exist with the specified style, or it may
+     * exist only in some other style. For non-native fonts the scaler
+     * may be able to emulate the required style.
+     */
+    public Font2D findFont2D(String name, int style, int fallback) {
+        String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
+        String mapName = lowerCaseName + dotStyleStr(style);
+        Font2D font;
+
+        /* If preferLocaleFonts() or preferProportionalFonts() has been
+         * called we may be using an alternate set of composite fonts in this
+         * app context. The presence of a pre-built name map indicates whether
+         * this is so, and gives access to the alternate composite for the
+         * name.
+         */
+        if (_usingPerAppContextComposites) {
+            ConcurrentHashMap<String, Font2D> altNameCache =
+                (ConcurrentHashMap<String, Font2D>)
+                AppContext.getAppContext().get(CompositeFont.class);
+            if (altNameCache != null) {
+                font = (Font2D)altNameCache.get(mapName);
+            } else {
+                font = null;
+            }
+        } else {
+            font = fontNameCache.get(mapName);
+        }
+        if (font != null) {
+            return font;
+        }
+
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger().info("Search for font: " + name);
+        }
+
+        // The check below is just so that the bitmap fonts being set by
+        // AWT and Swing thru the desktop properties do not trigger the
+        // the load fonts case. The two bitmap fonts are now mapped to
+        // appropriate equivalents for serif and sansserif.
+        // Note that the cost of this comparison is only for the first
+        // call until the map is filled.
+        if (FontUtilities.isWindows) {
+            if (lowerCaseName.equals("ms sans serif")) {
+                name = "sansserif";
+            } else if (lowerCaseName.equals("ms serif")) {
+                name = "serif";
+            }
+        }
+
+        /* This isn't intended to support a client passing in the
+         * string default, but if a client passes in null for the name
+         * the java.awt.Font class internally substitutes this name.
+         * So we need to recognise it here to prevent a loadFonts
+         * on the unrecognised name. The only potential problem with
+         * this is it would hide any real font called "default"!
+         * But that seems like a potential problem we can ignore for now.
+         */
+        if (lowerCaseName.equals("default")) {
+            name = "dialog";
+        }
+
+        /* First see if its a family name. */
+        FontFamily family = FontFamily.getFamily(name);
+        if (family != null) {
+            font = family.getFontWithExactStyleMatch(style);
+            if (font == null) {
+                font = findDeferredFont(name, style);
+            }
+            if (font == null) {
+                font = family.getFont(style);
+            }
+            if (font == null) {
+                font = family.getClosestStyle(style);
+            }
+            if (font != null) {
+                fontNameCache.put(mapName, font);
+                return font;
+            }
+        }
+
+        /* If it wasn't a family name, it should be a full name of
+         * either a composite, or a physical font
+         */
+        font = fullNameToFont.get(lowerCaseName);
+        if (font != null) {
+            /* Check that the requested style matches the matched font's style.
+             * But also match style automatically if the requested style is
+             * "plain". This because the existing behaviour is that the fonts
+             * listed via getAllFonts etc always list their style as PLAIN.
+             * This does lead to non-commutative behaviours where you might
+             * start with "Lucida Sans Regular" and ask for a BOLD version
+             * and get "Lucida Sans DemiBold" but if you ask for the PLAIN
+             * style of "Lucida Sans DemiBold" you get "Lucida Sans DemiBold".
+             * This consistent however with what happens if you have a bold
+             * version of a font and no plain version exists - alg. styling
+             * doesn't "unbolden" the font.
+             */
+            if (font.style == style || style == Font.PLAIN) {
+                fontNameCache.put(mapName, font);
+                return font;
+            } else {
+                /* If it was a full name like "Lucida Sans Regular", but
+                 * the style requested is "bold", then we want to see if
+                 * there's the appropriate match against another font in
+                 * that family before trying to load all fonts, or applying a
+                 * algorithmic styling
+                 */
+                family = FontFamily.getFamily(font.getFamilyName(null));
+                if (family != null) {
+                    Font2D familyFont = family.getFont(style|font.style);
+                    /* We exactly matched the requested style, use it! */
+                    if (familyFont != null) {
+                        fontNameCache.put(mapName, familyFont);
+                        return familyFont;
+                    } else {
+                        /* This next call is designed to support the case
+                         * where bold italic is requested, and if we must
+                         * style, then base it on either bold or italic -
+                         * not on plain!
+                         */
+                        familyFont = family.getClosestStyle(style|font.style);
+                        if (familyFont != null) {
+                            /* The next check is perhaps one
+                             * that shouldn't be done. ie if we get this
+                             * far we have probably as close a match as we
+                             * are going to get. We could load all fonts to
+                             * see if somehow some parts of the family are
+                             * loaded but not all of it.
+                             */
+                            if (familyFont.canDoStyle(style|font.style)) {
+                                fontNameCache.put(mapName, familyFont);
+                                return familyFont;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        if (FontUtilities.isWindows) {
+            /* Don't want Windows to return a Lucida Sans font from
+             * C:\Windows\Fonts
+             */
+            if (deferredFontFiles.size() > 0) {
+                font = findJREDeferredFont(lowerCaseName, style);
+                if (font != null) {
+                    fontNameCache.put(mapName, font);
+                    return font;
+                }
+            }
+            font = findFontFromPlatform(lowerCaseName, style);
+            if (font != null) {
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger()
+                          .info("Found font via platform API for request:\"" +
+                                name + "\":, style="+style+
+                                " found font: " + font);
+                }
+                fontNameCache.put(mapName, font);
+                return font;
+            }
+        }
+
+        /* If reach here and no match has been located, then if there are
+         * uninitialised deferred fonts, load as many of those as needed
+         * to find the deferred font. If none is found through that
+         * search continue on.
+         * There is possibly a minor issue when more than one
+         * deferred font implements the same font face. Since deferred
+         * fonts are only those in font configuration files, this is a
+         * controlled situation, the known case being Solaris euro_fonts
+         * versions of Arial, Times New Roman, Courier New. However
+         * the larger font will transparently replace the smaller one
+         *  - see addToFontList() - when it is needed by the composite font.
+         */
+        if (deferredFontFiles.size() > 0) {
+            font = findDeferredFont(name, style);
+            if (font != null) {
+                fontNameCache.put(mapName, font);
+                return font;
+            }
+        }
+
+        /* Some apps use deprecated 1.0 names such as helvetica and courier. On
+         * Solaris these are Type1 fonts in /usr/openwin/lib/X11/fonts/Type1.
+         * If running on Solaris will register all the fonts in this
+         * directory.
+         * May as well register the whole directory without actually testing
+         * the font name is one of the deprecated names as the next step would
+         * load all fonts which are in this directory anyway.
+         * In the event that this lookup is successful it potentially "hides"
+         * TrueType versions of such fonts that are elsewhere but since they
+         * do not exist on Solaris this is not a problem.
+         * Set a flag to indicate we've done this registration to avoid
+         * repetition and more seriously, to avoid recursion.
+         */
+        if (FontUtilities.isSolaris &&!loaded1dot0Fonts) {
+            /* "timesroman" is a special case since that's not the
+             * name of any known font on Solaris or elsewhere.
+             */
+            if (lowerCaseName.equals("timesroman")) {
+                font = findFont2D("serif", style, fallback);
+                fontNameCache.put(mapName, font);
+            }
+            register1dot0Fonts();
+            loaded1dot0Fonts = true;
+            Font2D ff = findFont2D(name, style, fallback);
+            return ff;
+        }
+
+        /* We check for application registered fonts before
+         * explicitly loading all fonts as if necessary the registration
+         * code will have done so anyway. And we don't want to needlessly
+         * load the actual files for all fonts.
+         * Just as for installed fonts we check for family before fullname.
+         * We do not add these fonts to fontNameCache for the
+         * app context case which eliminates the overhead of a per context
+         * cache for these.
+         */
+
+        if (fontsAreRegistered || fontsAreRegisteredPerAppContext) {
+            Hashtable<String, FontFamily> familyTable = null;
+            Hashtable<String, Font2D> nameTable;
+
+            if (fontsAreRegistered) {
+                familyTable = createdByFamilyName;
+                nameTable = createdByFullName;
+            } else {
+                AppContext appContext = AppContext.getAppContext();
+                familyTable =
+                    (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
+                nameTable =
+                    (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
+            }
+
+            family = familyTable.get(lowerCaseName);
+            if (family != null) {
+                font = family.getFontWithExactStyleMatch(style);
+                if (font == null) {
+                    font = family.getFont(style);
+                }
+                if (font == null) {
+                    font = family.getClosestStyle(style);
+                }
+                if (font != null) {
+                    if (fontsAreRegistered) {
+                        fontNameCache.put(mapName, font);
+                    }
+                    return font;
+                }
+            }
+            font = nameTable.get(lowerCaseName);
+            if (font != null) {
+                if (fontsAreRegistered) {
+                    fontNameCache.put(mapName, font);
+                }
+                return font;
+            }
+        }
+
+        /* If reach here and no match has been located, then if all fonts
+         * are not yet loaded, do so, and then recurse.
+         */
+        if (!loadedAllFonts) {
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger()
+                                       .info("Load fonts looking for:" + name);
+            }
+            loadFonts();
+            loadedAllFonts = true;
+            return findFont2D(name, style, fallback);
+        }
+
+        if (!loadedAllFontFiles) {
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger()
+                                  .info("Load font files looking for:" + name);
+            }
+            loadFontFiles();
+            loadedAllFontFiles = true;
+            return findFont2D(name, style, fallback);
+        }
+
+        /* The primary name is the locale default - ie not US/English but
+         * whatever is the default in this locale. This is the way it always
+         * has been but may be surprising to some developers if "Arial Regular"
+         * were hard-coded in their app and yet "Arial Regular" was not the
+         * default name. Fortunately for them, as a consequence of the JDK
+         * supporting returning names and family names for arbitrary locales,
+         * we also need to support searching all localised names for a match.
+         * But because this case of the name used to reference a font is not
+         * the same as the default for this locale is rare, it makes sense to
+         * search a much shorter list of default locale names and only go to
+         * a longer list of names in the event that no match was found.
+         * So add here code which searches localised names too.
+         * As in 1.4.x this happens only after loading all fonts, which
+         * is probably the right order.
+         */
+        if ((font = findFont2DAllLocales(name, style)) != null) {
+            fontNameCache.put(mapName, font);
+            return font;
+        }
+
+        /* Perhaps its a "compatibility" name - timesroman, helvetica,
+         * or courier, which 1.0 apps used for logical fonts.
+         * We look for these "late" after a loadFonts as we must not
+         * hide real fonts of these names.
+         * Map these appropriately:
+         * On windows this means according to the rules specified by the
+         * FontConfiguration : do it only for encoding==Cp1252
+         *
+         * REMIND: this is something we plan to remove.
+         */
+        if (FontUtilities.isWindows) {
+            String compatName =
+                getFontConfiguration().getFallbackFamilyName(name, null);
+            if (compatName != null) {
+                font = findFont2D(compatName, style, fallback);
+                fontNameCache.put(mapName, font);
+                return font;
+            }
+        } else if (lowerCaseName.equals("timesroman")) {
+            font = findFont2D("serif", style, fallback);
+            fontNameCache.put(mapName, font);
+            return font;
+        } else if (lowerCaseName.equals("helvetica")) {
+            font = findFont2D("sansserif", style, fallback);
+            fontNameCache.put(mapName, font);
+            return font;
+        } else if (lowerCaseName.equals("courier")) {
+            font = findFont2D("monospaced", style, fallback);
+            fontNameCache.put(mapName, font);
+            return font;
+        }
+
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger().info("No font found for:" + name);
+        }
+
+        switch (fallback) {
+        case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
+        case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
+        default: return null;
+        }
+    }
+
+    /*
+     * Workaround for apps which are dependent on a font metrics bug
+     * in JDK 1.1. This is an unsupported win32 private setting.
+     * Left in for a customer - do not remove.
+     */
+    public boolean usePlatformFontMetrics() {
+        return usePlatformFontMetrics;
+    }
+
+    public int getNumFonts() {
+        return physicalFonts.size()+maxCompFont;
+    }
+
+    private static boolean fontSupportsEncoding(Font font, String encoding) {
+        return FontUtilities.getFont2D(font).supportsEncoding(encoding);
+    }
+
+    public abstract String getFontPath(boolean noType1Fonts);
+
+    private Thread fileCloser = null;
+    Vector<File> tmpFontFiles = null;
+
+    public Font2D createFont2D(File fontFile, int fontFormat,
+                               boolean isCopy, CreatedFontTracker tracker)
+    throws FontFormatException {
+
+        String fontFilePath = fontFile.getPath();
+        FileFont font2D = null;
+        final File fFile = fontFile;
+        final CreatedFontTracker _tracker = tracker;
+        try {
+            switch (fontFormat) {
+            case Font.TRUETYPE_FONT:
+                font2D = new TrueTypeFont(fontFilePath, null, 0, true);
+                break;
+            case Font.TYPE1_FONT:
+                font2D = new Type1Font(fontFilePath, null, isCopy);
+                break;
+            default:
+                throw new FontFormatException("Unrecognised Font Format");
+            }
+        } catch (FontFormatException e) {
+            if (isCopy) {
+                java.security.AccessController.doPrivileged(
+                     new java.security.PrivilegedAction() {
+                          public Object run() {
+                              if (_tracker != null) {
+                                  _tracker.subBytes((int)fFile.length());
+                              }
+                              fFile.delete();
+                              return null;
+                          }
+                });
+            }
+            throw(e);
+        }
+        if (isCopy) {
+            font2D.setFileToRemove(fontFile, tracker);
+            synchronized (FontManager.class) {
+
+                if (tmpFontFiles == null) {
+                    tmpFontFiles = new Vector<File>();
+                }
+                tmpFontFiles.add(fontFile);
+
+                if (fileCloser == null) {
+                    final Runnable fileCloserRunnable = new Runnable() {
+                      public void run() {
+                         java.security.AccessController.doPrivileged(
+                         new java.security.PrivilegedAction() {
+                         public Object run() {
+
+                            for (int i=0;i<CHANNELPOOLSIZE;i++) {
+                                if (fontFileCache[i] != null) {
+                                    try {
+                                        fontFileCache[i].close();
+                                    } catch (Exception e) {
+                                    }
+                                }
+                            }
+                            if (tmpFontFiles != null) {
+                                File[] files = new File[tmpFontFiles.size()];
+                                files = tmpFontFiles.toArray(files);
+                                for (int f=0; f<files.length;f++) {
+                                    try {
+                                        files[f].delete();
+                                    } catch (Exception e) {
+                                    }
+                                }
+                            }
+
+                            return null;
+                          }
+
+                          });
+                      }
+                    };
+                    java.security.AccessController.doPrivileged(
+                       new java.security.PrivilegedAction() {
+                          public Object run() {
+                              /* The thread must be a member of a thread group
+                               * which will not get GCed before VM exit.
+                               * Make its parent the top-level thread group.
+                               */
+                              ThreadGroup tg =
+                                  Thread.currentThread().getThreadGroup();
+                              for (ThreadGroup tgn = tg;
+                                   tgn != null;
+                                   tg = tgn, tgn = tg.getParent());
+                              fileCloser = new Thread(tg, fileCloserRunnable);
+                              Runtime.getRuntime().addShutdownHook(fileCloser);
+                              return null;
+                          }
+                    });
+                }
+            }
+        }
+        return font2D;
+    }
+
+    /* remind: used in X11GraphicsEnvironment and called often enough
+     * that we ought to obsolete this code
+     */
+    public synchronized String getFullNameByFileName(String fileName) {
+        PhysicalFont[] physFonts = getPhysicalFonts();
+        for (int i=0;i<physFonts.length;i++) {
+            if (physFonts[i].platName.equals(fileName)) {
+                return (physFonts[i].getFontName(null));
+            }
+        }
+        return null;
+    }
+
+    /*
+     * This is called when font is determined to be invalid/bad.
+     * It designed to be called (for example) by the font scaler
+     * when in processing a font file it is discovered to be incorrect.
+     * This is different than the case where fonts are discovered to
+     * be incorrect during initial verification, as such fonts are
+     * never registered.
+     * Handles to this font held are re-directed to a default font.
+     * This default may not be an ideal substitute buts it better than
+     * crashing This code assumes a PhysicalFont parameter as it doesn't
+     * make sense for a Composite to be "bad".
+     */
+    public synchronized void deRegisterBadFont(Font2D font2D) {
+        if (!(font2D instanceof PhysicalFont)) {
+            /* We should never reach here, but just in case */
+            return;
+        } else {
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger()
+                                     .severe("Deregister bad font: " + font2D);
+            }
+            replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
+        }
+    }
+
+    /*
+     * This encapsulates all the work that needs to be done when a
+     * Font2D is replaced by a different Font2D.
+     */
+    public synchronized void replaceFont(PhysicalFont oldFont,
+                                         PhysicalFont newFont) {
+
+        if (oldFont.handle.font2D != oldFont) {
+            /* already done */
+            return;
+        }
+
+        /* If we try to replace the font with itself, that won't work,
+         * so pick any alternative physical font
+         */
+        if (oldFont == newFont) {
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger()
+                      .severe("Can't replace bad font with itself " + oldFont);
+            }
+            PhysicalFont[] physFonts = getPhysicalFonts();
+            for (int i=0; i<physFonts.length;i++) {
+                if (physFonts[i] != newFont) {
+                    newFont = physFonts[i];
+                    break;
+                }
+            }
+            if (oldFont == newFont) {
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger()
+                           .severe("This is bad. No good physicalFonts found.");
+                }
+                return;
+            }
+        }
+
+        /* eliminate references to this font, so it won't be located
+         * by future callers, and will be eligible for GC when all
+         * references are removed
+         */
+        oldFont.handle.font2D = newFont;
+        physicalFonts.remove(oldFont.fullName);
+        fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
+        FontFamily.remove(oldFont);
+
+        if (localeFullNamesToFont != null) {
+            Map.Entry[] mapEntries =
+                (Map.Entry[])localeFullNamesToFont.entrySet().
+                toArray(new Map.Entry[0]);
+            /* Should I be replacing these, or just I just remove
+             * the names from the map?
+             */
+            for (int i=0; i<mapEntries.length;i++) {
+                if (mapEntries[i].getValue() == oldFont) {
+                    try {
+                        mapEntries[i].setValue(newFont);
+                    } catch (Exception e) {
+                        /* some maps don't support this operation.
+                         * In this case just give up and remove the entry.
+                         */
+                        localeFullNamesToFont.remove(mapEntries[i].getKey());
+                    }
+                }
+            }
+        }
+
+        for (int i=0; i<maxCompFont; i++) {
+            /* Deferred initialization of composites shouldn't be
+             * a problem for this case, since a font must have been
+             * initialised to be discovered to be bad.
+             * Some JRE composites on Solaris use two versions of the same
+             * font. The replaced font isn't bad, just "smaller" so there's
+             * no need to make the slot point to the new font.
+             * Since composites have a direct reference to the Font2D (not
+             * via a handle) making this substitution is not safe and could
+             * cause an additional problem and so this substitution is
+             * warranted only when a font is truly "bad" and could cause
+             * a crash. So we now replace it only if its being substituted
+             * with some font other than a fontconfig rank font
+             * Since in practice a substitution will have the same rank
+             * this may never happen, but the code is safer even if its
+             * also now a no-op.
+             * The only obvious "glitch" from this stems from the current
+             * implementation that when asked for the number of glyphs in a
+             * composite it lies and returns the number in slot 0 because
+             * composite glyphs aren't contiguous. Since we live with that
+             * we can live with the glitch that depending on how it was
+             * initialised a composite may return different values for this.
+             * Fixing the issues with composite glyph ids is tricky as
+             * there are exclusion ranges and unlike other fonts even the
+             * true "numGlyphs" isn't a contiguous range. Likely the only
+             * solution is an API that returns an array of glyph ranges
+             * which takes precedence over the existing API. That might
+             * also need to address excluding ranges which represent a
+             * code point supported by an earlier component.
+             */
+            if (newFont.getRank() > Font2D.FONT_CONFIG_RANK) {
+                compFonts[i].replaceComponentFont(oldFont, newFont);
+            }
+        }
+    }
+
+    private synchronized void loadLocaleNames() {
+        if (localeFullNamesToFont != null) {
+            return;
+        }
+        localeFullNamesToFont = new HashMap<String, TrueTypeFont>();
+        Font2D[] fonts = getRegisteredFonts();
+        for (int i=0; i<fonts.length; i++) {
+            if (fonts[i] instanceof TrueTypeFont) {
+                TrueTypeFont ttf = (TrueTypeFont)fonts[i];
+                String[] fullNames = ttf.getAllFullNames();
+                for (int n=0; n<fullNames.length; n++) {
+                    localeFullNamesToFont.put(fullNames[n], ttf);
+                }
+                FontFamily family = FontFamily.getFamily(ttf.familyName);
+                if (family != null) {
+                    FontFamily.addLocaleNames(family, ttf.getAllFamilyNames());
+                }
+            }
+        }
+    }
+
+    /* This replicate the core logic of findFont2D but operates on
+     * all the locale names. This hasn't been merged into findFont2D to
+     * keep the logic simpler and reduce overhead, since this case is
+     * almost never used. The main case in which it is called is when
+     * a bogus font name is used and we need to check all possible names
+     * before returning the default case.
+     */
+    private Font2D findFont2DAllLocales(String name, int style) {
+
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger()
+                           .info("Searching localised font names for:" + name);
+        }
+
+        /* If reach here and no match has been located, then if we have
+         * not yet built the map of localeFullNamesToFont for TT fonts, do so
+         * now. This method must be called after all fonts have been loaded.
+         */
+        if (localeFullNamesToFont == null) {
+            loadLocaleNames();
+        }
+        String lowerCaseName = name.toLowerCase();
+        Font2D font = null;
+
+        /* First see if its a family name. */
+        FontFamily family = FontFamily.getLocaleFamily(lowerCaseName);
+        if (family != null) {
+          font = family.getFont(style);
+          if (font == null) {
+            font = family.getClosestStyle(style);
+          }
+          if (font != null) {
+              return font;
+          }
+        }
+
+        /* If it wasn't a family name, it should be a full name. */
+        synchronized (this) {
+            font = localeFullNamesToFont.get(name);
+        }
+        if (font != null) {
+            if (font.style == style || style == Font.PLAIN) {
+                return font;
+            } else {
+                family = FontFamily.getFamily(font.getFamilyName(null));
+                if (family != null) {
+                    Font2D familyFont = family.getFont(style);
+                    /* We exactly matched the requested style, use it! */
+                    if (familyFont != null) {
+                        return familyFont;
+                    } else {
+                        familyFont = family.getClosestStyle(style);
+                        if (familyFont != null) {
+                            /* The next check is perhaps one
+                             * that shouldn't be done. ie if we get this
+                             * far we have probably as close a match as we
+                             * are going to get. We could load all fonts to
+                             * see if somehow some parts of the family are
+                             * loaded but not all of it.
+                             * This check is commented out for now.
+                             */
+                            if (!familyFont.canDoStyle(style)) {
+                                familyFont = null;
+                            }
+                            return familyFont;
+                        }
+                    }
+                }
+            }
+        }
+        return font;
+    }
+
+    /* Supporting "alternate" composite fonts on 2D graphics objects
+     * is accessed by the application by calling methods on the local
+     * GraphicsEnvironment. The overall implementation is described
+     * in one place, here, since otherwise the implementation is spread
+     * around it may be difficult to track.
+     * The methods below call into SunGraphicsEnvironment which creates a
+     * new FontConfiguration instance. The FontConfiguration class,
+     * and its platform sub-classes are updated to take parameters requesting
+     * these behaviours. This is then used to create new composite font
+     * instances. Since this calls the initCompositeFont method in
+     * SunGraphicsEnvironment it performs the same initialization as is
+     * performed normally. There may be some duplication of effort, but
+     * that code is already written to be able to perform properly if called
+     * to duplicate work. The main difference is that if we detect we are
+     * running in an applet/browser/Java plugin environment these new fonts
+     * are not placed in the "default" maps but into an AppContext instance.
+     * The font lookup mechanism in java.awt.Font.getFont2D() is also updated
+     * so that look-up for composite fonts will in that case always
+     * do a lookup rather than returning a cached result.
+     * This is inefficient but necessary else singleton java.awt.Font
+     * instances would not retrieve the correct Font2D for the appcontext.
+     * sun.font.FontManager.findFont2D is also updated to that it uses
+     * a name map cache specific to that appcontext.
+     *
+     * Getting an AppContext is expensive, so there is a global variable
+     * that records whether these methods have ever been called and can
+     * avoid the expense for almost all applications. Once the correct
+     * CompositeFont is associated with the Font, everything should work
+     * through existing mechanisms.
+     * A special case is that GraphicsEnvironment.getAllFonts() must
+     * return an AppContext specific list.
+     *
+     * Calling the methods below is "heavyweight" but it is expected that
+     * these methods will be called very rarely.
+     *
+     * If _usingPerAppContextComposites is true, we are in "applet"
+     * (eg browser) enviroment and at least one context has selected
+     * an alternate composite font behaviour.
+     * If _usingAlternateComposites is true, we are not in an "applet"
+     * environment and the (single) application has selected
+     * an alternate composite font behaviour.
+     *
+     * - Printing: The implementation delegates logical fonts to an AWT
+     * mechanism which cannot use these alternate configurations.
+     * We can detect that alternate fonts are in use and back-off to 2D, but
+     * that uses outlines. Much of this can be fixed with additional work
+     * but that may have to wait. The results should be correct, just not
+     * optimal.
+     */
+    private static final Object altJAFontKey       = new Object();
+    private static final Object localeFontKey       = new Object();
+    private static final Object proportionalFontKey = new Object();
+    private boolean _usingPerAppContextComposites = false;
+    private boolean _usingAlternateComposites = false;
+
+    /* These values are used only if we are running as a standalone
+     * application, as determined by maybeMultiAppContext();
+     */
+    private static boolean gAltJAFont = false;
+    private boolean gLocalePref = false;
+    private boolean gPropPref = false;
+
+    /* This method doesn't check if alternates are selected in this app
+     * context. Its used by the FontMetrics caching code which in such
+     * a case cannot retrieve a cached metrics solely on the basis of
+     * the Font.equals() method since it needs to also check if the Font2D
+     * is the same.
+     * We also use non-standard composites for Swing native L&F fonts on
+     * Windows. In that case the policy is that the metrics reported are
+     * based solely on the physical font in the first slot which is the
+     * visible java.awt.Font. So in that case the metrics cache which tests
+     * the Font does what we want. In the near future when we expand the GTK
+     * logical font definitions we may need to revisit this if GTK reports
+     * combined metrics instead. For now though this test can be simple.
+     */
+    public boolean maybeUsingAlternateCompositeFonts() {
+       return _usingAlternateComposites || _usingPerAppContextComposites;
+    }
+
+    public boolean usingAlternateCompositeFonts() {
+        return (_usingAlternateComposites ||
+                (_usingPerAppContextComposites &&
+                AppContext.getAppContext().get(CompositeFont.class) != null));
+    }
+
+    private static boolean maybeMultiAppContext() {
+        Boolean appletSM = (Boolean)
+            java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction() {
+                        public Object run() {
+                            SecurityManager sm = System.getSecurityManager();
+                            return new Boolean
+                                (sm instanceof sun.applet.AppletSecurity);
+                        }
+                    });
+        return appletSM.booleanValue();
+    }
+
+    /* Modifies the behaviour of a subsequent call to preferLocaleFonts()
+     * to use Mincho instead of Gothic for dialoginput in JA locales
+     * on windows. Not needed on other platforms.
+     */
+    public synchronized void useAlternateFontforJALocales() {
+
+        if (!FontUtilities.isWindows) {
+            return;
+        }
+
+        if (!maybeMultiAppContext()) {
+            gAltJAFont = true;
+        } else {
+            AppContext appContext = AppContext.getAppContext();
+            appContext.put(altJAFontKey, altJAFontKey);
+        }
+    }
+
+    public boolean usingAlternateFontforJALocales() {
+        if (!maybeMultiAppContext()) {
+            return gAltJAFont;
+        } else {
+            AppContext appContext = AppContext.getAppContext();
+            return appContext.get(altJAFontKey) == altJAFontKey;
+        }
+    }
+
+    public synchronized void preferLocaleFonts() {
+
+        /* Test if re-ordering will have any effect */
+        if (!FontConfiguration.willReorderForStartupLocale()) {
+            return;
+        }
+
+        if (!maybeMultiAppContext()) {
+            if (gLocalePref == true) {
+                return;
+            }
+            gLocalePref = true;
+            createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
+            _usingAlternateComposites = true;
+        } else {
+            AppContext appContext = AppContext.getAppContext();
+            if (appContext.get(localeFontKey) == localeFontKey) {
+                return;
+            }
+            appContext.put(localeFontKey, localeFontKey);
+            boolean acPropPref =
+                appContext.get(proportionalFontKey) == proportionalFontKey;
+            ConcurrentHashMap<String, Font2D>
+                altNameCache = new ConcurrentHashMap<String, Font2D> ();
+            /* If there is an existing hashtable, we can drop it. */
+            appContext.put(CompositeFont.class, altNameCache);
+            _usingPerAppContextComposites = true;
+            createCompositeFonts(altNameCache, true, acPropPref);
+        }
+    }
+
+    public synchronized void preferProportionalFonts() {
+
+        /* If no proportional fonts are configured, there's no need
+         * to take any action.
+         */
+        if (!FontConfiguration.hasMonoToPropMap()) {
+            return;
+        }
+
+        if (!maybeMultiAppContext()) {
+            if (gPropPref == true) {
+                return;
+            }
+            gPropPref = true;
+            createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
+            _usingAlternateComposites = true;
+        } else {
+            AppContext appContext = AppContext.getAppContext();
+            if (appContext.get(proportionalFontKey) == proportionalFontKey) {
+                return;
+            }
+            appContext.put(proportionalFontKey, proportionalFontKey);
+            boolean acLocalePref =
+                appContext.get(localeFontKey) == localeFontKey;
+            ConcurrentHashMap<String, Font2D>
+                altNameCache = new ConcurrentHashMap<String, Font2D> ();
+            /* If there is an existing hashtable, we can drop it. */
+            appContext.put(CompositeFont.class, altNameCache);
+            _usingPerAppContextComposites = true;
+            createCompositeFonts(altNameCache, acLocalePref, true);
+        }
+    }
+
+    private static HashSet<String> installedNames = null;
+    private static HashSet<String> getInstalledNames() {
+        if (installedNames == null) {
+           Locale l = getSystemStartupLocale();
+           SunFontManager fontManager = SunFontManager.getInstance();
+           String[] installedFamilies =
+               fontManager.getInstalledFontFamilyNames(l);
+           Font[] installedFonts = fontManager.getAllInstalledFonts();
+           HashSet<String> names = new HashSet<String>();
+           for (int i=0; i<installedFamilies.length; i++) {
+               names.add(installedFamilies[i].toLowerCase(l));
+           }
+           for (int i=0; i<installedFonts.length; i++) {
+               names.add(installedFonts[i].getFontName(l).toLowerCase(l));
+           }
+           installedNames = names;
+        }
+        return installedNames;
+    }
+
+    /* Keys are used to lookup per-AppContext Hashtables */
+    private static final Object regFamilyKey  = new Object();
+    private static final Object regFullNameKey = new Object();
+    private Hashtable<String,FontFamily> createdByFamilyName;
+    private Hashtable<String,Font2D>     createdByFullName;
+    private boolean fontsAreRegistered = false;
+    private boolean fontsAreRegisteredPerAppContext = false;
+
+    public boolean registerFont(Font font) {
+        /* This method should not be called with "null".
+         * It is the caller's responsibility to ensure that.
+         */
+        if (font == null) {
+            return false;
+        }
+
+        /* Initialise these objects only once we start to use this API */
+        synchronized (regFamilyKey) {
+            if (createdByFamilyName == null) {
+                createdByFamilyName = new Hashtable<String,FontFamily>();
+                createdByFullName = new Hashtable<String,Font2D>();
+            }
+        }
+
+        if (! FontAccess.getFontAccess().isCreatedFont(font)) {
+            return false;
+        }
+        /* We want to ensure that this font cannot override existing
+         * installed fonts. Check these conditions :
+         * - family name is not that of an installed font
+         * - full name is not that of an installed font
+         * - family name is not the same as the full name of an installed font
+         * - full name is not the same as the family name of an installed font
+         * The last two of these may initially look odd but the reason is
+         * that (unfortunately) Font constructors do not distinuguish these.
+         * An extreme example of such a problem would be a font which has
+         * family name "Dialog.Plain" and full name of "Dialog".
+         * The one arguably overly stringent restriction here is that if an
+         * application wants to supply a new member of an existing family
+         * It will get rejected. But since the JRE can perform synthetic
+         * styling in many cases its not necessary.
+         * We don't apply the same logic to registered fonts. If apps want
+         * to do this lets assume they have a reason. It won't cause problems
+         * except for themselves.
+         */
+        HashSet<String> names = getInstalledNames();
+        Locale l = getSystemStartupLocale();
+        String familyName = font.getFamily(l).toLowerCase();
+        String fullName = font.getFontName(l).toLowerCase();
+        if (names.contains(familyName) || names.contains(fullName)) {
+            return false;
+        }
+
+        /* Checks passed, now register the font */
+        Hashtable<String,FontFamily> familyTable;
+        Hashtable<String,Font2D> fullNameTable;
+        if (!maybeMultiAppContext()) {
+            familyTable = createdByFamilyName;
+            fullNameTable = createdByFullName;
+            fontsAreRegistered = true;
+        } else {
+            AppContext appContext = AppContext.getAppContext();
+            familyTable =
+                (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
+            fullNameTable =
+                (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
+            if (familyTable == null) {
+                familyTable = new Hashtable<String,FontFamily>();
+                fullNameTable = new Hashtable<String,Font2D>();
+                appContext.put(regFamilyKey, familyTable);
+                appContext.put(regFullNameKey, fullNameTable);
+            }
+            fontsAreRegisteredPerAppContext = true;
+        }
+        /* Create the FontFamily and add font to the tables */
+        Font2D font2D = FontUtilities.getFont2D(font);
+        int style = font2D.getStyle();
+        FontFamily family = familyTable.get(familyName);
+        if (family == null) {
+            family = new FontFamily(font.getFamily(l));
+            familyTable.put(familyName, family);
+        }
+        /* Remove name cache entries if not using app contexts.
+         * To accommodate a case where code may have registered first a plain
+         * family member and then used it and is now registering a bold family
+         * member, we need to remove all members of the family, so that the
+         * new style can get picked up rather than continuing to synthesise.
+         */
+        if (fontsAreRegistered) {
+            removeFromCache(family.getFont(Font.PLAIN));
+            removeFromCache(family.getFont(Font.BOLD));
+            removeFromCache(family.getFont(Font.ITALIC));
+            removeFromCache(family.getFont(Font.BOLD|Font.ITALIC));
+            removeFromCache(fullNameTable.get(fullName));
+        }
+        family.setFont(font2D, style);
+        fullNameTable.put(fullName, font2D);
+        return true;
+    }
+
+    /* Remove from the name cache all references to the Font2D */
+    private void removeFromCache(Font2D font) {
+        if (font == null) {
+            return;
+        }
+        String[] keys = (String[])(fontNameCache.keySet().toArray(STR_ARRAY));
+        for (int k=0; k<keys.length;k++) {
+            if (fontNameCache.get(keys[k]) == font) {
+                fontNameCache.remove(keys[k]);
+            }
+        }
+    }
+
+    // It may look odd to use TreeMap but its more convenient to the caller.
+    public TreeMap<String, String> getCreatedFontFamilyNames() {
+
+        Hashtable<String,FontFamily> familyTable;
+        if (fontsAreRegistered) {
+            familyTable = createdByFamilyName;
+        } else if (fontsAreRegisteredPerAppContext) {
+            AppContext appContext = AppContext.getAppContext();
+            familyTable =
+                (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
+        } else {
+            return null;
+        }
+
+        Locale l = getSystemStartupLocale();
+        synchronized (familyTable) {
+            TreeMap<String, String> map = new TreeMap<String, String>();
+            for (FontFamily f : familyTable.values()) {
+                Font2D font2D = f.getFont(Font.PLAIN);
+                if (font2D == null) {
+                    font2D = f.getClosestStyle(Font.PLAIN);
+                }
+                String name = font2D.getFamilyName(l);
+                map.put(name.toLowerCase(l), name);
+            }
+            return map;
+        }
+    }
+
+    public Font[] getCreatedFonts() {
+
+        Hashtable<String,Font2D> nameTable;
+        if (fontsAreRegistered) {
+            nameTable = createdByFullName;
+        } else if (fontsAreRegisteredPerAppContext) {
+            AppContext appContext = AppContext.getAppContext();
+            nameTable =
+                (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
+        } else {
+            return null;
+        }
+
+        Locale l = getSystemStartupLocale();
+        synchronized (nameTable) {
+            Font[] fonts = new Font[nameTable.size()];
+            int i=0;
+            for (Font2D font2D : nameTable.values()) {
+                fonts[i++] = new Font(font2D.getFontName(l), Font.PLAIN, 1);
+            }
+            return fonts;
+        }
+    }
+
+    protected String[] getPlatformFontDirs(boolean noType1Fonts) {
+        String path = getFontPath(true);
+        StringTokenizer parser =
+            new StringTokenizer(path, File.pathSeparator);
+        ArrayList<String> pathList = new ArrayList<String>();
+        try {
+            while (parser.hasMoreTokens()) {
+                pathList.add(parser.nextToken());
+            }
+        } catch (NoSuchElementException e) {
+        }
+        return pathList.toArray(new String[0]);
+    }
+
+    /**
+     * Returns an array of two strings. The first element is the
+     * name of the font. The second element is the file name.
+     */
+    public abstract String[] getDefaultPlatformFont();
+
+    // Begin: Refactored from SunGraphicsEnviroment.
+
+    /*
+     * helper function for registerFonts
+     */
+    private void addDirFonts(String dirName, File dirFile,
+                             FilenameFilter filter,
+                             int fontFormat, boolean useJavaRasterizer,
+                             int fontRank,
+                             boolean defer, boolean resolveSymLinks) {
+        String[] ls = dirFile.list(filter);
+        if (ls == null || ls.length == 0) {
+            return;
+        }
+        String[] fontNames = new String[ls.length];
+        String[][] nativeNames = new String[ls.length][];
+        int fontCount = 0;
+
+        for (int i=0; i < ls.length; i++ ) {
+            File theFile = new File(dirFile, ls[i]);
+            String fullName = null;
+            if (resolveSymLinks) {
+                try {
+                    fullName = theFile.getCanonicalPath();
+                } catch (IOException e) {
+                }
+            }
+            if (fullName == null) {
+                fullName = dirName + File.separator + ls[i];
+            }
+
+            // REMIND: case compare depends on platform
+            if (registeredFontFiles.contains(fullName)) {
+                continue;
+            }
+
+            if (badFonts != null && badFonts.contains(fullName)) {
+                if (FontUtilities.debugFonts()) {
+                    FontUtilities.getLogger()
+                                         .warning("skip bad font " + fullName);
+                }
+                continue; // skip this font file.
+            }
+
+            registeredFontFiles.add(fullName);
+
+            if (FontUtilities.debugFonts()
+                && FontUtilities.getLogger().isLoggable(PlatformLogger.INFO)) {
+                String message = "Registering font " + fullName;
+                String[] natNames = getNativeNames(fullName, null);
+                if (natNames == null) {
+                    message += " with no native name";
+                } else {
+                    message += " with native name(s) " + natNames[0];
+                    for (int nn = 1; nn < natNames.length; nn++) {
+                        message += ", " + natNames[nn];
+                    }
+                }
+                FontUtilities.getLogger().info(message);
+            }
+            fontNames[fontCount] = fullName;
+            nativeNames[fontCount++] = getNativeNames(fullName, null);
+        }
+        registerFonts(fontNames, nativeNames, fontCount, fontFormat,
+                         useJavaRasterizer, fontRank, defer);
+        return;
+    }
+
+    protected String[] getNativeNames(String fontFileName,
+                                      String platformName) {
+        return null;
+    }
+
+    /**
+     * Returns a file name for the physical font represented by this platform
+     * font name. The default implementation tries to obtain the file name
+     * from the font configuration.
+     * Subclasses may override to provide information from other sources.
+     */
+    protected String getFileNameFromPlatformName(String platformFontName) {
+        return fontConfig.getFileNameFromPlatformName(platformFontName);
+    }
+
+    /**
+     * Return the default font configuration.
+     */
+    public FontConfiguration getFontConfiguration() {
+        return fontConfig;
+    }
+
+    /* A call to this method should be followed by a call to
+     * registerFontDirs(..)
+     */
+    protected String getPlatformFontPath(boolean noType1Font) {
+        if (fontPath == null) {
+            fontPath = getFontPath(noType1Font);
+        }
+        return fontPath;
+    }
+
+    public static boolean isOpenJDK() {
+        return FontUtilities.isOpenJDK;
+    }
+
+    protected void loadFonts() {
+        if (discoveredAllFonts) {
+            return;
+        }
+        /* Use lock specific to the font system */
+        synchronized (lucidaFontName) {
+            if (FontUtilities.debugFonts()) {
+                Thread.dumpStack();
+                FontUtilities.getLogger()
+                            .info("SunGraphicsEnvironment.loadFonts() called");
+            }
+            initialiseDeferredFonts();
+
+            java.security.AccessController.doPrivileged(
+                                    new java.security.PrivilegedAction() {
+                public Object run() {
+                    if (fontPath == null) {
+                        fontPath = getPlatformFontPath(noType1Font);
+                        registerFontDirs(fontPath);
+                    }
+                    if (fontPath != null) {
+                        // this will find all fonts including those already
+                        // registered. But we have checks in place to prevent
+                        // double registration.
+                        if (! gotFontsFromPlatform()) {
+                            registerFontsOnPath(fontPath, false,
+                                                Font2D.UNKNOWN_RANK,
+                                                false, true);
+                            loadedAllFontFiles = true;
+                        }
+                    }
+                    registerOtherFontFiles(registeredFontFiles);
+                    discoveredAllFonts = true;
+                    return null;
+                }
+            });
+        }
+    }
+
+    protected void registerFontDirs(String pathName) {
+        return;
+    }
+
+    private void registerFontsOnPath(String pathName,
+                                     boolean useJavaRasterizer, int fontRank,
+                                     boolean defer, boolean resolveSymLinks) {
+
+        StringTokenizer parser = new StringTokenizer(pathName,
+                File.pathSeparator);
+        try {
+            while (parser.hasMoreTokens()) {
+                registerFontsInDir(parser.nextToken(),
+                        useJavaRasterizer, fontRank,
+                        defer, resolveSymLinks);
+            }
+        } catch (NoSuchElementException e) {
+        }
+    }
+
+    /* Called to register fall back fonts */
+    public void registerFontsInDir(String dirName) {
+        registerFontsInDir(dirName, true, Font2D.JRE_RANK, true, false);
+    }
+
+    private void registerFontsInDir(String dirName, boolean useJavaRasterizer,
+                                    int fontRank,
+                                    boolean defer, boolean resolveSymLinks) {
+        File pathFile = new File(dirName);
+        addDirFonts(dirName, pathFile, ttFilter,
+                    FONTFORMAT_TRUETYPE, useJavaRasterizer,
+                    fontRank==Font2D.UNKNOWN_RANK ?
+                    Font2D.TTF_RANK : fontRank,
+                    defer, resolveSymLinks);
+        addDirFonts(dirName, pathFile, t1Filter,
+                    FONTFORMAT_TYPE1, useJavaRasterizer,
+                    fontRank==Font2D.UNKNOWN_RANK ?
+                    Font2D.TYPE1_RANK : fontRank,
+                    defer, resolveSymLinks);
+    }
+
+    protected void registerFontDir(String path) {
+    }
+
+    /**
+     * Returns file name for default font, either absolute
+     * or relative as needed by registerFontFile.
+     */
+    public synchronized String getDefaultFontFile() {
+        if (defaultFontFileName == null) {
+            initDefaultFonts();
+        }
+        return defaultFontFileName;
+    }
+
+    private void initDefaultFonts() {
+        if (!isOpenJDK()) {
+            defaultFontName = lucidaFontName;
+            if (useAbsoluteFontFileNames()) {
+                defaultFontFileName =
+                    jreFontDirName + File.separator + FontUtilities.LUCIDA_FILE_NAME;
+            } else {
+                defaultFontFileName = FontUtilities.LUCIDA_FILE_NAME;
+            }
+        }
+    }
+
+    /**
+     * Whether registerFontFile expects absolute or relative
+     * font file names.
+     */
+    protected boolean useAbsoluteFontFileNames() {
+        return true;
+    }
+
+    /**
+     * Creates this environment's FontConfiguration.
+     */
+    protected abstract FontConfiguration createFontConfiguration();
+
+    public abstract FontConfiguration
+    createFontConfiguration(boolean preferLocaleFonts,
+                            boolean preferPropFonts);
+
+    /**
+     * Returns face name for default font, or null if
+     * no face names are used for CompositeFontDescriptors
+     * for this platform.
+     */
+    public synchronized String getDefaultFontFaceName() {
+        if (defaultFontName == null) {
+            initDefaultFonts();
+        }
+        return defaultFontName;
+    }
+
+    public void loadFontFiles() {
+        loadFonts();
+        if (loadedAllFontFiles) {
+            return;
+        }
+        /* Use lock specific to the font system */
+        synchronized (lucidaFontName) {
+            if (FontUtilities.debugFonts()) {
+                Thread.dumpStack();
+                FontUtilities.getLogger().info("loadAllFontFiles() called");
+            }
+            java.security.AccessController.doPrivileged(
+                                    new java.security.PrivilegedAction() {
+                public Object run() {
+                    if (fontPath == null) {
+                        fontPath = getPlatformFontPath(noType1Font);
+                    }
+                    if (fontPath != null) {
+                        // this will find all fonts including those already
+                        // registered. But we have checks in place to prevent
+                        // double registration.
+                        registerFontsOnPath(fontPath, false,
+                                            Font2D.UNKNOWN_RANK,
+                                            false, true);
+                    }
+                    loadedAllFontFiles = true;
+                    return null;
+                }
+            });
+        }
+    }
+
+    /*
+     * This method asks the font configuration API for all platform names
+     * used as components of composite/logical fonts and iterates over these
+     * looking up their corresponding file name and registers these fonts.
+     * It also ensures that the fonts are accessible via platform APIs.
+     * The composites themselves are then registered.
+     */
+    private void
+        initCompositeFonts(FontConfiguration fontConfig,
+                           ConcurrentHashMap<String, Font2D>  altNameCache) {
+
+        int numCoreFonts = fontConfig.getNumberCoreFonts();
+        String[] fcFonts = fontConfig.getPlatformFontNames();
+        for (int f=0; f<fcFonts.length; f++) {
+            String platformFontName = fcFonts[f];
+            String fontFileName =
+                getFileNameFromPlatformName(platformFontName);
+            String[] nativeNames = null;
+            if (fontFileName == null
+                || fontFileName.equals(platformFontName)) {
+                /* No file located, so register using the platform name,
+                 * i.e. as a native font.
+                 */
+                fontFileName = platformFontName;
+            } else {
+                if (f < numCoreFonts) {
+                    /* If platform APIs also need to access the font, add it
+                     * to a set to be registered with the platform too.
+                     * This may be used to add the parent directory to the X11
+                     * font path if its not already there. See the docs for the
+                     * subclass implementation.
+                     * This is now mainly for the benefit of X11-based AWT
+                     * But for historical reasons, 2D initialisation code
+                     * makes these calls.
+                     * If the fontconfiguration file is properly set up
+                     * so that all fonts are mapped to files and all their
+                     * appropriate directories are specified, then this
+                     * method will be low cost as it will return after
+                     * a test that finds a null lookup map.
+                     */
+                    addFontToPlatformFontPath(platformFontName);
+                }
+                nativeNames = getNativeNames(fontFileName, platformFontName);
+            }
+            /* Uncomment these two lines to "generate" the XLFD->filename
+             * mappings needed to speed start-up on Solaris.
+             * Augment this with the appendedpathname and the mappings
+             * for native (F3) fonts
+             */
+            //String platName = platformFontName.replaceAll(" ", "_");
+            //System.out.println("filename."+platName+"="+fontFileName);
+            registerFontFile(fontFileName, nativeNames,
+                             Font2D.FONT_CONFIG_RANK, true);
+
+
+        }
+        /* This registers accumulated paths from the calls to
+         * addFontToPlatformFontPath(..) and any specified by
+         * the font configuration. Rather than registering
+         * the fonts it puts them in a place and form suitable for
+         * the Toolkit to pick up and use if a toolkit is initialised,
+         * and if it uses X11 fonts.
+         */
+        registerPlatformFontsUsedByFontConfiguration();
+
+        CompositeFontDescriptor[] compositeFontInfo
+                = fontConfig.get2DCompositeFontInfo();
+        for (int i = 0; i < compositeFontInfo.length; i++) {
+            CompositeFontDescriptor descriptor = compositeFontInfo[i];
+            String[] componentFileNames = descriptor.getComponentFileNames();
+            String[] componentFaceNames = descriptor.getComponentFaceNames();
+
+            /* It would be better eventually to handle this in the
+             * FontConfiguration code which should also remove duplicate slots
+             */
+            if (missingFontFiles != null) {
+                for (int ii=0; ii<componentFileNames.length; ii++) {
+                    if (missingFontFiles.contains(componentFileNames[ii])) {
+                        componentFileNames[ii] = getDefaultFontFile();
+                        componentFaceNames[ii] = getDefaultFontFaceName();
+                    }
+                }
+            }
+
+            /* FontConfiguration needs to convey how many fonts it has added
+             * as fallback component fonts which should not affect metrics.
+             * The core component count will be the number of metrics slots.
+             * This does not preclude other mechanisms for adding
+             * fall back component fonts to the composite.
+             */
+            if (altNameCache != null) {
+                SunFontManager.registerCompositeFont(
+                    descriptor.getFaceName(),
+                    componentFileNames, componentFaceNames,
+                    descriptor.getCoreComponentCount(),
+                    descriptor.getExclusionRanges(),
+                    descriptor.getExclusionRangeLimits(),
+                    true,
+                    altNameCache);
+            } else {
+                registerCompositeFont(descriptor.getFaceName(),
+                                      componentFileNames, componentFaceNames,
+                                      descriptor.getCoreComponentCount(),
+                                      descriptor.getExclusionRanges(),
+                                      descriptor.getExclusionRangeLimits(),
+                                      true);
+            }
+            if (FontUtilities.debugFonts()) {
+                FontUtilities.getLogger()
+                               .info("registered " + descriptor.getFaceName());
+            }
+        }
+    }
+
+    /**
+     * Notifies graphics environment that the logical font configuration
+     * uses the given platform font name. The graphics environment may
+     * use this for platform specific initialization.
+     */
+    protected void addFontToPlatformFontPath(String platformFontName) {
+    }
+
+    protected void registerFontFile(String fontFileName, String[] nativeNames,
+                                    int fontRank, boolean defer) {
+//      REMIND: case compare depends on platform
+        if (registeredFontFiles.contains(fontFileName)) {
+            return;
+        }
+        int fontFormat;
+        if (ttFilter.accept(null, fontFileName)) {
+            fontFormat = FONTFORMAT_TRUETYPE;
+        } else if (t1Filter.accept(null, fontFileName)) {
+            fontFormat = FONTFORMAT_TYPE1;
+        } else {
+            fontFormat = FONTFORMAT_NATIVE;
+        }
+        registeredFontFiles.add(fontFileName);
+        if (defer) {
+            registerDeferredFont(fontFileName, fontFileName, nativeNames,
+                                 fontFormat, false, fontRank);
+        } else {
+            registerFontFile(fontFileName, nativeNames, fontFormat, false,
+                             fontRank);
+        }
+    }
+
+    protected void registerPlatformFontsUsedByFontConfiguration() {
+    }
+
+    /*
+     * A GE may verify whether a font file used in a fontconfiguration
+     * exists. If it doesn't then either we may substitute the default
+     * font, or perhaps elide it altogether from the composite font.
+     * This makes some sense on windows where the font file is only
+     * likely to be in one place. But on other OSes, eg Linux, the file
+     * can move around depending. So there we probably don't want to assume
+     * its missing and so won't add it to this list.
+     * If this list - missingFontFiles - is non-null then the composite
+     * font initialisation logic tests to see if a font file is in that
+     * set.
+     * Only one thread should be able to add to this set so we don't
+     * synchronize.
+     */
+    protected void addToMissingFontFileList(String fileName) {
+        if (missingFontFiles == null) {
+            missingFontFiles = new HashSet<String>();
+        }
+        missingFontFiles.add(fileName);
+    }
+
+    /*
+     * This is for use only within getAllFonts().
+     * Fonts listed in the fontconfig files for windows were all
+     * on the "deferred" initialisation list. They were registered
+     * either in the course of the application, or in the call to
+     * loadFonts() within getAllFonts(). The fontconfig file specifies
+     * the names of the fonts using the English names. If there's a
+     * different name in the execution locale, then the platform will
+     * report that, and we will construct the font with both names, and
+     * thereby enumerate it twice. This happens for Japanese fonts listed
+     * in the windows fontconfig, when run in the JA locale. The solution
+     * is to rely (in this case) on the platform's font->file mapping to
+     * determine that this name corresponds to a file we already registered.
+     * This works because
+     * - we know when we get here all deferred fonts are already initialised
+     * - when we register a font file, we register all fonts in it.
+     * - we know the fontconfig fonts are all in the windows registry
+     */
+    private boolean isNameForRegisteredFile(String fontName) {
+        String fileName = getFileNameForFontName(fontName);
+        if (fileName == null) {
+            return false;
+        }
+        return registeredFontFiles.contains(fileName);
+    }
+
+    /*
+     * This invocation is not in a privileged block because
+     * all privileged operations (reading files and properties)
+     * was conducted on the creation of the GE
+     */
+    public void
+        createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
+                             boolean preferLocale,
+                             boolean preferProportional) {
+
+        FontConfiguration fontConfig =
+            createFontConfiguration(preferLocale, preferProportional);
+        initCompositeFonts(fontConfig, altNameCache);
+    }
+
+    /**
+     * Returns all fonts installed in this environment.
+     */
+    public Font[] getAllInstalledFonts() {
+        if (allFonts == null) {
+            loadFonts();
+            TreeMap fontMapNames = new TreeMap();
+            /* warning: the number of composite fonts could change dynamically
+             * if applications are allowed to create them. "allfonts" could
+             * then be stale.
+             */
+            Font2D[] allfonts = getRegisteredFonts();
+            for (int i=0; i < allfonts.length; i++) {
+                if (!(allfonts[i] instanceof NativeFont)) {
+                    fontMapNames.put(allfonts[i].getFontName(null),
+                                     allfonts[i]);
+                }
+            }
+
+            String[] platformNames = getFontNamesFromPlatform();
+            if (platformNames != null) {
+                for (int i=0; i<platformNames.length; i++) {
+                    if (!isNameForRegisteredFile(platformNames[i])) {
+                        fontMapNames.put(platformNames[i], null);
+                    }
+                }
+            }
+
+            String[] fontNames = null;
+            if (fontMapNames.size() > 0) {
+                fontNames = new String[fontMapNames.size()];
+                Object [] keyNames = fontMapNames.keySet().toArray();
+                for (int i=0; i < keyNames.length; i++) {
+                    fontNames[i] = (String)keyNames[i];
+                }
+            }
+            Font[] fonts = new Font[fontNames.length];
+            for (int i=0; i < fontNames.length; i++) {
+                fonts[i] = new Font(fontNames[i], Font.PLAIN, 1);
+                Font2D f2d = (Font2D)fontMapNames.get(fontNames[i]);
+                if (f2d  != null) {
+                    FontAccess.getFontAccess().setFont2D(fonts[i], f2d.handle);
+                }
+            }
+            allFonts = fonts;
+        }
+
+        Font []copyFonts = new Font[allFonts.length];
+        System.arraycopy(allFonts, 0, copyFonts, 0, allFonts.length);
+        return copyFonts;
+    }
+
+    /**
+     * Get a list of installed fonts in the requested {@link Locale}.
+     * The list contains the fonts Family Names.
+     * If Locale is null, the default locale is used.
+     *
+     * @param requestedLocale, if null the default locale is used.
+     * @return list of installed fonts in the system.
+     */
+    public String[] getInstalledFontFamilyNames(Locale requestedLocale) {
+        if (requestedLocale == null) {
+            requestedLocale = Locale.getDefault();
+        }
+        if (allFamilies != null && lastDefaultLocale != null &&
+            requestedLocale.equals(lastDefaultLocale)) {
+                String[] copyFamilies = new String[allFamilies.length];
+                System.arraycopy(allFamilies, 0, copyFamilies,
+                                 0, allFamilies.length);
+                return copyFamilies;
+        }
+
+        TreeMap<String,String> familyNames = new TreeMap<String,String>();
+        //  these names are always there and aren't localised
+        String str;
+        str = Font.SERIF;         familyNames.put(str.toLowerCase(), str);
+        str = Font.SANS_SERIF;    familyNames.put(str.toLowerCase(), str);
+        str = Font.MONOSPACED;    familyNames.put(str.toLowerCase(), str);
+        str = Font.DIALOG;        familyNames.put(str.toLowerCase(), str);
+        str = Font.DIALOG_INPUT;  familyNames.put(str.toLowerCase(), str);
+
+        /* Platform APIs may be used to get the set of available family
+         * names for the current default locale so long as it is the same
+         * as the start-up system locale, rather than loading all fonts.
+         */
+        if (requestedLocale.equals(getSystemStartupLocale()) &&
+            getFamilyNamesFromPlatform(familyNames, requestedLocale)) {
+            /* Augment platform names with JRE font family names */
+            getJREFontFamilyNames(familyNames, requestedLocale);
+        } else {
+            loadFontFiles();
+            Font2D[] physicalfonts = getPhysicalFonts();
+            for (int i=0; i < physicalfonts.length; i++) {
+                if (!(physicalfonts[i] instanceof NativeFont)) {
+                    String name =
+                        physicalfonts[i].getFamilyName(requestedLocale);
+                    familyNames.put(name.toLowerCase(requestedLocale), name);
+                }
+            }
+        }
+
+        String[] retval =  new String[familyNames.size()];
+        Object [] keyNames = familyNames.keySet().toArray();
+        for (int i=0; i < keyNames.length; i++) {
+            retval[i] = (String)familyNames.get(keyNames[i]);
+        }
+        if (requestedLocale.equals(Locale.getDefault())) {
+            lastDefaultLocale = requestedLocale;
+            allFamilies = new String[retval.length];
+            System.arraycopy(retval, 0, allFamilies, 0, allFamilies.length);
+        }
+        return retval;
+    }
+
+    public void register1dot0Fonts() {
+        java.security.AccessController.doPrivileged(
+                            new java.security.PrivilegedAction() {
+            public Object run() {
+                String type1Dir = "/usr/openwin/lib/X11/fonts/Type1";
+                registerFontsInDir(type1Dir, true, Font2D.TYPE1_RANK,
+                                   false, false);
+                return null;
+            }
+        });
+    }
+
+    /* Really we need only the JRE fonts family names, but there's little
+     * overhead in doing this the easy way by adding all the currently
+     * known fonts.
+     */
+    protected void getJREFontFamilyNames(TreeMap<String,String> familyNames,
+                                         Locale requestedLocale) {
+        registerDeferredJREFonts(jreFontDirName);
+        Font2D[] physicalfonts = getPhysicalFonts();
+        for (int i=0; i < physicalfonts.length; i++) {
+            if (!(physicalfonts[i] instanceof NativeFont)) {
+                String name =
+                    physicalfonts[i].getFamilyName(requestedLocale);
+                familyNames.put(name.toLowerCase(requestedLocale), name);
+            }
+        }
+    }
+
+    /**
+     * Default locale can be changed but we need to know the initial locale
+     * as that is what is used by native code. Changing Java default locale
+     * doesn't affect that.
+     * Returns the locale in use when using native code to communicate
+     * with platform APIs. On windows this is known as the "system" locale,
+     * and it is usually the same as the platform locale, but not always,
+     * so this method also checks an implementation property used only
+     * on windows and uses that if set.
+     */
+    private static Locale systemLocale = null;
+    private static Locale getSystemStartupLocale() {
+        if (systemLocale == null) {
+            systemLocale = (Locale)
+                java.security.AccessController.doPrivileged(
+                                    new java.security.PrivilegedAction() {
+            public Object run() {
+                /* On windows the system locale may be different than the
+                 * user locale. This is an unsupported configuration, but
+                 * in that case we want to return a dummy locale that will
+                 * never cause a match in the usage of this API. This is
+                 * important because Windows documents that the family
+                 * names of fonts are enumerated using the language of
+                 * the system locale. BY returning a dummy locale in that
+                 * case we do not use the platform API which would not
+                 * return us the names we want.
+                 */
+                String fileEncoding = System.getProperty("file.encoding", "");
+                String sysEncoding = System.getProperty("sun.jnu.encoding");
+                if (sysEncoding != null && !sysEncoding.equals(fileEncoding)) {
+                    return Locale.ROOT;
+                }
+
+                String language = System.getProperty("user.language", "en");
+                String country  = System.getProperty("user.country","");
+                String variant  = System.getProperty("user.variant","");
+                return new Locale(language, country, variant);
+            }
+        });
+        }
+        return systemLocale;
+    }
+
+    void addToPool(FileFont font) {
+
+        FileFont fontFileToClose = null;
+        int freeSlot = -1;
+
+        synchronized (fontFileCache) {
+            /* Avoid duplicate entries in the pool, and don't close() it,
+             * since this method is called only from within open().
+             * Seeing a duplicate is most likely to happen if the thread
+             * was interrupted during a read, forcing perhaps repeated
+             * close and open calls and it eventually it ends up pointing
+             * at the same slot.
+             */
+            for (int i=0;i<CHANNELPOOLSIZE;i++) {
+                if (fontFileCache[i] == font) {
+                    return;
+                }
+                if (fontFileCache[i] == null && freeSlot < 0) {
+                    freeSlot = i;
+                }
+            }
+            if (freeSlot >= 0) {
+                fontFileCache[freeSlot] = font;
+                return;
+            } else {
+                /* replace with new font. */
+                fontFileToClose = fontFileCache[lastPoolIndex];
+                fontFileCache[lastPoolIndex] = font;
+                /* lastPoolIndex is updated so that the least recently opened
+                 * file will be closed next.
+                 */
+                lastPoolIndex = (lastPoolIndex+1) % CHANNELPOOLSIZE;
+            }
+        }
+        /* Need to close the font file outside of the synchronized block,
+         * since its possible some other thread is in an open() call on
+         * this font file, and could be holding its lock and the pool lock.
+         * Releasing the pool lock allows that thread to continue, so it can
+         * then release the lock on this font, allowing the close() call
+         * below to proceed.
+         * Also, calling close() is safe because any other thread using
+         * the font we are closing() synchronizes all reading, so we
+         * will not close the file while its in use.
+         */
+        if (fontFileToClose != null) {
+            fontFileToClose.close();
+        }
+    }
+
+    protected FontUIResource getFontConfigFUIR(String family, int style,
+                                               int size)
+    {
+        return new FontUIResource(family, style, size);
+    }
+}
--- a/jdk/src/share/classes/sun/font/TrueTypeFont.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java	Wed Jul 05 17:01:52 2017 +0200
@@ -39,9 +39,10 @@
 import java.nio.ShortBuffer;
 import java.nio.channels.ClosedChannelException;
 import java.nio.channels.FileChannel;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Locale;
-import java.util.logging.Level;
 import sun.java2d.Disposer;
 import sun.java2d.DisposerRecord;
 
@@ -101,6 +102,9 @@
     public static final int FULL_NAME_ID = 4;
     public static final int POSTSCRIPT_NAME_ID = 6;
 
+    private static final short US_LCID = 0x0409;  // US English - default
+
+    private static Map<String, Short> lcidMap;
 
     class DirectoryEntry {
         int tag;
@@ -176,7 +180,7 @@
      * @throws FontFormatException - if the font can't be opened
      * or fails verification,  or there's no usable cmap
      */
-    TrueTypeFont(String platname, Object nativeNames, int fIndex,
+    public TrueTypeFont(String platname, Object nativeNames, int fIndex,
                  boolean javaRasterizer)
         throws FontFormatException {
         super(platname, nativeNames);
@@ -207,12 +211,13 @@
      * as PCF bitmap fonts on the X11 font path).
      * This method is called when creating the first strike for this font.
      */
+    @Override
     protected boolean checkUseNatives() {
         if (checkedNatives) {
             return useNatives;
         }
-        if (!FontManager.isSolaris || useJavaRasterizer ||
-            FontManager.useT2K || nativeNames == null ||
+        if (!FontUtilities.isSolaris || useJavaRasterizer ||
+            FontUtilities.useT2K || nativeNames == null ||
             getDirectoryEntry(EBLCTag) != null ||
             GraphicsEnvironment.isHeadless()) {
             checkedNatives = true;
@@ -279,8 +284,8 @@
      */
     private synchronized FileChannel open() throws FontFormatException {
         if (disposerRecord.channel == null) {
-            if (FontManager.logging) {
-                FontManager.logger.info("open TTF: " + platName);
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().info("open TTF: " + platName);
             }
             try {
                 RandomAccessFile raf = (RandomAccessFile)
@@ -296,7 +301,10 @@
                 });
                 disposerRecord.channel = raf.getChannel();
                 fileSize = (int)disposerRecord.channel.size();
-                FontManager.addToPool(this);
+                FontManager fm = FontManagerFactory.getInstance();
+                if (fm instanceof SunFontManager) {
+                    ((SunFontManager) fm).addToPool(this);
+                }
             } catch (NullPointerException e) {
                 close();
                 throw new FontFormatException(e.toString());
@@ -340,11 +348,11 @@
                          * isn't updated. If the file has changed whilst we
                          * are executing we want to bail, not spin.
                          */
-                        if (FontManager.logging) {
+                        if (FontUtilities.isLogging()) {
                             String msg = "Read offset is " + offset +
                                 " file size is " + fileSize+
                                 " file is " + platName;
-                            FontManager.logger.severe(msg);
+                            FontUtilities.getLogger().severe(msg);
                         }
                         return -1;
                     } else {
@@ -362,8 +370,8 @@
                             msg += " File size was " + fileSize +
                                 " and now is " + currSize;
                         }
-                        if (FontManager.logging) {
-                            FontManager.logger.severe(msg);
+                        if (FontUtilities.isLogging()) {
+                            FontUtilities.getLogger().severe(msg);
                         }
                         // We could still flip() the buffer here because
                         // it's possible that we did read some data in
@@ -377,10 +385,10 @@
                         // data was read to probably continue.
                         if (bread > length/2 || bread > 16384) {
                             buffer.flip();
-                            if (FontManager.logging) {
+                            if (FontUtilities.isLogging()) {
                                 msg = "Returning " + bread +
                                     " bytes instead of " + length;
-                                FontManager.logger.severe(msg);
+                                FontUtilities.getLogger().severe(msg);
                             }
                         } else {
                             bread = -1;
@@ -395,8 +403,8 @@
                 }
             }
         } catch (FontFormatException e) {
-            if (FontManager.logging) {
-                FontManager.logger.log(Level.SEVERE,
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().severe(
                                        "While reading " + platName, e);
             }
             bread = -1; // signal EOF
@@ -416,8 +424,8 @@
              * seems unlikely this would occur as problems opening the
              * file are handled as a FontFormatException.
              */
-            if (FontManager.logging) {
-                FontManager.logger.log(Level.SEVERE,
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().severe(
                                        "While reading " + platName, e);
             }
             if (bread == 0) {
@@ -540,8 +548,8 @@
             }
             initNames();
         } catch (Exception e) {
-            if (FontManager.logging) {
-                FontManager.logger.severe(e.toString());
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().severe(e.toString());
             }
             if (e instanceof FontFormatException) {
                 throw (FontFormatException)e;
@@ -687,7 +695,7 @@
             return defaultCodePage;
         }
 
-        if (FontManager.isWindows) {
+        if (FontUtilities.isWindows) {
             defaultCodePage =
                 (String)java.security.AccessController.doPrivileged(
                    new sun.security.action.GetPropertyAction("file.encoding"));
@@ -724,6 +732,7 @@
     /* Theoretically, reserved bits must not be set, include symbol bits */
     public static final int reserved_bits1 = 0x80000000;
     public static final int reserved_bits2 = 0x0000ffff;
+    @Override
     boolean supportsEncoding(String encoding) {
         if (encoding == null) {
             encoding = getCodePage();
@@ -858,6 +867,7 @@
         }
     }
 
+    @Override
     byte[] getTableBytes(int tag) {
         ByteBuffer buffer = getTableBuffer(tag);
         if (buffer == null) {
@@ -932,6 +942,7 @@
     /* This probably won't get called but is there to support the
      * contract() of setStyle() defined in the superclass.
      */
+    @Override
     protected void setStyle() {
         setStyle(getTableBuffer(os_2Tag));
     }
@@ -977,7 +988,7 @@
             style = Font.ITALIC;
             break;
         case fsSelectionBoldBit:
-            if (FontManager.isSolaris && platName.endsWith("HG-GothicB.ttf")) {
+            if (FontUtilities.isSolaris && platName.endsWith("HG-GothicB.ttf")) {
                 /* Workaround for Solaris's use of a JA font that's marked as
                  * being designed bold, but is used as a PLAIN font.
                  */
@@ -1015,6 +1026,7 @@
         ulPos = -sb.get(4) / (float)upem;
     }
 
+    @Override
     public void getStyleMetrics(float pointSize, float[] metrics, int offset) {
 
         if (ulSize == 0f && ulPos == 0f) {
@@ -1075,8 +1087,8 @@
         try {
             return new String(bytes, 0, len, charset);
         } catch (UnsupportedEncodingException e) {
-            if (FontManager.logging) {
-                FontManager.logger.warning(e + " EncodingID=" + encoding);
+            if (FontUtilities.isLogging()) {
+                FontUtilities.getLogger().warning(e + " EncodingID=" + encoding);
             }
             return new String(bytes, 0, len);
         } catch (Throwable t) {
@@ -1101,7 +1113,7 @@
             int stringPtr = sbuffer.get() & 0xffff;
 
             nameLocale = sun.awt.SunToolkit.getStartupLocale();
-            short nameLocaleID = FontManager.getLCIDFromLocale(nameLocale);
+            short nameLocaleID = getLCIDFromLocale(nameLocale);
 
             for (int i=0; i<numRecords; i++) {
                 short platformID = sbuffer.get();
@@ -1232,7 +1244,7 @@
 
     protected synchronized FontScaler getScaler() {
         if (scaler == null) {
-            scaler = FontManager.getScaler(this, fontIndex,
+            scaler = FontScaler.getScaler(this, fontIndex,
                 supportsCJK, fileSize);
         }
         return scaler;
@@ -1242,6 +1254,7 @@
     /* Postscript name is rarely requested. Don't waste cycles locating it
      * as part of font creation, nor storage to hold it. Get it only on demand.
      */
+    @Override
     public String getPostscriptName() {
         String name = lookupName(ENGLISH_LOCALE_ID, POSTSCRIPT_NAME_ID);
         if (name == null) {
@@ -1251,13 +1264,14 @@
         }
     }
 
+    @Override
     public String getFontName(Locale locale) {
         if (locale == null) {
             return fullName;
         } else if (locale.equals(nameLocale) && localeFullName != null) {
             return localeFullName;
         } else {
-            short localeID = FontManager.getLCIDFromLocale(locale);
+            short localeID = getLCIDFromLocale(locale);
             String name = lookupName(localeID, FULL_NAME_ID);
             if (name == null) {
                 return fullName;
@@ -1267,16 +1281,239 @@
         }
     }
 
+    // Return a Microsoft LCID from the given Locale.
+    // Used when getting localized font data.
+
+    private static void addLCIDMapEntry(Map<String, Short> map,
+                                        String key, short value) {
+        map.put(key, Short.valueOf(value));
+    }
+
+    private static synchronized void createLCIDMap() {
+        if (lcidMap != null) {
+            return;
+        }
+
+        Map<String, Short> map = new HashMap<String, Short>(200);
+
+        // the following statements are derived from the langIDMap
+        // in src/windows/native/java/lang/java_props_md.c using the following
+        // awk script:
+        //    $1~/\/\*/   { next}
+        //    $3~/\?\?/   { next }
+        //    $3!~/_/     { next }
+        //    $1~/0x0409/ { next }
+        //    $1~/0x0c0a/ { next }
+        //    $1~/0x042c/ { next }
+        //    $1~/0x0443/ { next }
+        //    $1~/0x0812/ { next }
+        //    $1~/0x04/   { print "        addLCIDMapEntry(map, " substr($3, 0, 3) "\", (short) " substr($1, 0, 6) ");" ; next }
+        //    $3~/,/      { print "        addLCIDMapEntry(map, " $3  " (short) " substr($1, 0, 6) ");" ; next }
+        //                { print "        addLCIDMapEntry(map, " $3 ", (short) " substr($1, 0, 6) ");" ; next }
+        // The lines of this script:
+        // - eliminate comments
+        // - eliminate questionable locales
+        // - eliminate language-only locales
+        // - eliminate the default LCID value
+        // - eliminate a few other unneeded LCID values
+        // - print language-only locale entries for x04* LCID values
+        //   (apparently Microsoft doesn't use language-only LCID values -
+        //   see http://www.microsoft.com/OpenType/otspec/name.htm
+        // - print complete entries for all other LCID values
+        // Run
+        //     awk -f awk-script langIDMap > statements
+        addLCIDMapEntry(map, "ar", (short) 0x0401);
+        addLCIDMapEntry(map, "bg", (short) 0x0402);
+        addLCIDMapEntry(map, "ca", (short) 0x0403);
+        addLCIDMapEntry(map, "zh", (short) 0x0404);
+        addLCIDMapEntry(map, "cs", (short) 0x0405);
+        addLCIDMapEntry(map, "da", (short) 0x0406);
+        addLCIDMapEntry(map, "de", (short) 0x0407);
+        addLCIDMapEntry(map, "el", (short) 0x0408);
+        addLCIDMapEntry(map, "es", (short) 0x040a);
+        addLCIDMapEntry(map, "fi", (short) 0x040b);
+        addLCIDMapEntry(map, "fr", (short) 0x040c);
+        addLCIDMapEntry(map, "iw", (short) 0x040d);
+        addLCIDMapEntry(map, "hu", (short) 0x040e);
+        addLCIDMapEntry(map, "is", (short) 0x040f);
+        addLCIDMapEntry(map, "it", (short) 0x0410);
+        addLCIDMapEntry(map, "ja", (short) 0x0411);
+        addLCIDMapEntry(map, "ko", (short) 0x0412);
+        addLCIDMapEntry(map, "nl", (short) 0x0413);
+        addLCIDMapEntry(map, "no", (short) 0x0414);
+        addLCIDMapEntry(map, "pl", (short) 0x0415);
+        addLCIDMapEntry(map, "pt", (short) 0x0416);
+        addLCIDMapEntry(map, "rm", (short) 0x0417);
+        addLCIDMapEntry(map, "ro", (short) 0x0418);
+        addLCIDMapEntry(map, "ru", (short) 0x0419);
+        addLCIDMapEntry(map, "hr", (short) 0x041a);
+        addLCIDMapEntry(map, "sk", (short) 0x041b);
+        addLCIDMapEntry(map, "sq", (short) 0x041c);
+        addLCIDMapEntry(map, "sv", (short) 0x041d);
+        addLCIDMapEntry(map, "th", (short) 0x041e);
+        addLCIDMapEntry(map, "tr", (short) 0x041f);
+        addLCIDMapEntry(map, "ur", (short) 0x0420);
+        addLCIDMapEntry(map, "in", (short) 0x0421);
+        addLCIDMapEntry(map, "uk", (short) 0x0422);
+        addLCIDMapEntry(map, "be", (short) 0x0423);
+        addLCIDMapEntry(map, "sl", (short) 0x0424);
+        addLCIDMapEntry(map, "et", (short) 0x0425);
+        addLCIDMapEntry(map, "lv", (short) 0x0426);
+        addLCIDMapEntry(map, "lt", (short) 0x0427);
+        addLCIDMapEntry(map, "fa", (short) 0x0429);
+        addLCIDMapEntry(map, "vi", (short) 0x042a);
+        addLCIDMapEntry(map, "hy", (short) 0x042b);
+        addLCIDMapEntry(map, "eu", (short) 0x042d);
+        addLCIDMapEntry(map, "mk", (short) 0x042f);
+        addLCIDMapEntry(map, "tn", (short) 0x0432);
+        addLCIDMapEntry(map, "xh", (short) 0x0434);
+        addLCIDMapEntry(map, "zu", (short) 0x0435);
+        addLCIDMapEntry(map, "af", (short) 0x0436);
+        addLCIDMapEntry(map, "ka", (short) 0x0437);
+        addLCIDMapEntry(map, "fo", (short) 0x0438);
+        addLCIDMapEntry(map, "hi", (short) 0x0439);
+        addLCIDMapEntry(map, "mt", (short) 0x043a);
+        addLCIDMapEntry(map, "se", (short) 0x043b);
+        addLCIDMapEntry(map, "gd", (short) 0x043c);
+        addLCIDMapEntry(map, "ms", (short) 0x043e);
+        addLCIDMapEntry(map, "kk", (short) 0x043f);
+        addLCIDMapEntry(map, "ky", (short) 0x0440);
+        addLCIDMapEntry(map, "sw", (short) 0x0441);
+        addLCIDMapEntry(map, "tt", (short) 0x0444);
+        addLCIDMapEntry(map, "bn", (short) 0x0445);
+        addLCIDMapEntry(map, "pa", (short) 0x0446);
+        addLCIDMapEntry(map, "gu", (short) 0x0447);
+        addLCIDMapEntry(map, "ta", (short) 0x0449);
+        addLCIDMapEntry(map, "te", (short) 0x044a);
+        addLCIDMapEntry(map, "kn", (short) 0x044b);
+        addLCIDMapEntry(map, "ml", (short) 0x044c);
+        addLCIDMapEntry(map, "mr", (short) 0x044e);
+        addLCIDMapEntry(map, "sa", (short) 0x044f);
+        addLCIDMapEntry(map, "mn", (short) 0x0450);
+        addLCIDMapEntry(map, "cy", (short) 0x0452);
+        addLCIDMapEntry(map, "gl", (short) 0x0456);
+        addLCIDMapEntry(map, "dv", (short) 0x0465);
+        addLCIDMapEntry(map, "qu", (short) 0x046b);
+        addLCIDMapEntry(map, "mi", (short) 0x0481);
+        addLCIDMapEntry(map, "ar_IQ", (short) 0x0801);
+        addLCIDMapEntry(map, "zh_CN", (short) 0x0804);
+        addLCIDMapEntry(map, "de_CH", (short) 0x0807);
+        addLCIDMapEntry(map, "en_GB", (short) 0x0809);
+        addLCIDMapEntry(map, "es_MX", (short) 0x080a);
+        addLCIDMapEntry(map, "fr_BE", (short) 0x080c);
+        addLCIDMapEntry(map, "it_CH", (short) 0x0810);
+        addLCIDMapEntry(map, "nl_BE", (short) 0x0813);
+        addLCIDMapEntry(map, "no_NO_NY", (short) 0x0814);
+        addLCIDMapEntry(map, "pt_PT", (short) 0x0816);
+        addLCIDMapEntry(map, "ro_MD", (short) 0x0818);
+        addLCIDMapEntry(map, "ru_MD", (short) 0x0819);
+        addLCIDMapEntry(map, "sr_CS", (short) 0x081a);
+        addLCIDMapEntry(map, "sv_FI", (short) 0x081d);
+        addLCIDMapEntry(map, "az_AZ", (short) 0x082c);
+        addLCIDMapEntry(map, "se_SE", (short) 0x083b);
+        addLCIDMapEntry(map, "ga_IE", (short) 0x083c);
+        addLCIDMapEntry(map, "ms_BN", (short) 0x083e);
+        addLCIDMapEntry(map, "uz_UZ", (short) 0x0843);
+        addLCIDMapEntry(map, "qu_EC", (short) 0x086b);
+        addLCIDMapEntry(map, "ar_EG", (short) 0x0c01);
+        addLCIDMapEntry(map, "zh_HK", (short) 0x0c04);
+        addLCIDMapEntry(map, "de_AT", (short) 0x0c07);
+        addLCIDMapEntry(map, "en_AU", (short) 0x0c09);
+        addLCIDMapEntry(map, "fr_CA", (short) 0x0c0c);
+        addLCIDMapEntry(map, "sr_CS", (short) 0x0c1a);
+        addLCIDMapEntry(map, "se_FI", (short) 0x0c3b);
+        addLCIDMapEntry(map, "qu_PE", (short) 0x0c6b);
+        addLCIDMapEntry(map, "ar_LY", (short) 0x1001);
+        addLCIDMapEntry(map, "zh_SG", (short) 0x1004);
+        addLCIDMapEntry(map, "de_LU", (short) 0x1007);
+        addLCIDMapEntry(map, "en_CA", (short) 0x1009);
+        addLCIDMapEntry(map, "es_GT", (short) 0x100a);
+        addLCIDMapEntry(map, "fr_CH", (short) 0x100c);
+        addLCIDMapEntry(map, "hr_BA", (short) 0x101a);
+        addLCIDMapEntry(map, "ar_DZ", (short) 0x1401);
+        addLCIDMapEntry(map, "zh_MO", (short) 0x1404);
+        addLCIDMapEntry(map, "de_LI", (short) 0x1407);
+        addLCIDMapEntry(map, "en_NZ", (short) 0x1409);
+        addLCIDMapEntry(map, "es_CR", (short) 0x140a);
+        addLCIDMapEntry(map, "fr_LU", (short) 0x140c);
+        addLCIDMapEntry(map, "bs_BA", (short) 0x141a);
+        addLCIDMapEntry(map, "ar_MA", (short) 0x1801);
+        addLCIDMapEntry(map, "en_IE", (short) 0x1809);
+        addLCIDMapEntry(map, "es_PA", (short) 0x180a);
+        addLCIDMapEntry(map, "fr_MC", (short) 0x180c);
+        addLCIDMapEntry(map, "sr_BA", (short) 0x181a);
+        addLCIDMapEntry(map, "ar_TN", (short) 0x1c01);
+        addLCIDMapEntry(map, "en_ZA", (short) 0x1c09);
+        addLCIDMapEntry(map, "es_DO", (short) 0x1c0a);
+        addLCIDMapEntry(map, "sr_BA", (short) 0x1c1a);
+        addLCIDMapEntry(map, "ar_OM", (short) 0x2001);
+        addLCIDMapEntry(map, "en_JM", (short) 0x2009);
+        addLCIDMapEntry(map, "es_VE", (short) 0x200a);
+        addLCIDMapEntry(map, "ar_YE", (short) 0x2401);
+        addLCIDMapEntry(map, "es_CO", (short) 0x240a);
+        addLCIDMapEntry(map, "ar_SY", (short) 0x2801);
+        addLCIDMapEntry(map, "en_BZ", (short) 0x2809);
+        addLCIDMapEntry(map, "es_PE", (short) 0x280a);
+        addLCIDMapEntry(map, "ar_JO", (short) 0x2c01);
+        addLCIDMapEntry(map, "en_TT", (short) 0x2c09);
+        addLCIDMapEntry(map, "es_AR", (short) 0x2c0a);
+        addLCIDMapEntry(map, "ar_LB", (short) 0x3001);
+        addLCIDMapEntry(map, "en_ZW", (short) 0x3009);
+        addLCIDMapEntry(map, "es_EC", (short) 0x300a);
+        addLCIDMapEntry(map, "ar_KW", (short) 0x3401);
+        addLCIDMapEntry(map, "en_PH", (short) 0x3409);
+        addLCIDMapEntry(map, "es_CL", (short) 0x340a);
+        addLCIDMapEntry(map, "ar_AE", (short) 0x3801);
+        addLCIDMapEntry(map, "es_UY", (short) 0x380a);
+        addLCIDMapEntry(map, "ar_BH", (short) 0x3c01);
+        addLCIDMapEntry(map, "es_PY", (short) 0x3c0a);
+        addLCIDMapEntry(map, "ar_QA", (short) 0x4001);
+        addLCIDMapEntry(map, "es_BO", (short) 0x400a);
+        addLCIDMapEntry(map, "es_SV", (short) 0x440a);
+        addLCIDMapEntry(map, "es_HN", (short) 0x480a);
+        addLCIDMapEntry(map, "es_NI", (short) 0x4c0a);
+        addLCIDMapEntry(map, "es_PR", (short) 0x500a);
+
+        lcidMap = map;
+    }
+
+    private static short getLCIDFromLocale(Locale locale) {
+        // optimize for common case
+        if (locale.equals(Locale.US)) {
+            return US_LCID;
+        }
+
+        if (lcidMap == null) {
+            createLCIDMap();
+        }
+
+        String key = locale.toString();
+        while (!"".equals(key)) {
+            Short lcidObject = (Short) lcidMap.get(key);
+            if (lcidObject != null) {
+                return lcidObject.shortValue();
+            }
+            int pos = key.lastIndexOf('_');
+            if (pos < 1) {
+                return US_LCID;
+            }
+            key = key.substring(0, pos);
+        }
+
+        return US_LCID;
+    }
+
+    @Override
     public String getFamilyName(Locale locale) {
         if (locale == null) {
             return familyName;
         } else if (locale.equals(nameLocale) && localeFamilyName != null) {
             return localeFamilyName;
         } else {
-            short localeID = FontManager.getLCIDFromLocale(locale);
+            short localeID = getLCIDFromLocale(locale);
             String name = lookupName(localeID, FAMILY_NAME_ID);
             if (name == null) {
-               return familyName;
+                return familyName;
             } else {
                 return name;
             }
@@ -1353,6 +1590,7 @@
 
     /*  Used by the OpenType engine for mark positioning.
      */
+    @Override
     Point2D.Float getGlyphPoint(long pScalerContext,
                                 int glyphCode, int ptNumber) {
         try {
@@ -1414,6 +1652,7 @@
      * REMIND: consider unpacking the table into an array of booleans
      * for faster use.
      */
+    @Override
     public boolean useAAForPtSize(int ptsize) {
 
         char[] gasp = getGaspTable();
@@ -1433,12 +1672,15 @@
         }
     }
 
+    @Override
     public boolean hasSupplementaryChars() {
         return ((TrueTypeGlyphMapper)getMapper()).hasSupplementaryChars();
     }
 
+    @Override
     public String toString() {
         return "** TrueType Font: Family="+familyName+ " Name="+fullName+
             " style="+style+" fileName="+platName;
     }
+
 }
--- a/jdk/src/share/classes/sun/font/TrueTypeGlyphMapper.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/TrueTypeGlyphMapper.java	Wed Jul 05 17:01:52 2017 +0200
@@ -60,9 +60,9 @@
         missingGlyph = 0; /* standard for TrueType fonts */
         ByteBuffer buffer = font.getTableBuffer(TrueTypeFont.maxpTag);
         numGlyphs = buffer.getChar(4); // offset 4 bytes in MAXP table.
-        if (FontManager.isSolaris && isJAlocale && font.supportsJA()) {
+        if (FontUtilities.isSolaris && isJAlocale && font.supportsJA()) {
             needsJAremapping = true;
-            if (FontManager.isSolaris8 &&
+            if (FontUtilities.isSolaris8 &&
                 getGlyphFromCMAP(JA_WAVE_DASH_CHAR) == missingGlyph) {
                 remapJAWaveDash = true;
             }
@@ -82,8 +82,8 @@
                 glyphCode >= FileFontStrike.INVISIBLE_GLYPHS) {
                 return glyphCode;
             } else {
-                if (FontManager.logging) {
-                    FontManager.logger.warning
+                if (FontUtilities.isLogging()) {
+                    FontUtilities.getLogger().warning
                         (font + " out of range glyph id=" +
                          Integer.toHexString((int)glyphCode) +
                          " for char " + Integer.toHexString(charCode));
@@ -97,11 +97,11 @@
     }
 
     private void handleBadCMAP() {
-        if (FontManager.logging) {
-            FontManager.logger.severe("Null Cmap for " + font +
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger().severe("Null Cmap for " + font +
                                       "substituting for this font");
         }
-        FontManager.deRegisterBadFont(font);
+        SunFontManager.getInstance().deRegisterBadFont(font);
         /* The next line is not really a solution, but might
          * reduce the exceptions until references to this font2D
          * are gone.
@@ -242,10 +242,10 @@
                 font.glyphToCharMap[glyphs[i]] = (char)code;
             }
 
-            if (code < FontManager.MIN_LAYOUT_CHARCODE) {
+            if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
                 continue;
             }
-            else if (FontManager.isComplexCharCode(code)) {
+            else if (FontUtilities.isComplexCharCode(code)) {
                 return true;
             }
             else if (code >= 0x10000) {
--- a/jdk/src/share/classes/sun/font/Type1Font.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/Type1Font.java	Wed Jul 05 17:01:52 2017 +0200
@@ -635,7 +635,7 @@
 
     protected synchronized FontScaler getScaler() {
         if (scaler == null) {
-            scaler = FontManager.getScaler(this, 0, false, fileSize);
+            scaler = FontScaler.getScaler(this, 0, false, fileSize);
         }
 
         return scaler;
@@ -652,7 +652,7 @@
         try {
             return getScaler().getNumGlyphs();
         } catch (FontScalerException e) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getNumGlyphs();
         }
     }
@@ -661,7 +661,7 @@
         try {
             return getScaler().getMissingGlyphCode();
         } catch (FontScalerException e) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getMissingGlyphCode();
         }
     }
@@ -670,7 +670,7 @@
         try {
             return getScaler().getGlyphCode(charCode);
         } catch (FontScalerException e) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getGlyphCode(charCode);
         }
     }
@@ -679,5 +679,4 @@
         return "** Type1 Font: Family="+familyName+ " Name="+fullName+
             " style="+style+" fileName="+platName;
     }
-
 }
--- a/jdk/src/share/classes/sun/font/Type1GlyphMapper.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/font/Type1GlyphMapper.java	Wed Jul 05 17:01:52 2017 +0200
@@ -46,7 +46,7 @@
         try {
           missingGlyph = scaler.getMissingGlyphCode();
         } catch (FontScalerException fe) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             try {
                 missingGlyph = scaler.getMissingGlyphCode();
             } catch (FontScalerException e) { //should not happen
@@ -59,7 +59,7 @@
         try {
             return scaler.getNumGlyphs();
         } catch (FontScalerException e) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return getNumGlyphs();
         }
     }
@@ -72,7 +72,7 @@
         try {
             return scaler.getGlyphCode(ch) != missingGlyph;
         } catch(FontScalerException e) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return canDisplay(ch);
         }
     }
@@ -81,7 +81,7 @@
         try {
             return scaler.getGlyphCode(ch);
         } catch (FontScalerException e) {
-            scaler = FontManager.getNullScaler();
+            scaler = FontScaler.getNullScaler();
             return charToGlyph(ch);
         }
     }
@@ -93,7 +93,7 @@
             try {
                 return scaler.getGlyphCode((char)ch);
             } catch (FontScalerException e) {
-                scaler = FontManager.getNullScaler();
+                scaler = FontScaler.getNullScaler();
                 return charToGlyph(ch);
             }
         }
@@ -160,10 +160,10 @@
 
             glyphs[i] = charToGlyph(code);
 
-            if (code < FontManager.MIN_LAYOUT_CHARCODE) {
+            if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
                 continue;
             }
-            else if (FontManager.isComplexCharCode(code)) {
+            else if (FontUtilities.isComplexCharCode(code)) {
                 return true;
             }
             else if (code >= 0x10000) {
--- a/jdk/src/share/classes/sun/java2d/SunGraphics2D.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/java2d/SunGraphics2D.java	Wed Jul 05 17:01:52 2017 +0200
@@ -66,6 +66,7 @@
 import java.awt.font.GlyphVector;
 import java.awt.font.TextLayout;
 import sun.font.FontDesignMetrics;
+import sun.font.FontUtilities;
 import sun.java2d.pipe.PixelDrawPipe;
 import sun.java2d.pipe.PixelFillPipe;
 import sun.java2d.pipe.ShapeDrawPipe;
@@ -592,7 +593,7 @@
             }
         }
 
-        info.font2D = FontManager.getFont2D(font);
+        info.font2D = FontUtilities.getFont2D(font);
 
         int fmhint = fractionalMetricsHint;
         if (fmhint == SunHints.INTVAL_FRACTIONALMETRICS_DEFAULT) {
@@ -741,7 +742,8 @@
                  font.isTransformed() ||
                  fontInfo == null || // Precaution, if true shouldn't get here
                  (fontInfo.aaHint == SunHints.INTVAL_TEXT_ANTIALIAS_ON) !=
-                 FontManager.getFont2D(font).useAAForPtSize(font.getSize()))) {
+                     FontUtilities.getFont2D(font).
+                         useAAForPtSize(font.getSize()))) {
                 textpipe = invalidpipe;
             }
             this.font = font;
--- a/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java	Wed Jul 05 17:01:52 2017 +0200
@@ -55,8 +55,6 @@
 import java.util.TreeMap;
 import java.util.Vector;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import sun.awt.AppContext;
 import sun.awt.DisplayChangedListener;
 import sun.awt.FontConfiguration;
@@ -64,6 +62,8 @@
 import sun.font.CompositeFontDescriptor;
 import sun.font.Font2D;
 import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontManagerForSGE;
 import sun.font.NativeFont;
 
 /**
@@ -73,102 +73,16 @@
  * @see GraphicsDevice
  * @see GraphicsConfiguration
  */
-
 public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
-    implements FontSupport, DisplayChangedListener {
-
-    public static boolean isLinux;
-    public static boolean isSolaris;
-    public static boolean isOpenSolaris;
-    public static boolean isWindows;
-    public static boolean noType1Font;
-    private static Font defaultFont;
-    private static String defaultFontFileName;
-    private static String defaultFontName;
-    public static final String lucidaFontName = "Lucida Sans Regular";
-    public static final String lucidaFileName = "LucidaSansRegular.ttf";
-    public static boolean debugFonts = false;
-    protected static Logger logger = null;
-    private static ArrayList badFonts;
-    public static String jreLibDirName;
-    public static String jreFontDirName;
-    private static HashSet<String> missingFontFiles = null;
-
-    private FontConfiguration fontConfig;
-
-    /* fontPath is the location of all fonts on the system, excluding the
-     * JRE's own font directory but including any path specified using the
-     * sun.java2d.fontpath property. Together with that property,  it is
-     * initialised by the getPlatformFontPath() method
-     * This call must be followed by a call to registerFontDirs(fontPath)
-     * once any extra debugging path has been appended.
-     */
-    protected String fontPath;
-
-    /* discoveredAllFonts is set to true when all fonts on the font path are
-     * discovered. This usually also implies opening, validating and
-     * registering, but an implementation may be optimized to avold this.
-     * So see also "loadedAllFontFiles"
-     */
-    private boolean discoveredAllFonts = false;
+    implements DisplayChangedListener {
 
-    /* loadedAllFontFiles is set to true when all fonts on the font path are
-     * actually opened, validated and registered. This always implies
-     * discoveredAllFonts is true.
-     */
-    private boolean loadedAllFontFiles = false;
-
-    protected HashSet registeredFontFiles = new HashSet();
-    public static String eudcFontFileName; /* Initialised only on windows */
-
-    private static boolean isOpenJDK;
-    /**
-     * A few things in Java 2D code are different in OpenJDK,
-     * so need a way to tell which implementation this is.
-     * The absence of Lucida Sans Regular is the simplest way for now.
-     */
-    public static boolean isOpenJDK() {
-        return isOpenJDK;
-    }
-
-    static {
-        java.security.AccessController.doPrivileged(
-                                    new java.security.PrivilegedAction() {
-            public Object run() {
-
-                jreLibDirName = System.getProperty("java.home","") +
-                    File.separator + "lib";
-                jreFontDirName = jreLibDirName + File.separator + "fonts";
-                File lucidaFile =
-                    new File(jreFontDirName + File.separator + lucidaFileName);
-                isOpenJDK = !lucidaFile.exists();
-
-                String debugLevel =
-                    System.getProperty("sun.java2d.debugfonts");
-
-                if (debugLevel != null && !debugLevel.equals("false")) {
-                    debugFonts = true;
-                    logger = Logger.getLogger("sun.java2d");
-                    if (debugLevel.equals("warning")) {
-                        logger.setLevel(Level.WARNING);
-                    } else if (debugLevel.equals("severe")) {
-                        logger.setLevel(Level.SEVERE);
-                    }
-                }
-                return null;
-            }
-        });
-    };
+    public static boolean isOpenSolaris;
+    private static Font defaultFont;
 
     public SunGraphicsEnvironment() {
         java.security.AccessController.doPrivileged(
                                     new java.security.PrivilegedAction() {
             public Object run() {
-                String osName = System.getProperty("os.name");
-                if ("Linux".equals(osName)) {
-                    isLinux = true;
-                } else if ("SunOS".equals(osName)) {
-                    isSolaris = true;
                     String version = System.getProperty("os.version", "0.0");
                     try {
                         float ver = Float.parseFloat(version);
@@ -186,188 +100,6 @@
                         }
                     } catch (Exception e) {
                     }
-                } else if ("Windows".equals(osName)) {
-                    isWindows = true;
-                }
-
-                noType1Font = "true".
-                    equals(System.getProperty("sun.java2d.noType1Font"));
-
-                if (!isOpenJDK()) {
-                    defaultFontName = lucidaFontName;
-                    if (useAbsoluteFontFileNames()) {
-                        defaultFontFileName =
-                            jreFontDirName + File.separator + lucidaFileName;
-                    } else {
-                        defaultFontFileName = lucidaFileName;
-                    }
-                }
-
-                File badFontFile =
-                    new File(jreFontDirName + File.separator + "badfonts.txt");
-                if (badFontFile.exists()) {
-                    FileInputStream fis = null;
-                    try {
-                        badFonts = new ArrayList();
-                        fis = new FileInputStream(badFontFile);
-                        InputStreamReader isr = new InputStreamReader(fis);
-                        BufferedReader br = new BufferedReader(isr);
-                        while (true) {
-                            String name = br.readLine();
-                            if (name == null) {
-                                break;
-                            } else {
-                                if (debugFonts) {
-                                    logger.warning("read bad font: " + name);
-                                }
-                                badFonts.add(name);
-                            }
-                        }
-                    } catch (IOException e) {
-                        try {
-                            if (fis != null) {
-                                fis.close();
-                            }
-                        } catch (IOException ioe) {
-                        }
-                    }
-                }
-
-                /* Here we get the fonts in jre/lib/fonts and register them
-                 * so they are always available and preferred over other fonts.
-                 * This needs to be registered before the composite fonts as
-                 * otherwise some native font that corresponds may be found
-                 * as we don't have a way to handle two fonts of the same
-                 * name, so the JRE one must be the first one registered.
-                 * Pass "true" to registerFonts method as on-screen these
-                 * JRE fonts always go through the T2K rasteriser.
-                 */
-                if (isLinux) {
-                    /* Linux font configuration uses these fonts */
-                    registerFontDir(jreFontDirName);
-                }
-                registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK,
-                                   true, false);
-
-                /* Register the JRE fonts so that the native platform can
-                 * access them. This is used only on Windows so that when
-                 * printing the printer driver can access the fonts.
-                 */
-                registerJREFontsWithPlatform(jreFontDirName);
-
-                /* Create the font configuration and get any font path
-                 * that might be specified.
-                 */
-                fontConfig = createFontConfiguration();
-                if (isOpenJDK()) {
-                    String[] fontInfo = FontManager.getDefaultPlatformFont();
-                    defaultFontName = fontInfo[0];
-                    defaultFontFileName = fontInfo[1];
-                }
-                getPlatformFontPathFromFontConfig();
-
-                String extraFontPath = fontConfig.getExtraFontPath();
-
-                /* In prior releases the debugging font path replaced
-                 * all normally located font directories except for the
-                 * JRE fonts dir. This directory is still always located and
-                 * placed at the head of the path but as an augmentation
-                 * to the previous behaviour the
-                 * changes below allow you to additionally append to
-                 * the font path by starting with append: or prepend by
-                 * starting with a prepend: sign. Eg: to append
-                 * -Dsun.java2d.fontpath=append:/usr/local/myfonts
-                 * and to prepend
-                 * -Dsun.java2d.fontpath=prepend:/usr/local/myfonts Disp
-                 *
-                 * If there is an appendedfontpath it in the font configuration
-                 * it is used instead of searching the system for dirs.
-                 * The behaviour of append and prepend is then similar
-                 * to the normal case. ie it goes after what
-                 * you prepend and * before what you append. If the
-                 * sun.java2d.fontpath property is used, but it
-                 * neither the append or prepend syntaxes is used then as
-                 * except for the JRE dir the path is replaced and it is
-                 * up to you to make sure that all the right directories
-                 * are located. This is platform and locale-specific so
-                 * its almost impossible to get right, so it should be
-                 * used with caution.
-                 */
-                boolean prependToPath = false;
-                boolean appendToPath = false;
-                String dbgFontPath = System.getProperty("sun.java2d.fontpath");
-
-                if (dbgFontPath != null) {
-                    if (dbgFontPath.startsWith("prepend:")) {
-                        prependToPath = true;
-                        dbgFontPath =
-                            dbgFontPath.substring("prepend:".length());
-                    } else if (dbgFontPath.startsWith("append:")) {
-                        appendToPath = true;
-                        dbgFontPath =
-                            dbgFontPath.substring("append:".length());
-                    }
-                }
-
-                if (debugFonts) {
-                    logger.info("JRE font directory: " + jreFontDirName);
-                    logger.info("Extra font path: " + extraFontPath);
-                    logger.info("Debug font path: " + dbgFontPath);
-                }
-
-                if (dbgFontPath != null) {
-                    /* In debugging mode we register all the paths
-                     * Caution: this is a very expensive call on Solaris:-
-                     */
-                    fontPath = getPlatformFontPath(noType1Font);
-
-                    if (extraFontPath != null) {
-                        fontPath =
-                            extraFontPath + File.pathSeparator + fontPath;
-                    }
-                    if (appendToPath) {
-                        fontPath = fontPath + File.pathSeparator + dbgFontPath;
-                    } else if (prependToPath) {
-                        fontPath = dbgFontPath + File.pathSeparator + fontPath;
-                    } else {
-                        fontPath = dbgFontPath;
-                    }
-                    registerFontDirs(fontPath);
-                } else if (extraFontPath != null) {
-                    /* If the font configuration contains an "appendedfontpath"
-                     * entry, it is interpreted as a set of locations that
-                     * should always be registered.
-                     * It may be additional to locations normally found for
-                     * that place, or it may be locations that need to have
-                     * all their paths registered to locate all the needed
-                     * platform names.
-                     * This is typically when the same .TTF file is referenced
-                     * from multiple font.dir files and all of these must be
-                     * read to find all the native (XLFD) names for the font,
-                     * so that X11 font APIs can be used for as many code
-                     * points as possible.
-                     */
-                    registerFontDirs(extraFontPath);
-                }
-
-                /* On Solaris, we need to register the Japanese TrueType
-                 * directory so that we can find the corresponding bitmap
-                 * fonts. This could be done by listing the directory in
-                 * the font configuration file, but we don't want to
-                 * confuse users with this quirk. There are no bitmap fonts
-                 * for other writing systems that correspond to TrueType
-                 * fonts and have matching XLFDs. We need to register the
-                 * bitmap fonts only in environments where they're on the
-                 * X font path, i.e., in the Japanese locale.
-                 * Note that if the X Toolkit is in use the font path isn't
-                 * set up by JDK, but users of a JA locale should have it
-                 * set up already by their login environment.
-                 */
-                if (isSolaris && Locale.JAPAN.equals(Locale.getDefault())) {
-                    registerFontDir("/usr/openwin/lib/locale/ja/X11/fonts/TT");
-                }
-
-                initCompositeFonts(fontConfig, null);
 
                 /* Establish the default font to be used by SG2D etc */
                 defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@@ -395,7 +127,22 @@
         return ret;
     }
 
+    /**
+     * Returns the number of screen devices of this graphics environment.
+     *
+     * @return the number of screen devices of this graphics environment
+     */
     protected abstract int getNumScreens();
+
+    /**
+     * Create and return the screen device with the specified number. The
+     * device with number <code>0</code> will be the default device (returned
+     * by {@link #getDefaultScreenDevice()}.
+     *
+     * @param screennum the number of the screen to create
+     *
+     * @return the created screen device
+     */
     protected abstract GraphicsDevice makeScreenDevice(int screennum);
 
     /**
@@ -418,220 +165,17 @@
         return new SunGraphics2D(sd, Color.white, Color.black, defaultFont);
     }
 
-    /* A call to this method should be followed by a call to
-     * registerFontDirs(..)
-     */
-    protected String getPlatformFontPath(boolean noType1Font) {
-        if (fontPath == null) {
-            fontPath = FontManager.getFontPath(noType1Font);
-        }
-        return fontPath;
-    }
-
-    private String[] platformFontDirs;
-    /**
-     * Get all directories which contain installed fonts.
-     */
-    public String[] getPlatformFontDirs() {
-        if (platformFontDirs == null) {
-            String path = getPlatformFontPath(noType1Font);
-            StringTokenizer parser =
-                new StringTokenizer(path, File.pathSeparator);;
-            ArrayList<String> pathList = new ArrayList<String>();
-            try {
-                while (parser.hasMoreTokens()) {
-                    pathList.add(parser.nextToken());
-                }
-            } catch (NoSuchElementException e) {
-            }
-            platformFontDirs = pathList.toArray(new String[0]);
-        }
-        return platformFontDirs;
-    }
-
-    /**
-     * Whether registerFontFile expects absolute or relative
-     * font file names.
-     */
-    protected boolean useAbsoluteFontFileNames() {
-        return true;
-    }
-
-    /**
-     * Returns file name for default font, either absolute
-     * or relative as needed by registerFontFile.
-     */
-    public String getDefaultFontFile() {
-        return defaultFontFileName;
-    }
-
-    /**
-     * Returns face name for default font, or null if
-     * no face names are used for CompositeFontDescriptors
-     * for this platform.
-     */
-    public String getDefaultFontFaceName() {
-        return defaultFontName;
-    }
-
-    public void loadFonts() {
-        if (discoveredAllFonts) {
-            return;
-        }
-        /* Use lock specific to the font system */
-        synchronized (lucidaFontName) {
-            if (debugFonts) {
-                Thread.dumpStack();
-                logger.info("SunGraphicsEnvironment.loadFonts() called");
-            }
-            FontManager.initialiseDeferredFonts();
-
-            java.security.AccessController.doPrivileged(
-                                    new java.security.PrivilegedAction() {
-                public Object run() {
-                    if (fontPath == null) {
-                        fontPath = getPlatformFontPath(noType1Font);
-                        registerFontDirs(fontPath);
-                    }
-                    if (fontPath != null) {
-                        // this will find all fonts including those already
-                        // registered. But we have checks in place to prevent
-                        // double registration.
-                        if (!FontManager.gotFontsFromPlatform()) {
-                            registerFontsOnPath(fontPath, false,
-                                                Font2D.UNKNOWN_RANK,
-                                                false, true);
-                            loadedAllFontFiles = true;
-                        }
-                    }
-                    FontManager.registerOtherFontFiles(registeredFontFiles);
-                    discoveredAllFonts = true;
-                    return null;
-                }
-            });
-        }
+    private static FontManagerForSGE getFontManagerForSGE() {
+        FontManager fm = FontManagerFactory.getInstance();
+        return (FontManagerForSGE) fm;
     }
-
-
-    public void loadFontFiles() {
-        loadFonts();
-        if (loadedAllFontFiles) {
-            return;
-        }
-        /* Use lock specific to the font system */
-        synchronized (lucidaFontName) {
-            if (debugFonts) {
-                Thread.dumpStack();
-                logger.info("loadAllFontFiles() called");
-            }
-            java.security.AccessController.doPrivileged(
-                                    new java.security.PrivilegedAction() {
-                public Object run() {
-                    if (fontPath == null) {
-                        fontPath = getPlatformFontPath(noType1Font);
-                    }
-                    if (fontPath != null) {
-                        // this will find all fonts including those already
-                        // registered. But we have checks in place to prevent
-                        // double registration.
-                        registerFontsOnPath(fontPath, false,
-                                            Font2D.UNKNOWN_RANK,
-                                            false, true);
-                    }
-                    loadedAllFontFiles = true;
-                    return null;
-                }
-            });
-        }
-    }
-
-    /*
-     * This is for use only within getAllFonts().
-     * Fonts listed in the fontconfig files for windows were all
-     * on the "deferred" initialisation list. They were registered
-     * either in the course of the application, or in the call to
-     * loadFonts() within getAllFonts(). The fontconfig file specifies
-     * the names of the fonts using the English names. If there's a
-     * different name in the execution locale, then the platform will
-     * report that, and we will construct the font with both names, and
-     * thereby enumerate it twice. This happens for Japanese fonts listed
-     * in the windows fontconfig, when run in the JA locale. The solution
-     * is to rely (in this case) on the platform's font->file mapping to
-     * determine that this name corresponds to a file we already registered.
-     * This works because
-     * - we know when we get here all deferred fonts are already initialised
-     * - when we register a font file, we register all fonts in it.
-     * - we know the fontconfig fonts are all in the windows registry
-     */
-    private boolean isNameForRegisteredFile(String fontName) {
-        String fileName = FontManager.getFileNameForFontName(fontName);
-        if (fileName == null) {
-            return false;
-        }
-        return registeredFontFiles.contains(fileName);
-    }
-
-    private Font[] allFonts;
-
-    /**
-     * Returns all fonts installed in this environment.
-     */
-    public Font[] getAllInstalledFonts() {
-        if (allFonts == null) {
-            loadFonts();
-            TreeMap fontMapNames = new TreeMap();
-            /* warning: the number of composite fonts could change dynamically
-             * if applications are allowed to create them. "allfonts" could
-             * then be stale.
-             */
-
-            Font2D[] allfonts = FontManager.getRegisteredFonts();
-            for (int i=0; i < allfonts.length; i++) {
-                if (!(allfonts[i] instanceof NativeFont)) {
-                    fontMapNames.put(allfonts[i].getFontName(null),
-                                     allfonts[i]);
-                }
-            }
-
-            String[] platformNames =  FontManager.getFontNamesFromPlatform();
-            if (platformNames != null) {
-                for (int i=0; i<platformNames.length; i++) {
-                    if (!isNameForRegisteredFile(platformNames[i])) {
-                        fontMapNames.put(platformNames[i], null);
-                    }
-                }
-            }
-
-            String[] fontNames = null;
-            if (fontMapNames.size() > 0) {
-                fontNames = new String[fontMapNames.size()];
-                Object [] keyNames = fontMapNames.keySet().toArray();
-                for (int i=0; i < keyNames.length; i++) {
-                    fontNames[i] = (String)keyNames[i];
-                }
-            }
-            Font[] fonts = new Font[fontNames.length];
-            for (int i=0; i < fontNames.length; i++) {
-                fonts[i] = new Font(fontNames[i], Font.PLAIN, 1);
-                Font2D f2d = (Font2D)fontMapNames.get(fontNames[i]);
-                if (f2d  != null) {
-                    FontManager.setFont2D(fonts[i], f2d.handle);
-                }
-            }
-            allFonts = fonts;
-        }
-
-        Font []copyFonts = new Font[allFonts.length];
-        System.arraycopy(allFonts, 0, copyFonts, 0, allFonts.length);
-        return copyFonts;
-    }
-
      /**
      * Returns all fonts available in this environment.
      */
     public Font[] getAllFonts() {
-        Font[] installedFonts = getAllInstalledFonts();
-        Font[] created = FontManager.getCreatedFonts();
+        FontManagerForSGE fm = getFontManagerForSGE();
+        Font[] installedFonts = fm.getAllInstalledFonts();
+        Font[] created = fm.getCreatedFonts();
         if (created == null || created.length == 0) {
             return installedFonts;
         } else {
@@ -643,126 +187,9 @@
         }
     }
 
-    /**
-     * Default locale can be changed but we need to know the initial locale
-     * as that is what is used by native code. Changing Java default locale
-     * doesn't affect that.
-     * Returns the locale in use when using native code to communicate
-     * with platform APIs. On windows this is known as the "system" locale,
-     * and it is usually the same as the platform locale, but not always,
-     * so this method also checks an implementation property used only
-     * on windows and uses that if set.
-     */
-    private static Locale systemLocale = null;
-    public static Locale getSystemStartupLocale() {
-        if (systemLocale == null) {
-            systemLocale = (Locale)
-                java.security.AccessController.doPrivileged(
-                                    new java.security.PrivilegedAction() {
-            public Object run() {
-                /* On windows the system locale may be different than the
-                 * user locale. This is an unsupported configuration, but
-                 * in that case we want to return a dummy locale that will
-                 * never cause a match in the usage of this API. This is
-                 * important because Windows documents that the family
-                 * names of fonts are enumerated using the language of
-                 * the system locale. BY returning a dummy locale in that
-                 * case we do not use the platform API which would not
-                 * return us the names we want.
-                 */
-                String fileEncoding = System.getProperty("file.encoding", "");
-                String sysEncoding = System.getProperty("sun.jnu.encoding");
-                if (sysEncoding != null && !sysEncoding.equals(fileEncoding)) {
-                    return Locale.ROOT;
-                }
-
-                String language = System.getProperty("user.language", "en");
-                String country  = System.getProperty("user.country","");
-                String variant  = System.getProperty("user.variant","");
-                return new Locale(language, country, variant);
-            }
-        });
-        }
-        return systemLocale;
-    }
-
-    /* Really we need only the JRE fonts family names, but there's little
-     * overhead in doing this the easy way by adding all the currently
-     * known fonts.
-     */
-    protected void getJREFontFamilyNames(TreeMap<String,String> familyNames,
-                                         Locale requestedLocale) {
-        FontManager.registerDeferredJREFonts(jreFontDirName);
-        Font2D[] physicalfonts = FontManager.getPhysicalFonts();
-        for (int i=0; i < physicalfonts.length; i++) {
-            if (!(physicalfonts[i] instanceof NativeFont)) {
-                String name =
-                    physicalfonts[i].getFamilyName(requestedLocale);
-                familyNames.put(name.toLowerCase(requestedLocale), name);
-            }
-        }
-    }
-
-    private String[] allFamilies; // cache for default locale only
-    private Locale lastDefaultLocale;
-
-    public String[] getInstalledFontFamilyNames(Locale requestedLocale) {
-        if (requestedLocale == null) {
-            requestedLocale = Locale.getDefault();
-        }
-        if (allFamilies != null && lastDefaultLocale != null &&
-            requestedLocale.equals(lastDefaultLocale)) {
-                String[] copyFamilies = new String[allFamilies.length];
-                System.arraycopy(allFamilies, 0, copyFamilies,
-                                 0, allFamilies.length);
-                return copyFamilies;
-        }
-
-        TreeMap<String,String> familyNames = new TreeMap<String,String>();
-        //  these names are always there and aren't localised
-        String str;
-        str = Font.SERIF;         familyNames.put(str.toLowerCase(), str);
-        str = Font.SANS_SERIF;    familyNames.put(str.toLowerCase(), str);
-        str = Font.MONOSPACED;    familyNames.put(str.toLowerCase(), str);
-        str = Font.DIALOG;        familyNames.put(str.toLowerCase(), str);
-        str = Font.DIALOG_INPUT;  familyNames.put(str.toLowerCase(), str);
-
-        /* Platform APIs may be used to get the set of available family
-         * names for the current default locale so long as it is the same
-         * as the start-up system locale, rather than loading all fonts.
-         */
-        if (requestedLocale.equals(getSystemStartupLocale()) &&
-            FontManager.getFamilyNamesFromPlatform(familyNames,
-                                                    requestedLocale)) {
-            /* Augment platform names with JRE font family names */
-            getJREFontFamilyNames(familyNames, requestedLocale);
-        } else {
-            loadFontFiles();
-            Font2D[] physicalfonts = FontManager.getPhysicalFonts();
-            for (int i=0; i < physicalfonts.length; i++) {
-                if (!(physicalfonts[i] instanceof NativeFont)) {
-                    String name =
-                        physicalfonts[i].getFamilyName(requestedLocale);
-                    familyNames.put(name.toLowerCase(requestedLocale), name);
-                }
-            }
-        }
-
-        String[] retval =  new String[familyNames.size()];
-        Object [] keyNames = familyNames.keySet().toArray();
-        for (int i=0; i < keyNames.length; i++) {
-            retval[i] = (String)familyNames.get(keyNames[i]);
-        }
-        if (requestedLocale.equals(Locale.getDefault())) {
-            lastDefaultLocale = requestedLocale;
-            allFamilies = new String[retval.length];
-            System.arraycopy(retval, 0, allFamilies, 0, allFamilies.length);
-        }
-        return retval;
-    }
-
     public String[] getAvailableFontFamilyNames(Locale requestedLocale) {
-        String[] installed = getInstalledFontFamilyNames(requestedLocale);
+        FontManagerForSGE fm = getFontManagerForSGE();
+        String[] installed = fm.getInstalledFontFamilyNames(requestedLocale);
         /* Use a new TreeMap as used in getInstalledFontFamilyNames
          * and insert all the keys in lower case, so that the sort order
          * is the same as the installed families. This preserves historical
@@ -771,7 +198,7 @@
          * the tree map and just insert new entries, but not so much as
          * to justify the extra internal interface.
          */
-        TreeMap<String, String> map = FontManager.getCreatedFontFamilyNames();
+        TreeMap<String, String> map = fm.getCreatedFontFamilyNames();
         if (map == null || map.size() == 0) {
             return installed;
         } else {
@@ -793,405 +220,6 @@
     }
 
     /**
-     * Returns a file name for the physical font represented by this platform
-     * font name. The default implementation tries to obtain the file name
-     * from the font configuration.
-     * Subclasses may override to provide information from other sources.
-     */
-    protected String getFileNameFromPlatformName(String platformFontName) {
-        return fontConfig.getFileNameFromPlatformName(platformFontName);
-    }
-
-    public static class TTFilter implements FilenameFilter {
-        public boolean accept(File dir,String name) {
-            /* all conveniently have the same suffix length */
-            int offset = name.length()-4;
-            if (offset <= 0) { /* must be at least A.ttf */
-                return false;
-            } else {
-                return(name.startsWith(".ttf", offset) ||
-                       name.startsWith(".TTF", offset) ||
-                       name.startsWith(".ttc", offset) ||
-                       name.startsWith(".TTC", offset) ||
-                       name.startsWith(".otf", offset) ||
-                       name.startsWith(".OTF", offset));
-            }
-        }
-    }
-
-    public static class T1Filter implements FilenameFilter {
-        public boolean accept(File dir,String name) {
-            if (noType1Font) {
-                return false;
-            }
-            /* all conveniently have the same suffix length */
-            int offset = name.length()-4;
-            if (offset <= 0) { /* must be at least A.pfa */
-                return false;
-            } else {
-                return(name.startsWith(".pfa", offset) ||
-                       name.startsWith(".pfb", offset) ||
-                       name.startsWith(".PFA", offset) ||
-                       name.startsWith(".PFB", offset));
-            }
-        }
-    }
-
-    public static class TTorT1Filter implements FilenameFilter {
-         public boolean accept(File dir, String name) {
-             return SunGraphicsEnvironment.ttFilter.accept(dir, name) ||
-                 SunGraphicsEnvironment.t1Filter.accept(dir, name);
-         }
-    }
-
-    /* No need to keep consing up new instances - reuse a singleton.
-     * The trade-off is that these objects don't get GC'd.
-     */
-    public static final TTFilter ttFilter = new TTFilter();
-    public static final T1Filter t1Filter = new T1Filter();
-
-    /* The majority of the register functions in this class are
-     * registering platform fonts in the JRE's font maps.
-     * The next one is opposite in function as it registers the JRE
-     * fonts as platform fonts. If subsequent to calling this
-     * your implementation enumerates platform fonts in a way that
-     * would return these fonts too you may get duplicates.
-     * This function is primarily used to install the JRE fonts
-     * so that the native platform can access them.
-     * It is intended to be overridden by platform subclasses
-     * Currently minimal use is made of this as generally
-     * Java 2D doesn't need the platform to be able to
-     * use its fonts and platforms which already have matching
-     * fonts registered (possibly even from other different JRE
-     * versions) generally can't be guaranteed to use the
-     * one registered by this JRE version in response to
-     * requests from this JRE.
-     */
-    protected void registerJREFontsWithPlatform(String pathName) {
-        return;
-    }
-
-    /* Called from FontManager - has Solaris specific implementation */
-    public void register1dot0Fonts() {
-        java.security.AccessController.doPrivileged(
-                            new java.security.PrivilegedAction() {
-            public Object run() {
-                String type1Dir = "/usr/openwin/lib/X11/fonts/Type1";
-                registerFontsInDir(type1Dir, true, Font2D.TYPE1_RANK,
-                                   false, false);
-                return null;
-            }
-        });
-    }
-
-    protected void registerFontDirs(String pathName) {
-        return;
-    }
-
-    /* Called to register fall back fonts */
-    public void registerFontsInDir(String dirName) {
-        registerFontsInDir(dirName, true, Font2D.JRE_RANK, true, false);
-    }
-
-    private void registerFontsInDir(String dirName, boolean useJavaRasterizer,
-                                    int fontRank,
-                                    boolean defer, boolean resolveSymLinks) {
-        File pathFile = new File(dirName);
-        addDirFonts(dirName, pathFile, ttFilter,
-                    FontManager.FONTFORMAT_TRUETYPE, useJavaRasterizer,
-                    fontRank==Font2D.UNKNOWN_RANK ?
-                    Font2D.TTF_RANK : fontRank,
-                    defer, resolveSymLinks);
-        addDirFonts(dirName, pathFile, t1Filter,
-                    FontManager.FONTFORMAT_TYPE1, useJavaRasterizer,
-                    fontRank==Font2D.UNKNOWN_RANK ?
-                    Font2D.TYPE1_RANK : fontRank,
-                    defer, resolveSymLinks);
-    }
-
-    private void registerFontsOnPath(String pathName,
-                                     boolean useJavaRasterizer, int fontRank,
-                                     boolean defer, boolean resolveSymLinks) {
-
-        StringTokenizer parser = new StringTokenizer(pathName,
-                                                     File.pathSeparator);
-        try {
-            while (parser.hasMoreTokens()) {
-                registerFontsInDir(parser.nextToken(),
-                                   useJavaRasterizer, fontRank,
-                                   defer, resolveSymLinks);
-            }
-        } catch (NoSuchElementException e) {
-        }
-    }
-
-    protected void registerFontFile(String fontFileName, String[] nativeNames,
-                                    int fontRank, boolean defer) {
-        // REMIND: case compare depends on platform
-        if (registeredFontFiles.contains(fontFileName)) {
-            return;
-        }
-        int fontFormat;
-        if (ttFilter.accept(null, fontFileName)) {
-            fontFormat = FontManager.FONTFORMAT_TRUETYPE;
-        } else if (t1Filter.accept(null, fontFileName)) {
-            fontFormat = FontManager.FONTFORMAT_TYPE1;
-        } else {
-            fontFormat = FontManager.FONTFORMAT_NATIVE;
-        }
-        registeredFontFiles.add(fontFileName);
-        if (defer) {
-            FontManager.registerDeferredFont(fontFileName,
-                                             fontFileName, nativeNames,
-                                             fontFormat, false, fontRank);
-        } else {
-            FontManager.registerFontFile(fontFileName, nativeNames,
-                                         fontFormat, false, fontRank);
-        }
-    }
-
-    protected void registerFontDir(String path) {
-    }
-
-    protected String[] getNativeNames(String fontFileName,
-                                      String platformName) {
-        return null;
-    }
-
-    /*
-     * helper function for registerFonts
-     */
-    private void addDirFonts(String dirName, File dirFile,
-                             FilenameFilter filter,
-                             int fontFormat, boolean useJavaRasterizer,
-                             int fontRank,
-                             boolean defer, boolean resolveSymLinks) {
-        String[] ls = dirFile.list(filter);
-        if (ls == null || ls.length == 0) {
-            return;
-        }
-        String[] fontNames = new String[ls.length];
-        String[][] nativeNames = new String[ls.length][];
-        int fontCount = 0;
-
-        for (int i=0; i < ls.length; i++ ) {
-            File theFile = new File(dirFile, ls[i]);
-            String fullName = null;
-            if (resolveSymLinks) {
-                try {
-                    fullName = theFile.getCanonicalPath();
-                } catch (IOException e) {
-                }
-            }
-            if (fullName == null) {
-                fullName = dirName + File.separator + ls[i];
-            }
-
-            // REMIND: case compare depends on platform
-            if (registeredFontFiles.contains(fullName)) {
-                continue;
-            }
-
-            if (badFonts != null && badFonts.contains(fullName)) {
-                if (debugFonts) {
-                    logger.warning("skip bad font " + fullName);
-                }
-                continue; // skip this font file.
-            }
-
-            registeredFontFiles.add(fullName);
-
-            if (debugFonts && logger.isLoggable(Level.INFO)) {
-                String message = "Registering font " + fullName;
-                String[] natNames = getNativeNames(fullName, null);
-                if (natNames == null) {
-                    message += " with no native name";
-                } else {
-                    message += " with native name(s) " + natNames[0];
-                    for (int nn = 1; nn < natNames.length; nn++) {
-                        message += ", " + natNames[nn];
-                    }
-                }
-                logger.info(message);
-            }
-            fontNames[fontCount] = fullName;
-            nativeNames[fontCount++] = getNativeNames(fullName, null);
-        }
-        FontManager.registerFonts(fontNames, nativeNames, fontCount,
-                                  fontFormat, useJavaRasterizer, fontRank,
-                                  defer);
-        return;
-    }
-
-    /*
-     * A GE may verify whether a font file used in a fontconfiguration
-     * exists. If it doesn't then either we may substitute the default
-     * font, or perhaps elide it altogether from the composite font.
-     * This makes some sense on windows where the font file is only
-     * likely to be in one place. But on other OSes, eg Linux, the file
-     * can move around depending. So there we probably don't want to assume
-     * its missing and so won't add it to this list.
-     * If this list - missingFontFiles - is non-null then the composite
-     * font initialisation logic tests to see if a font file is in that
-     * set.
-     * Only one thread should be able to add to this set so we don't
-     * synchronize.
-     */
-    protected void addToMissingFontFileList(String fileName) {
-        if (missingFontFiles == null) {
-            missingFontFiles = new HashSet<String>();
-        }
-        missingFontFiles.add(fileName);
-    }
-
-    /**
-     * Creates this environment's FontConfiguration.
-     */
-    protected abstract FontConfiguration createFontConfiguration();
-
-    public abstract FontConfiguration
-        createFontConfiguration(boolean preferLocaleFonts,
-                                boolean preferPropFonts);
-
-    /*
-     * This method asks the font configuration API for all platform names
-     * used as components of composite/logical fonts and iterates over these
-     * looking up their corresponding file name and registers these fonts.
-     * It also ensures that the fonts are accessible via platform APIs.
-     * The composites themselves are then registered.
-     */
-    private void
-        initCompositeFonts(FontConfiguration fontConfig,
-                           ConcurrentHashMap<String, Font2D>  altNameCache) {
-
-        int numCoreFonts = fontConfig.getNumberCoreFonts();
-        String[] fcFonts = fontConfig.getPlatformFontNames();
-        for (int f=0; f<fcFonts.length; f++) {
-            String platformFontName = fcFonts[f];
-            String fontFileName =
-                getFileNameFromPlatformName(platformFontName);
-            String[] nativeNames = null;
-            if (fontFileName == null || fontFileName.equals(platformFontName)){
-                /* No file located, so register using the platform name,
-                 * i.e. as a native font.
-                 */
-                fontFileName = platformFontName;
-            } else {
-                if (f < numCoreFonts) {
-                    /* If platform APIs also need to access the font, add it
-                     * to a set to be registered with the platform too.
-                     * This may be used to add the parent directory to the X11
-                     * font path if its not already there. See the docs for the
-                     * subclass implementation.
-                     * This is now mainly for the benefit of X11-based AWT
-                     * But for historical reasons, 2D initialisation code
-                     * makes these calls.
-                     * If the fontconfiguration file is properly set up
-                     * so that all fonts are mapped to files and all their
-                     * appropriate directories are specified, then this
-                     * method will be low cost as it will return after
-                     * a test that finds a null lookup map.
-                     */
-                    addFontToPlatformFontPath(platformFontName);
-                }
-                nativeNames = getNativeNames(fontFileName, platformFontName);
-            }
-            /* Uncomment these two lines to "generate" the XLFD->filename
-             * mappings needed to speed start-up on Solaris.
-             * Augment this with the appendedpathname and the mappings
-             * for native (F3) fonts
-             */
-            //String platName = platformFontName.replaceAll(" ", "_");
-            //System.out.println("filename."+platName+"="+fontFileName);
-            registerFontFile(fontFileName, nativeNames,
-                             Font2D.FONT_CONFIG_RANK, true);
-
-
-        }
-        /* This registers accumulated paths from the calls to
-         * addFontToPlatformFontPath(..) and any specified by
-         * the font configuration. Rather than registering
-         * the fonts it puts them in a place and form suitable for
-         * the Toolkit to pick up and use if a toolkit is initialised,
-         * and if it uses X11 fonts.
-         */
-        registerPlatformFontsUsedByFontConfiguration();
-
-        CompositeFontDescriptor[] compositeFontInfo
-                = fontConfig.get2DCompositeFontInfo();
-        for (int i = 0; i < compositeFontInfo.length; i++) {
-            CompositeFontDescriptor descriptor = compositeFontInfo[i];
-            String[] componentFileNames = descriptor.getComponentFileNames();
-            String[] componentFaceNames = descriptor.getComponentFaceNames();
-
-            /* It would be better eventually to handle this in the
-             * FontConfiguration code which should also remove duplicate slots
-             */
-            if (missingFontFiles != null) {
-                for (int ii=0; ii<componentFileNames.length; ii++) {
-                    if (missingFontFiles.contains(componentFileNames[ii])) {
-                        componentFileNames[ii] = getDefaultFontFile();
-                        componentFaceNames[ii] = getDefaultFontFaceName();
-                    }
-                }
-            }
-
-            /* FontConfiguration needs to convey how many fonts it has added
-             * as fallback component fonts which should not affect metrics.
-             * The core component count will be the number of metrics slots.
-             * This does not preclude other mechanisms for adding
-             * fall back component fonts to the composite.
-             */
-            if (altNameCache != null) {
-                FontManager.registerCompositeFont(
-                    descriptor.getFaceName(),
-                    componentFileNames, componentFaceNames,
-                    descriptor.getCoreComponentCount(),
-                    descriptor.getExclusionRanges(),
-                    descriptor.getExclusionRangeLimits(),
-                    true,
-                    altNameCache);
-            } else {
-                FontManager.registerCompositeFont(
-                    descriptor.getFaceName(),
-                    componentFileNames, componentFaceNames,
-                    descriptor.getCoreComponentCount(),
-                    descriptor.getExclusionRanges(),
-                    descriptor.getExclusionRangeLimits(),
-                    true);
-            }
-            if (debugFonts) {
-                logger.info("registered " + descriptor.getFaceName());
-            }
-        }
-    }
-
-    /**
-     * Notifies graphics environment that the logical font configuration
-     * uses the given platform font name. The graphics environment may
-     * use this for platform specific initialization.
-     */
-    protected void addFontToPlatformFontPath(String platformFontName) {
-    }
-
-    protected void registerPlatformFontsUsedByFontConfiguration() {
-    }
-
-    /**
-     * Determines whether the given font is a logical font.
-     */
-    public static boolean isLogicalFont(Font f) {
-        return FontConfiguration.isLogicalFontFamilyName(f.getFamily());
-    }
-
-    /**
-     * Return the default font configuration.
-     */
-    public FontConfiguration getFontConfiguration() {
-        return fontConfig;
-    }
-
-    /**
      * Return the bounds of a GraphicsDevice, less its screen insets.
      * See also java.awt.GraphicsEnvironment.getUsableBounds();
      */
@@ -1209,45 +237,6 @@
     }
 
     /**
-     * This method is provided for internal and exclusive use by Swing.
-     * This method should no longer be called, instead directly call
-     * FontManager.fontSupportsDefaultEncoding(Font).
-     * This method will be removed once Swing is updated to no longer
-     * call it.
-     */
-    public static boolean fontSupportsDefaultEncoding(Font font) {
-        return FontManager.fontSupportsDefaultEncoding(font);
-    }
-
-    public static void useAlternateFontforJALocales() {
-        FontManager.useAlternateFontforJALocales();
-    }
-
-    /*
-     * This invocation is not in a privileged block because
-     * all privileged operations (reading files and properties)
-     * was conducted on the creation of the GE
-     */
-    public void
-        createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
-                             boolean preferLocale,
-                             boolean preferProportional) {
-
-        FontConfiguration fontConfig =
-            createFontConfiguration(preferLocale, preferProportional);
-        initCompositeFonts(fontConfig, altNameCache);
-    }
-
-    /* If (as we do on X11) need to set a platform font path,
-     * then the needed path may be specified by the platform
-     * specific FontConfiguration class & data file. Such platforms
-     * (ie X11) need to override this method to retrieve this information
-     * into suitable data structures.
-     */
-    protected void getPlatformFontPathFromFontConfig() {
-    }
-
-    /**
      * From the DisplayChangedListener interface; called
      * when the display mode has been changed.
      */
--- a/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java	Wed Jul 05 17:01:52 2017 +0200
@@ -171,9 +171,9 @@
         float lw;
         if (thin) {
             if (antialias) {
-                lw = 0.5f;
+                lw = userSpaceLineWidth(at, 0.5f);
             } else {
-                lw = 1.0f;
+                lw = userSpaceLineWidth(at, 1.0f);
             }
         } else {
             lw = bs.getLineWidth();
@@ -189,6 +189,72 @@
                  lsink);
     }
 
+    private float userSpaceLineWidth(AffineTransform at, float lw) {
+
+        double widthScale;
+
+        if ((at.getType() & (AffineTransform.TYPE_GENERAL_TRANSFORM |
+                            AffineTransform.TYPE_GENERAL_SCALE)) != 0) {
+            widthScale = Math.sqrt(at.getDeterminant());
+        } else {
+            /* First calculate the "maximum scale" of this transform. */
+            double A = at.getScaleX();       // m00
+            double C = at.getShearX();       // m01
+            double B = at.getShearY();       // m10
+            double D = at.getScaleY();       // m11
+
+            /*
+             * Given a 2 x 2 affine matrix [ A B ] such that
+             *                             [ C D ]
+             * v' = [x' y'] = [Ax + Cy, Bx + Dy], we want to
+             * find the maximum magnitude (norm) of the vector v'
+             * with the constraint (x^2 + y^2 = 1).
+             * The equation to maximize is
+             *     |v'| = sqrt((Ax+Cy)^2+(Bx+Dy)^2)
+             * or  |v'| = sqrt((AA+BB)x^2 + 2(AC+BD)xy + (CC+DD)y^2).
+             * Since sqrt is monotonic we can maximize |v'|^2
+             * instead and plug in the substitution y = sqrt(1 - x^2).
+             * Trigonometric equalities can then be used to get
+             * rid of most of the sqrt terms.
+             */
+
+            double EA = A*A + B*B;          // x^2 coefficient
+            double EB = 2*(A*C + B*D);      // xy coefficient
+            double EC = C*C + D*D;          // y^2 coefficient
+
+            /*
+             * There is a lot of calculus omitted here.
+             *
+             * Conceptually, in the interests of understanding the
+             * terms that the calculus produced we can consider
+             * that EA and EC end up providing the lengths along
+             * the major axes and the hypot term ends up being an
+             * adjustment for the additional length along the off-axis
+             * angle of rotated or sheared ellipses as well as an
+             * adjustment for the fact that the equation below
+             * averages the two major axis lengths.  (Notice that
+             * the hypot term contains a part which resolves to the
+             * difference of these two axis lengths in the absence
+             * of rotation.)
+             *
+             * In the calculus, the ratio of the EB and (EA-EC) terms
+             * ends up being the tangent of 2*theta where theta is
+             * the angle that the long axis of the ellipse makes
+             * with the horizontal axis.  Thus, this equation is
+             * calculating the length of the hypotenuse of a triangle
+             * along that axis.
+             */
+
+            double hypot = Math.sqrt(EB*EB + (EA-EC)*(EA-EC));
+            /* sqrt omitted, compare to squared limits below. */
+            double widthsquared = ((EA + EC + hypot)/2.0);
+
+            widthScale = Math.sqrt(widthsquared);
+        }
+
+        return (float) (lw / widthScale);
+    }
+
     void strokeTo(Shape src,
                   AffineTransform at,
                   float width,
--- a/jdk/src/share/classes/sun/jkernel/DownloadManager.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/jkernel/DownloadManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,6 +31,7 @@
 import java.util.jar.*;
 import java.util.zip.*;
 import sun.misc.Launcher;
+import sun.misc.BootClassLoaderHook;
 
 /**
  * Handles the downloading of additional JRE components.  The bootstrap class
@@ -39,7 +40,7 @@
  *
  *@author Ethan Nicholas
  */
-public class DownloadManager {
+public class DownloadManager extends BootClassLoaderHook {
     public static final String KERNEL_DOWNLOAD_URL_PROPERTY =
             "kernel.download.url";
     public static final String KERNEL_DOWNLOAD_ENABLED_PROPERTY =
@@ -1023,7 +1024,8 @@
 
     /**
      * Returns <code>true</code> if the current thread is in the process of
-     * downloading a bundle.  This is called by ClassLoader.loadLibrary(), so
+     * downloading a bundle.  This is called by DownloadManager.loadLibrary()
+     * that is called by System.loadLibrary(), so
      * that when we run into a library required by the download process itself,
      * we don't call back into DownloadManager in an attempt to download it
      * (which would lead to infinite recursion).
@@ -1614,6 +1616,77 @@
 
     static native int getCurrentProcessId();
 
+    private DownloadManager() {
+    }
+
+    // Invoked by jkernel VM after the VM is initialized
+    static void setBootClassLoaderHook() {
+        if (!isJREComplete()) {
+            sun.misc.BootClassLoaderHook.setHook(new DownloadManager());
+        }
+    }
+
+    // Implementation of the BootClassLoaderHook interface
+    public String loadBootstrapClass(String name) {
+        // Check for download before we look for it.  If
+        // DownloadManager ends up downloading it, it will add it to
+        // our search path before we proceed to the findClass().
+        return DownloadManager.getBootClassPathEntryForClass(name);
+    }
+
+    public boolean loadLibrary(String name) {
+       try {
+            if (!DownloadManager.isJREComplete() &&
+                    !DownloadManager.isCurrentThreadDownloading()) {
+                return DownloadManager.downloadFile("bin/" +
+                    System.mapLibraryName(name));
+                // it doesn't matter if the downloadFile call returns false --
+                // it probably just means that this is a user library, as
+                // opposed to a JRE library
+            }
+        } catch (IOException e) {
+            throw new UnsatisfiedLinkError("Error downloading library " +
+                                                name + ": " + e);
+        } catch (NoClassDefFoundError e) {
+            // This happens while Java itself is being compiled; DownloadManager
+            // isn't accessible when this code is first invoked.  It isn't an
+            // issue, as if we can't find DownloadManager, we can safely assume
+            // that additional code is not available for download.
+        }
+        return false;
+    }
+
+    public boolean prefetchFile(String name) {
+        try {
+            return sun.jkernel.DownloadManager.downloadFile(name);
+        } catch (IOException ioe) {
+            return false;
+        }
+    }
+
+    public String getBootstrapResource(String name) {
+        try {
+            // If this is a known JRE resource, ensure that its bundle is
+            // downloaded.  If it isn't known, we just ignore the download
+            // failure and check to see if we can find the resource anyway
+            // (which is possible if the boot class path has been modified).
+            return DownloadManager.getBootClassPathEntryForResource(name);
+        } catch (NoClassDefFoundError e) {
+            // This happens while Java itself is being compiled; DownloadManager
+            // isn't accessible when this code is first invoked.  It isn't an
+            // issue, as if we can't find DownloadManager, we can safely assume
+            // that additional code is not available for download.
+            return null;
+        }
+    }
+
+    public File[] getAdditionalBootstrapPaths() {
+        return DownloadManager.getAdditionalBootStrapPaths();
+    }
+
+    public boolean isCurrentThreadPrefetching() {
+        return DownloadManager.isCurrentThreadDownloading();
+    }
 
     public static void main(String[] arg) throws Exception {
         AccessController.checkPermission(new AllPermission());
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/misc/BootClassLoaderHook.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * BootClassLoaderHook defines an interface for a hook to inject
+ * into the bootstrap class loader.
+ *
+ * In jkernel build, the sun.jkernel.DownloadManager is set as
+ * a BootClassLoaderHook by the jkernel VM after the VM is initialized.
+ *
+ * In other JDK builds, no hook is set.
+ */
+public abstract class BootClassLoaderHook {
+    private static BootClassLoaderHook bootLoaderHook = null;
+    public static synchronized BootClassLoaderHook getHook() {
+        return bootLoaderHook;
+    }
+
+    public static synchronized void setHook(BootClassLoaderHook hook) {
+        if (!VM.isBooted()) {
+            throw new InternalError("hook can only be set after VM is booted");
+        }
+        if (bootLoaderHook != null) {
+            throw new InternalError("hook should not be reinitialized");
+        }
+        bootLoaderHook = hook;
+    }
+
+    protected BootClassLoaderHook() {
+    }
+
+    /**
+     * A method to be invoked before a class loader loads
+     * a bootstrap class.
+     *
+     * @param classname the binary name of the class
+     */
+    public static void preLoadClass(String classname) {
+        BootClassLoaderHook hook = getHook();
+        if (hook != null) {
+            hook.loadBootstrapClass(classname);
+        }
+    }
+
+    /**
+     * A method to be invoked before a class loader loads
+     * a resource.
+     *
+     * @param resourcename the resource name
+     */
+    public static void preLoadResource(String resourcename) {
+        BootClassLoaderHook hook = getHook();
+        if (hook != null) {
+            hook.getBootstrapResource(resourcename);
+        }
+    }
+
+    /**
+     * A method to be invoked before a library is loaded.
+     *
+     * @param libname the name of the library
+     */
+    public static void preLoadLibrary(String libname) {
+        BootClassLoaderHook hook = getHook();
+        if (hook != null) {
+            hook.loadLibrary(libname);
+        }
+    }
+
+    private static final File[] EMPTY_FILE_ARRAY = new File[0];
+
+    /**
+     * Returns bootstrap class paths added by the hook.
+     */
+    public static File[] getBootstrapPaths() {
+        BootClassLoaderHook hook = getHook();
+        if (hook != null) {
+            return hook.getAdditionalBootstrapPaths();
+        } else {
+            return EMPTY_FILE_ARRAY;
+        }
+    }
+
+    /**
+     * Returns a pathname of a JAR or class that the hook loads
+     * per this loadClass request; or null.
+     *
+     * @param classname the binary name of the class
+     */
+    public abstract String loadBootstrapClass(String className);
+
+    /**
+     * Returns a pathname of a resource file that the hook loads
+     * per this getResource request; or null.
+     *
+     * @param resourceName the resource name
+     */
+    public abstract String getBootstrapResource(String resourceName);
+
+    /**
+     * Returns true if the hook successfully performs an operation per
+     * this loadLibrary request; or false if it fails.
+     *
+     * @param libname the name of the library
+     */
+    public abstract boolean loadLibrary(String libname);
+
+    /**
+     * Returns additional boot class paths added by the hook that
+     * should be searched by the boot class loader.
+     */
+    public abstract File[] getAdditionalBootstrapPaths();
+
+    /**
+     * Returns true if the current thread is in the process of doing
+     * a prefetching operation.
+     */
+    public abstract boolean isCurrentThreadPrefetching();
+
+    /**
+     * Returns true if the hook successfully prefetches the specified file.
+     *
+     * @param name a platform independent pathname
+     */
+    public abstract boolean prefetchFile(String name);
+}
--- a/jdk/src/share/classes/sun/misc/Launcher.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/misc/Launcher.java	Wed Jul 05 17:01:52 2017 +0200
@@ -50,8 +50,6 @@
 import sun.security.action.GetPropertyAction;
 import sun.security.util.SecurityConstants;
 import sun.net.www.ParseUtil;
-import sun.jkernel.Bundle;
-import sun.jkernel.DownloadManager;
 
 /**
  * This class is used by the system to launch the main application.
@@ -248,12 +246,7 @@
         }
 
         protected Class findClass(String name) throws ClassNotFoundException {
-            if (VM.isBootedKernelVM()) {
-                // Check for download before we look for it.  If
-                // DownloadManager ends up downloading it, it will add it to
-                // our search path before we proceed to the findClass().
-                DownloadManager.getBootClassPathEntryForClass(name);
-            }
+            BootClassLoaderHook.preLoadClass(name);
             return super.findClass(name);
         }
 
@@ -321,9 +314,7 @@
         public Class loadClass(String name, boolean resolve)
             throws ClassNotFoundException
         {
-            if (VM.isBootedKernelVM()) {
-                DownloadManager.getBootClassPathEntryForClass(name);
-            }
+            BootClassLoaderHook.preLoadClass(name);
             int i = name.lastIndexOf('.');
             if (i != -1) {
                 SecurityManager sm = System.getSecurityManager();
@@ -421,19 +412,17 @@
             }
 
             bootstrapClassPath = new URLClassPath(urls, factory);
-            if (VM.isBootedKernelVM()) {
-                final File[] additionalBootStrapPaths =
-                    DownloadManager.getAdditionalBootStrapPaths();
-                AccessController.doPrivileged(new PrivilegedAction() {
-                    public Object run() {
-                        for (int i=0; i<additionalBootStrapPaths.length; i++) {
-                            bootstrapClassPath.addURL(
-                                getFileURL(additionalBootStrapPaths[i]));
-                        }
-                        return null;
+            final File[] additionalBootStrapPaths =
+                BootClassLoaderHook.getBootstrapPaths();
+            AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    for (int i=0; i<additionalBootStrapPaths.length; i++) {
+                        bootstrapClassPath.addURL(
+                            getFileURL(additionalBootStrapPaths[i]));
                     }
-                });
-            }
+                    return null;
+                }
+            });
         }
         return bootstrapClassPath;
     }
--- a/jdk/src/share/classes/sun/misc/VM.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/misc/VM.java	Wed Jul 05 17:01:52 2017 +0200
@@ -346,11 +346,6 @@
     private native static void getThreadStateValues(int[][] vmThreadStateValues,
                                                     String[][] vmThreadStateNames);
 
-    private static boolean kernelVM;
-    public static boolean isBootedKernelVM() {
-        return booted && kernelVM;
-    }
-
     static {
         initialize();
     }
--- a/jdk/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java	Wed Jul 05 17:01:52 2017 +0200
@@ -399,13 +399,6 @@
     abstract boolean isAuthorizationStale (String header);
 
     /**
-     * Check for any expected authentication information in the response
-     * from the server
-     */
-    abstract void checkResponse (String header, String method, URL url)
-                                        throws IOException;
-
-    /**
      * Give a key for hash table lookups.
      * @param includeRealm if you want the realm considered.  Preemptively
      *          setting an authorization is done before the realm is known.
--- a/jdk/src/share/classes/sun/net/www/protocol/http/BasicAuthentication.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/BasicAuthentication.java	Wed Jul 05 17:01:52 2017 +0200
@@ -179,13 +179,6 @@
     }
 
     /**
-     * For Basic Authentication, there is no security information in the
-     * response
-     */
-    void checkResponse (String header, String method, URL url) {
-    }
-
-    /**
      * @return the common root path between npath and path.
      * This is used to detect when we have an authentication for two
      * paths and the root of th authentication space is the common root.
--- a/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Wed Jul 05 17:01:52 2017 +0200
@@ -291,7 +291,7 @@
             uri = HttpURLConnection.connectRequestURI(conn.getURL());
             method = HTTP_CONNECT;
         } else {
-            uri = conn.getURL().getFile();
+            uri = conn.getRequestURI();
             method = conn.getMethod();
         }
 
@@ -385,7 +385,11 @@
 
     public void checkResponse (String header, String method, URL url)
                                                         throws IOException {
-        String uri = url.getFile();
+        checkResponse (header, method, url.getFile());
+    }
+
+    public void checkResponse (String header, String method, String uri)
+                                                        throws IOException {
         char[] passwd = pw.getPassword();
         String username = pw.getUserName();
         boolean qop = params.authQop();
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Jul 05 17:01:52 2017 +0200
@@ -390,7 +390,7 @@
              * request.
              */
             if (!failedOnce)
-                requests.prepend(method + " " + http.getURLFile()+" "  +
+                requests.prepend(method + " " + getRequestURI()+" "  +
                                  httpVersion, null);
             if (!getUseCaches()) {
                 requests.setIfNotSet ("Cache-Control", "no-cache");
@@ -1546,10 +1546,14 @@
             if (proxyAuthentication.isAuthorizationStale (raw)) {
                 /* we can retry with the current credentials */
                 String value;
-                if (tunnelState() == TunnelState.SETUP &&
-                      proxyAuthentication instanceof DigestAuthentication) {
-                    value = ((DigestAuthentication)proxyAuthentication)
-                            .getHeaderValue(connectRequestURI(url), HTTP_CONNECT);
+                if (proxyAuthentication instanceof DigestAuthentication) {
+                    DigestAuthentication digestProxy = (DigestAuthentication)
+                        proxyAuthentication;
+                    if (tunnelState() == TunnelState.SETUP) {
+                        value = digestProxy.getHeaderValue(connectRequestURI(url), HTTP_CONNECT);
+                    } else {
+                        value = digestProxy.getHeaderValue(getRequestURI(), method);
+                    }
                 } else {
                     value = proxyAuthentication.getHeaderValue(url, method);
                 }
@@ -1765,10 +1769,14 @@
                                               http.getProxyPortUsed());
         if (pauth != null && pauth.supportsPreemptiveAuthorization()) {
             String value;
-            if (tunnelState() == TunnelState.SETUP &&
-                    pauth instanceof DigestAuthentication) {
-                value = ((DigestAuthentication)pauth)
+            if (pauth instanceof DigestAuthentication) {
+                DigestAuthentication digestProxy = (DigestAuthentication) pauth;
+                if (tunnelState() == TunnelState.SETUP) {
+                    value = digestProxy
                         .getHeaderValue(connectRequestURI(url), HTTP_CONNECT);
+                } else {
+                    value = digestProxy.getHeaderValue(getRequestURI(), method);
+                }
             } else {
                 value = pauth.getHeaderValue(url, method);
             }
@@ -2075,17 +2083,23 @@
         try {
             if (!needToCheck)
                 return;
-            if (validateProxy && currentProxyCredentials != null) {
+            if ((validateProxy && currentProxyCredentials != null) &&
+                (currentProxyCredentials instanceof DigestAuthentication)) {
                 String raw = responses.findValue ("Proxy-Authentication-Info");
                 if (inClose || (raw != null)) {
-                    currentProxyCredentials.checkResponse (raw, method, url);
+                    DigestAuthentication da = (DigestAuthentication)
+                        currentProxyCredentials;
+                    da.checkResponse (raw, method, getRequestURI());
                     currentProxyCredentials = null;
                 }
             }
-            if (validateServer && currentServerCredentials != null) {
+            if ((validateServer && currentServerCredentials != null) &&
+                (currentServerCredentials instanceof DigestAuthentication)) {
                 String raw = responses.findValue ("Authentication-Info");
                 if (inClose || (raw != null)) {
-                    currentServerCredentials.checkResponse (raw, method, url);
+                    DigestAuthentication da = (DigestAuthentication)
+                        currentServerCredentials;
+                    da.checkResponse (raw, method, url);
                     currentServerCredentials = null;
                 }
             }
@@ -2099,6 +2113,23 @@
         }
     }
 
+   /* The request URI used in the request line for this request.
+    * Also, needed for digest authentication
+    */
+
+    String requestURI = null;
+
+    String getRequestURI() {
+        if (requestURI == null) {
+            try {
+                requestURI = http.getURLFile();
+            } catch (IOException e) {
+                requestURI = "";
+            }
+        }
+        return requestURI;
+    }
+
     /* Tells us whether to follow a redirect.  If so, it
      * closes the connection (break any keep-alive) and
      * resets the url, re-connects, and resets the request
@@ -2160,13 +2191,14 @@
             }
 
             setProxiedClient (url, proxyHost, proxyPort);
-            requests.set(0, method + " " + http.getURLFile()+" "  +
+            requests.set(0, method + " " + getRequestURI()+" "  +
                              httpVersion, null);
             connected = true;
         } else {
             // maintain previous headers, just change the name
             // of the file we're getting
             url = locUrl;
+            requestURI = null; // force it to be recalculated
             if (method.equals("POST") && !Boolean.getBoolean("http.strictPostRedirect") && (stat!=307)) {
                 /* The HTTP/1.1 spec says that a redirect from a POST
                  * *should not* be immediately turned into a GET, and
@@ -2204,7 +2236,7 @@
                  * CacheResponse.
                  */
                 if (http != null) {
-                    requests.set(0, method + " " + http.getURLFile()+" "  +
+                    requests.set(0, method + " " + getRequestURI()+" "  +
                                  httpVersion, null);
                     int port = url.getPort();
                     String host = url.getHost();
--- a/jdk/src/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java	Wed Jul 05 17:01:52 2017 +0200
@@ -214,12 +214,6 @@
         return negotiator.nextToken(token);
     }
 
-    /**
-     * no-use for Negotiate
-     */
-    public void checkResponse (String header, String method, URL url) throws IOException {
-    }
-
     class B64Encoder extends BASE64Encoder {
         protected int bytesPerLine () {
             return 100000;  // as big as it can be, maybe INT_MAX
--- a/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -461,12 +461,16 @@
         }
 
         Certificate[] peerCerts = null;
+        String cipher = session.getCipherSuite();
         try {
             HostnameChecker checker = HostnameChecker.getInstance(
                                                 HostnameChecker.TYPE_TLS);
 
             Principal principal = getPeerPrincipal();
-            if (principal instanceof KerberosPrincipal) {
+            // X.500 principal or Kerberos principal.
+            // (Use ciphersuite check to determine whether Kerberos is present.)
+            if (cipher.startsWith("TLS_KRB5") &&
+                    principal instanceof KerberosPrincipal) {
                 if (!checker.match(host, (KerberosPrincipal)principal)) {
                     throw new SSLPeerUnverifiedException("Hostname checker" +
                                 " failed for Kerberos");
@@ -499,7 +503,6 @@
             // ignore
         }
 
-        String cipher = session.getCipherSuite();
         if ((cipher != null) && (cipher.indexOf("_anon_") != -1)) {
             return;
         } else if ((hostnameVerifier != null) &&
--- a/jdk/src/share/classes/sun/nio/ch/ChannelInputStream.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/nio/ch/ChannelInputStream.java	Wed Jul 05 17:01:52 2017 +0200
@@ -109,6 +109,16 @@
         return ChannelInputStream.read(ch, bb, true);
     }
 
+    public int available() throws IOException {
+        // special case where the channel is to a file
+        if (ch instanceof SeekableByteChannel) {
+            SeekableByteChannel sbc = (SeekableByteChannel)ch;
+            long rem = Math.max(0, sbc.size() - sbc.position());
+            return (rem > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int)rem;
+        }
+        return 0;
+    }
+
     public void close() throws IOException {
         ch.close();
     }
--- a/jdk/src/share/classes/sun/print/PSPrinterJob.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/print/PSPrinterJob.java	Wed Jul 05 17:01:52 2017 +0200
@@ -87,6 +87,8 @@
 import sun.awt.FontDescriptor;
 import sun.awt.PlatformFont;
 import sun.awt.SunToolkit;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
 
 import java.nio.charset.*;
 import java.nio.CharBuffer;
@@ -1077,7 +1079,7 @@
             }
 
             int styleMask = font.getStyle() |
-                sun.font.FontManager.getFont2D(font).getStyle();
+                FontUtilities.getFont2D(font).getStyle();
 
             String style = FontConfiguration.getStyleString(styleMask);
 
--- a/jdk/src/share/classes/sun/print/PathGraphics.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/print/PathGraphics.java	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,8 @@
 import sun.font.Font2D;
 import sun.font.Font2DHandle;
 import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
 
 import java.awt.Color;
 import java.awt.Font;
@@ -698,7 +700,7 @@
         }
 
         Font font = g.getFont();
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
         if (font2D.handle.font2D != font2D) {
             /* suspicious, may be a bad font. lets bail */
             return false;
@@ -933,7 +935,7 @@
          * The logic here is erring on the side of caution, in particular
          * in including supplementary characters.
          */
-        if (FontManager.isComplexText(chars, 0, chars.length)) {
+        if (FontUtilities.isComplexText(chars, 0, chars.length)) {
             return printGlyphVector(g, x, y);
         }
 
--- a/jdk/src/share/classes/sun/reflect/LangReflectAccess.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/reflect/LangReflectAccess.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,9 +33,9 @@
 public interface LangReflectAccess {
     /** Creates a new java.lang.reflect.Field. Access checks as per
         java.lang.reflect.AccessibleObject are not overridden. */
-    public Field newField(Class declaringClass,
+    public Field newField(Class<?> declaringClass,
                           String name,
-                          Class type,
+                          Class<?> type,
                           int modifiers,
                           int slot,
                           String signature,
@@ -43,11 +43,11 @@
 
     /** Creates a new java.lang.reflect.Method. Access checks as per
       java.lang.reflect.AccessibleObject are not overridden. */
-    public Method newMethod(Class declaringClass,
+    public Method newMethod(Class<?> declaringClass,
                             String name,
-                            Class[] parameterTypes,
-                            Class returnType,
-                            Class[] checkedExceptions,
+                            Class<?>[] parameterTypes,
+                            Class<?> returnType,
+                            Class<?>[] checkedExceptions,
                             int modifiers,
                             int slot,
                             String signature,
@@ -58,8 +58,8 @@
     /** Creates a new java.lang.reflect.Constructor. Access checks as
       per java.lang.reflect.AccessibleObject are not overridden. */
     public <T> Constructor<T> newConstructor(Class<T> declaringClass,
-                                             Class[] parameterTypes,
-                                             Class[] checkedExceptions,
+                                             Class<?>[] parameterTypes,
+                                             Class<?>[] checkedExceptions,
                                              int modifiers,
                                              int slot,
                                              String signature,
@@ -74,24 +74,24 @@
 
     /** Gets the ConstructorAccessor object for a
         java.lang.reflect.Constructor */
-    public ConstructorAccessor getConstructorAccessor(Constructor c);
+    public ConstructorAccessor getConstructorAccessor(Constructor<?> c);
 
     /** Sets the ConstructorAccessor object for a
         java.lang.reflect.Constructor */
-    public void setConstructorAccessor(Constructor c,
+    public void setConstructorAccessor(Constructor<?> c,
                                        ConstructorAccessor accessor);
 
     /** Gets the "slot" field from a Constructor (used for serialization) */
-    public int getConstructorSlot(Constructor c);
+    public int getConstructorSlot(Constructor<?> c);
 
     /** Gets the "signature" field from a Constructor (used for serialization) */
-    public String getConstructorSignature(Constructor c);
+    public String getConstructorSignature(Constructor<?> c);
 
     /** Gets the "annotations" field from a Constructor (used for serialization) */
-    public byte[] getConstructorAnnotations(Constructor c);
+    public byte[] getConstructorAnnotations(Constructor<?> c);
 
     /** Gets the "parameterAnnotations" field from a Constructor (used for serialization) */
-    public byte[] getConstructorParameterAnnotations(Constructor c);
+    public byte[] getConstructorParameterAnnotations(Constructor<?> c);
 
     //
     // Copying routines, needed to quickly fabricate new Field,
--- a/jdk/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Wed Jul 05 17:01:52 2017 +0200
@@ -40,17 +40,17 @@
  * @since   1.5
  */
 class AnnotationInvocationHandler implements InvocationHandler, Serializable {
-    private final Class type;
+    private final Class<? extends Annotation> type;
     private final Map<String, Object> memberValues;
 
-    AnnotationInvocationHandler(Class type, Map<String, Object> memberValues) {
+    AnnotationInvocationHandler(Class<? extends Annotation> type, Map<String, Object> memberValues) {
         this.type = type;
         this.memberValues = memberValues;
     }
 
     public Object invoke(Object proxy, Method method, Object[] args) {
         String member = method.getName();
-        Class[] paramTypes = method.getParameterTypes();
+        Class<?>[] paramTypes = method.getParameterTypes();
 
         // Handle Object and Annotation methods
         if (member.equals("equals") && paramTypes.length == 1 &&
@@ -84,7 +84,7 @@
      * if Cloneable had a public clone method.
      */
     private Object cloneArray(Object array) {
-        Class type = array.getClass();
+        Class<?> type = array.getClass();
 
         if (type == byte[].class) {
             byte[] byteArray = (byte[])array;
@@ -151,7 +151,7 @@
      * Translates a member value (in "dynamic proxy return form") into a string
      */
     private static String memberValueToString(Object value) {
-        Class type = value.getClass();
+        Class<?> type = value.getClass();
         if (!type.isArray())    // primitive, string, class, enum const,
                                 // or annotation
             return value.toString();
@@ -229,7 +229,7 @@
      * two members are identical object references.
      */
     private static boolean memberValueEquals(Object v1, Object v2) {
-        Class type = v1.getClass();
+        Class<?> type = v1.getClass();
 
         // Check for primitive, string, class, enum const, annotation,
         // or ExceptionProxy
@@ -301,7 +301,7 @@
      * Computes hashCode of a member value (in "dynamic proxy return form")
      */
     private static int memberValueHashCode(Object value) {
-        Class type = value.getClass();
+        Class<?> type = value.getClass();
         if (!type.isArray())    // primitive, string, class, enum const,
                                 // or annotation
             return value.hashCode();
@@ -340,11 +340,11 @@
             return;
         }
 
-        Map<String, Class> memberTypes = annotationType.memberTypes();
+        Map<String, Class<?>> memberTypes = annotationType.memberTypes();
 
         for (Map.Entry<String, Object> memberValue : memberValues.entrySet()) {
             String name = memberValue.getKey();
-            Class memberType = memberTypes.get(name);
+            Class<?> memberType = memberTypes.get(name);
             if (memberType != null) {  // i.e. member still exists
                 Object value = memberValue.getValue();
                 if (!(memberType.isInstance(value) ||
--- a/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java	Wed Jul 05 17:01:52 2017 +0200
@@ -59,10 +59,10 @@
      * @throws AnnotationFormatError if an annotation is found to be
      *         malformed.
      */
-    public static Map<Class, Annotation> parseAnnotations(
+    public static Map<Class<? extends Annotation>, Annotation> parseAnnotations(
                 byte[] rawAnnotations,
                 ConstantPool constPool,
-                Class container) {
+                Class<?> container) {
         if (rawAnnotations == null)
             return Collections.emptyMap();
 
@@ -76,17 +76,18 @@
         }
     }
 
-    private static Map<Class, Annotation> parseAnnotations2(
+    private static Map<Class<? extends Annotation>, Annotation> parseAnnotations2(
                 byte[] rawAnnotations,
                 ConstantPool constPool,
-                Class container) {
-        Map<Class, Annotation> result = new LinkedHashMap<Class, Annotation>();
+                Class<?> container) {
+        Map<Class<? extends Annotation>, Annotation> result =
+            new LinkedHashMap<Class<? extends Annotation>, Annotation>();
         ByteBuffer buf = ByteBuffer.wrap(rawAnnotations);
         int numAnnotations = buf.getShort() & 0xFFFF;
         for (int i = 0; i < numAnnotations; i++) {
             Annotation a = parseAnnotation(buf, constPool, container, false);
             if (a != null) {
-                Class klass = a.annotationType();
+                Class<? extends Annotation> klass = a.annotationType();
                 AnnotationType type = AnnotationType.getInstance(klass);
                 if (type.retention() == RetentionPolicy.RUNTIME)
                     if (result.put(klass, a) != null)
@@ -123,7 +124,7 @@
     public static Annotation[][] parseParameterAnnotations(
                     byte[] rawAnnotations,
                     ConstantPool constPool,
-                    Class container) {
+                    Class<?> container) {
         try {
             return parseParameterAnnotations2(rawAnnotations, constPool, container);
         } catch(BufferUnderflowException e) {
@@ -138,7 +139,7 @@
     private static Annotation[][] parseParameterAnnotations2(
                     byte[] rawAnnotations,
                     ConstantPool constPool,
-                    Class container) {
+                    Class<?> container) {
         ByteBuffer buf = ByteBuffer.wrap(rawAnnotations);
         int numParameters = buf.get() & 0xFF;
         Annotation[][] result = new Annotation[numParameters][];
@@ -188,15 +189,15 @@
      */
     private static Annotation parseAnnotation(ByteBuffer buf,
                                               ConstantPool constPool,
-                                              Class container,
+                                              Class<?> container,
                                               boolean exceptionOnMissingAnnotationClass) {
         int typeIndex = buf.getShort() & 0xFFFF;
-        Class annotationClass = null;
+        Class<? extends Annotation> annotationClass = null;
         String sig = "[unknown]";
         try {
             try {
                 sig = constPool.getUTF8At(typeIndex);
-                annotationClass = parseSig(sig, container);
+                annotationClass = (Class<? extends Annotation>)parseSig(sig, container);
             } catch (IllegalArgumentException ex) {
                 // support obsolete early jsr175 format class files
                 annotationClass = constPool.getClassAt(typeIndex);
@@ -223,7 +224,7 @@
             return null;
         }
 
-        Map<String, Class> memberTypes = type.memberTypes();
+        Map<String, Class<?>> memberTypes = type.memberTypes();
         Map<String, Object> memberValues =
             new LinkedHashMap<String, Object>(type.memberDefaults());
 
@@ -231,7 +232,7 @@
         for (int i = 0; i < numMembers; i++) {
             int memberNameIndex = buf.getShort() & 0xFFFF;
             String memberName = constPool.getUTF8At(memberNameIndex);
-            Class memberType = memberTypes.get(memberName);
+            Class<?> memberType = memberTypes.get(memberName);
 
             if (memberType == null) {
                 // Member is no longer present in annotation type; ignore it
@@ -252,7 +253,7 @@
      * member -> value map.
      */
     public static Annotation annotationForMap(
-        Class type, Map<String, Object> memberValues)
+        Class<? extends Annotation> type, Map<String, Object> memberValues)
     {
         return (Annotation) Proxy.newProxyInstance(
             type.getClassLoader(), new Class[] { type },
@@ -286,14 +287,15 @@
      * The member must be of the indicated type. If it is not, this
      * method returns an AnnotationTypeMismatchExceptionProxy.
      */
-    public static Object parseMemberValue(Class memberType, ByteBuffer buf,
+    public static Object parseMemberValue(Class<?> memberType,
+                                          ByteBuffer buf,
                                           ConstantPool constPool,
-                                          Class container) {
+                                          Class<?> container) {
         Object result = null;
         int tag = buf.get();
         switch(tag) {
           case 'e':
-              return parseEnumValue(memberType, buf, constPool, container);
+              return parseEnumValue((Class<? extends Enum<?>>)memberType, buf, constPool, container);
           case 'c':
               result = parseClassValue(buf, constPool, container);
               break;
@@ -361,7 +363,7 @@
      */
     private static Object parseClassValue(ByteBuffer buf,
                                           ConstantPool constPool,
-                                          Class container) {
+                                          Class<?> container) {
         int classIndex = buf.getShort() & 0xFFFF;
         try {
             try {
@@ -379,7 +381,7 @@
         }
     }
 
-    private static Class<?> parseSig(String sig, Class container) {
+    private static Class<?> parseSig(String sig, Class<?> container) {
         if (sig.equals("V")) return void.class;
         SignatureParser parser = SignatureParser.make();
         TypeSignature typeSig = parser.parseTypeSig(sig);
@@ -389,7 +391,7 @@
         Type result = reify.getResult();
         return toClass(result);
     }
-    static Class toClass(Type o) {
+    static Class<?> toClass(Type o) {
         if (o instanceof GenericArrayType)
             return Array.newInstance(toClass(((GenericArrayType)o).getGenericComponentType()),
                                      0)
@@ -409,9 +411,9 @@
      *           u2   const_name_index;
      *       } enum_const_value;
      */
-    private static Object parseEnumValue(Class enumType, ByteBuffer buf,
+    private static Object parseEnumValue(Class<? extends Enum> enumType, ByteBuffer buf,
                                          ConstantPool constPool,
-                                         Class container) {
+                                         Class<?> container) {
         int typeNameIndex = buf.getShort() & 0xFFFF;
         String typeName  = constPool.getUTF8At(typeNameIndex);
         int constNameIndex = buf.getShort() & 0xFFFF;
@@ -449,12 +451,12 @@
      * If the array values do not match arrayType, an
      * AnnotationTypeMismatchExceptionProxy will be returned.
      */
-    private static Object parseArray(Class arrayType,
+    private static Object parseArray(Class<?> arrayType,
                                      ByteBuffer buf,
                                      ConstantPool constPool,
-                                     Class container) {
+                                     Class<?> container) {
         int length = buf.getShort() & 0xFFFF;  // Number of array components
-        Class componentType = arrayType.getComponentType();
+        Class<?> componentType = arrayType.getComponentType();
 
         if (componentType == byte.class) {
             return parseByteArray(length, buf, constPool);
@@ -477,11 +479,11 @@
         } else if (componentType == Class.class) {
             return parseClassArray(length, buf, constPool, container);
         } else if (componentType.isEnum()) {
-            return parseEnumArray(length, componentType, buf,
+            return parseEnumArray(length, (Class<? extends Enum>)componentType, buf,
                                   constPool, container);
         } else {
             assert componentType.isAnnotation();
-            return parseAnnotationArray(length, componentType, buf,
+            return parseAnnotationArray(length, (Class <? extends Annotation>)componentType, buf,
                                         constPool, container);
         }
     }
@@ -660,8 +662,8 @@
     private static Object parseClassArray(int length,
                                           ByteBuffer buf,
                                           ConstantPool constPool,
-                                          Class container) {
-        Object[] result = new Class[length];
+                                          Class<?> container) {
+        Object[] result = new Class<?>[length];
         boolean typeMismatch = false;
         int tag = 0;
 
@@ -677,10 +679,10 @@
         return typeMismatch ? exceptionProxy(tag) : result;
     }
 
-    private static Object parseEnumArray(int length, Class enumType,
+    private static Object parseEnumArray(int length, Class<? extends Enum> enumType,
                                          ByteBuffer buf,
                                          ConstantPool constPool,
-                                         Class container) {
+                                         Class<?> container) {
         Object[] result = (Object[]) Array.newInstance(enumType, length);
         boolean typeMismatch = false;
         int tag = 0;
@@ -698,10 +700,10 @@
     }
 
     private static Object parseAnnotationArray(int length,
-                                               Class annotationType,
+                                               Class<? extends Annotation> annotationType,
                                                ByteBuffer buf,
                                                ConstantPool constPool,
-                                               Class container) {
+                                               Class<?> container) {
         Object[] result = (Object[]) Array.newInstance(annotationType, length);
         boolean typeMismatch = false;
         int tag = 0;
@@ -797,7 +799,7 @@
      * it is needed.
      */
     private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
-    public static Annotation[] toArray(Map<Class, Annotation> annotations) {
+    public static Annotation[] toArray(Map<Class<? extends Annotation>, Annotation> annotations) {
         return annotations.values().toArray(EMPTY_ANNOTATION_ARRAY);
     }
 }
--- a/jdk/src/share/classes/sun/reflect/annotation/AnnotationType.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/reflect/annotation/AnnotationType.java	Wed Jul 05 17:01:52 2017 +0200
@@ -45,7 +45,7 @@
      * types.  This matches the return value that must be used for a
      * dynamic proxy, allowing for a simple isInstance test.
      */
-    private final Map<String, Class> memberTypes = new HashMap<String,Class>();
+    private final Map<String, Class<?>> memberTypes = new HashMap<String,Class<?>>();
 
     /**
      * Member name -> default value mapping.
@@ -76,12 +76,12 @@
      *     does not represent a valid annotation type
      */
     public static synchronized AnnotationType getInstance(
-        Class annotationClass)
+        Class<? extends Annotation> annotationClass)
     {
         AnnotationType result = sun.misc.SharedSecrets.getJavaLangAccess().
             getAnnotationType(annotationClass);
         if (result == null)
-            result = new AnnotationType((Class<?>) annotationClass);
+            result = new AnnotationType((Class<? extends Annotation>) annotationClass);
 
         return result;
     }
@@ -93,7 +93,7 @@
      * @throw IllegalArgumentException if the specified class object for
      *     does not represent a valid annotation type
      */
-    private AnnotationType(final Class<?> annotationClass) {
+    private AnnotationType(final Class<? extends Annotation> annotationClass) {
         if (!annotationClass.isAnnotation())
             throw new IllegalArgumentException("Not an annotation type");
 
@@ -110,7 +110,7 @@
             if (method.getParameterTypes().length != 0)
                 throw new IllegalArgumentException(method + " has params");
             String name = method.getName();
-            Class type = method.getReturnType();
+            Class<?> type = method.getReturnType();
             memberTypes.put(name, invocationHandlerReturnType(type));
             members.put(name, method);
 
@@ -140,7 +140,7 @@
      * the specified type (which is assumed to be a legal member type
      * for an annotation).
      */
-    public static Class invocationHandlerReturnType(Class type) {
+    public static Class<?> invocationHandlerReturnType(Class<?> type) {
         // Translate primitives to wrappers
         if (type == byte.class)
             return Byte.class;
@@ -167,7 +167,7 @@
      * Returns member types for this annotation type
      * (member name -> type mapping).
      */
-    public Map<String, Class> memberTypes() {
+    public Map<String, Class<?>> memberTypes() {
         return memberTypes;
     }
 
--- a/jdk/src/share/classes/sun/security/krb5/Credentials.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/Credentials.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,16 +33,11 @@
 
 import sun.security.krb5.internal.*;
 import sun.security.krb5.internal.ccache.CredentialsCache;
-import java.util.StringTokenizer;
 import sun.security.krb5.internal.ktab.*;
 import sun.security.krb5.internal.crypto.EType;
 import java.io.File;
 import java.io.IOException;
 import java.util.Date;
-import java.util.Vector;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
 import java.net.InetAddress;
 
 /**
@@ -378,9 +373,9 @@
 
                 KRBError error = ke.getError();
                 // update salt in PrincipalName
-                byte[] newSalt = error.getSalt();
-                if (newSalt != null && newSalt.length > 0) {
-                    princ.setSalt(new String(newSalt));
+                String newSalt = error.getSalt();
+                if (newSalt != null && newSalt.length() > 0) {
+                    princ.setSalt(newSalt);
                 }
 
                 // refresh keys
--- a/jdk/src/share/classes/sun/security/krb5/KrbAsReq.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/KrbAsReq.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,7 @@
     private boolean PA_ENC_TIMESTAMP_REQUIRED = false;
     private boolean pa_exists = false;
     private int pa_etype = 0;
-    private byte[] pa_salt = null;
+    private String pa_salt = null;
     private byte[] pa_s2kparams = null;
 
     // default is address-less tickets
@@ -88,7 +88,7 @@
      * with pre-authentication values
      */
     KrbAsReq(PrincipalName principal, EncryptionKey[] keys,
-        boolean pa_exists, int etype, byte[] salt, byte[] s2kparams)
+        boolean pa_exists, int etype, String salt, byte[] s2kparams)
         throws KrbException, IOException {
         this(keys, // for pre-authentication
              pa_exists, etype, salt, s2kparams, // pre-auth values
@@ -112,7 +112,7 @@
      }
 
     // update with pre-auth info
-    public void updatePA(int etype, byte[] salt, byte[] params, PrincipalName name) {
+    public void updatePA(int etype, String salt, byte[] params, PrincipalName name) {
         // set the pre-auth values
         pa_exists = true;
         pa_etype = etype;
@@ -120,9 +120,8 @@
         pa_s2kparams = params;
 
         // update salt in PrincipalName
-        if (salt != null && salt.length > 0) {
-            String newSalt = new String(salt);
-            name.setSalt(newSalt);
+        if (salt != null && salt.length() > 0) {
+            name.setSalt(salt);
             if (DEBUG) {
                 System.out.println("Updated salt from pre-auth = " + name.getSalt());
             }
@@ -161,7 +160,7 @@
                     char[] password,
                     boolean pa_exists,
                     int etype,
-                    byte[] salt,
+                    String salt,
                     byte[] s2kparams,
                     KDCOptions options,
                     PrincipalName cname,
@@ -246,7 +245,7 @@
                     EncryptionKey[] keys,
                     boolean pa_exists,
                     int etype,
-                    byte[] salt,
+                    String salt,
                     byte[] s2kparams,
                     KDCOptions options,
                     PrincipalName cname,
--- a/jdk/src/share/classes/sun/security/krb5/PrincipalName.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/PrincipalName.java	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,7 @@
 import java.io.IOException;
 import java.math.BigInteger;
 import sun.security.krb5.internal.ccache.CCacheOutputStream;
+import sun.security.krb5.internal.util.KerberosString;
 
 
 /**
@@ -246,7 +247,7 @@
             DerValue subSubDer;
             while(subDer.getData().available() > 0) {
                 subSubDer = subDer.getData().getDerValue();
-                v.addElement(subSubDer.getGeneralString());
+                v.addElement(new KerberosString(subSubDer).toString());
             }
             if (v.size() > 0) {
                 nameStrings = new String[v.size()];
@@ -554,7 +555,7 @@
         temp = new DerOutputStream();
         DerValue der[] = new DerValue[nameStrings.length];
         for (int i = 0; i < nameStrings.length; i++) {
-            der[i] = new DerValue(DerValue.tag_GeneralString, nameStrings[i]);
+            der[i] = new KerberosString(nameStrings[i]).toDerValue();
         }
         temp.putSequence(der);
         bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x01), temp);
--- a/jdk/src/share/classes/sun/security/krb5/Realm.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/Realm.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,11 +31,6 @@
 
 package sun.security.krb5;
 
-import sun.security.krb5.Config;
-import sun.security.krb5.PrincipalName;
-import sun.security.krb5.KrbException;
-import sun.security.krb5.Asn1Exception;
-import sun.security.krb5.RealmException;
 import sun.security.krb5.internal.Krb5;
 import sun.security.util.*;
 import java.io.IOException;
@@ -43,6 +38,7 @@
 import java.util.Vector;
 import java.util.Stack;
 import java.util.EmptyStackException;
+import sun.security.krb5.internal.util.KerberosString;
 
 /**
  * Implements the ASN.1 Realm type.
@@ -109,7 +105,7 @@
         if (encoding == null) {
             throw new IllegalArgumentException("encoding can not be null");
         }
-        realm = encoding.getGeneralString();
+        realm = new KerberosString(encoding).toString();
         if (realm == null || realm.length() == 0)
             throw new RealmException(Krb5.REALM_NULL);
         if (!isValidRealmString(realm))
@@ -206,7 +202,7 @@
      */
     public byte[] asn1Encode() throws Asn1Exception, IOException {
         DerOutputStream out = new DerOutputStream();
-        out.putGeneralString(this.realm);
+        out.putDerValue(new KerberosString(this.realm).toDerValue());
         return out.toByteArray();
     }
 
--- a/jdk/src/share/classes/sun/security/krb5/internal/ETypeInfo.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/ETypeInfo.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
 import sun.security.util.*;
 import sun.security.krb5.Asn1Exception;
 import java.io.IOException;
+import sun.security.krb5.internal.util.KerberosString;
 
 /**
  * Implements the ASN.1 ETYPE-INFO-ENTRY type.
@@ -43,7 +44,7 @@
 public class ETypeInfo {
 
     private int etype;
-    private byte[] salt = null;
+    private String salt = null;
 
     private static final byte TAG_TYPE = 0;
     private static final byte TAG_VALUE = 1;
@@ -51,21 +52,13 @@
     private ETypeInfo() {
     }
 
-    public ETypeInfo(int etype, byte[] salt) {
+    public ETypeInfo(int etype, String salt) {
         this.etype = etype;
-        if (salt != null) {
-            this.salt = salt.clone();
-        }
+        this.salt = salt;
     }
 
     public Object clone() {
-        ETypeInfo etypeInfo = new ETypeInfo();
-        etypeInfo.etype = etype;
-        if (salt != null) {
-            etypeInfo.salt = new byte[salt.length];
-            System.arraycopy(salt, 0, etypeInfo.salt, 0, salt.length);
-        }
-        return etypeInfo;
+        return new ETypeInfo(etype, salt);
     }
 
     /**
@@ -94,7 +87,22 @@
         if (encoding.getData().available() > 0) {
             der = encoding.getData().getDerValue();
             if ((der.getTag() & 0x1F) == 0x01) {
-                this.salt = der.getData().getOctetString();
+                byte[] saltBytes = der.getData().getOctetString();
+
+                // Although salt is defined as an OCTET STRING, it's the
+                // encoding from of a string. As RFC 4120 says:
+                //
+                // "The salt, ..., is also completely unspecified with respect
+                // to character set and is probably locale-specific".
+                //
+                // It's known that this field is using the same encoding as
+                // KerberosString in most implementations.
+
+                if (KerberosString.MSNAME) {
+                    this.salt = new String(saltBytes, "UTF8");
+                } else {
+                    this.salt = new String(saltBytes);
+                }
             }
         }
 
@@ -120,7 +128,11 @@
 
         if (salt != null) {
             temp = new DerOutputStream();
-            temp.putOctetString(salt);
+            if (KerberosString.MSNAME) {
+                temp.putOctetString(salt.getBytes("UTF8"));
+            } else {
+                temp.putOctetString(salt.getBytes());
+            }
             bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
                                         TAG_VALUE), temp);
         }
@@ -135,8 +147,8 @@
         return etype;
     }
 
-    public byte[] getSalt() {
-        return ((salt == null) ? null : salt.clone());
+    public String getSalt() {
+        return salt;
     }
 
 }
--- a/jdk/src/share/classes/sun/security/krb5/internal/ETypeInfo2.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/ETypeInfo2.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
 import sun.security.util.*;
 import sun.security.krb5.Asn1Exception;
 import java.io.IOException;
+import sun.security.krb5.internal.util.KerberosString;
 
 /**
  * Implements the ASN.1 ETYPE-INFO-ENTRY type.
@@ -54,11 +55,9 @@
     private ETypeInfo2() {
     }
 
-    public ETypeInfo2(int etype, byte[] salt, byte[] s2kparams) {
+    public ETypeInfo2(int etype, String salt, byte[] s2kparams) {
         this.etype = etype;
-        if (salt != null) {
-            this.saltStr = new String(salt);
-        }
+        this.saltStr = salt;
         if (s2kparams != null) {
             this.s2kparams = s2kparams.clone();
         }
@@ -102,7 +101,8 @@
         if (encoding.getData().available() > 0) {
             if ((encoding.getData().peekByte() & 0x1F) == 0x01) {
                 der = encoding.getData().getDerValue();
-                this.saltStr = der.getData().getGeneralString();
+                this.saltStr = new KerberosString(
+                        der.getData().getDerValue()).toString();
             }
         }
 
@@ -136,7 +136,7 @@
 
         if (saltStr != null) {
             temp = new DerOutputStream();
-            temp.putGeneralString(saltStr);
+            temp.putDerValue(new KerberosString(saltStr).toDerValue());
             bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
                                         TAG_VALUE1), temp);
         }
@@ -157,8 +157,8 @@
         return etype;
     }
 
-    public byte[] getSalt() {
-        return ((saltStr == null) ? null : saltStr.getBytes());
+    public String getSalt() {
+        return saltStr;
     }
 
     public byte[] getParams() {
--- a/jdk/src/share/classes/sun/security/krb5/internal/KRBError.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/KRBError.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,7 @@
 import java.io.ObjectInputStream;
 import java.math.BigInteger;
 import java.util.Arrays;
+import sun.security.krb5.internal.util.KerberosString;
 /**
  * Implements the ASN.1 KRBError type.
  *
@@ -97,7 +98,7 @@
 
     // pre-auth info
     private int etype = 0;
-    private byte[] salt = null;
+    private String salt = null;
     private byte[] s2kparams = null;
 
     private static boolean DEBUG = Krb5.DEBUG;
@@ -334,8 +335,8 @@
     }
 
     // access pre-auth info
-    public final byte[] getSalt() {
-        return ((salt == null) ? null : salt.clone());
+    public final String getSalt() {
+        return salt;
     }
 
     // access pre-auth info
@@ -415,7 +416,8 @@
         if (der.getData().available() >0) {
             if ((der.getData().peekByte() & 0x1F) == 0x0B) {
                 subDer = der.getData().getDerValue();
-                eText = subDer.getData().getGeneralString();
+                eText = new KerberosString(subDer.getData().getDerValue())
+                        .toString();
             }
         }
         if (der.getData().available() >0) {
@@ -515,7 +517,7 @@
 
         if (eText != null) {
             temp = new DerOutputStream();
-            temp.putGeneralString(eText);
+            temp.putDerValue(new KerberosString(eText).toDerValue());
             bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x0B), temp);
         }
         if (eData != null) {
--- a/jdk/src/share/classes/sun/security/krb5/internal/crypto/Des.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/crypto/Des.java	Wed Jul 05 17:01:52 2017 +0200
@@ -34,17 +34,29 @@
 import javax.crypto.spec.SecretKeySpec;
 import javax.crypto.SecretKeyFactory;
 import javax.crypto.SecretKey;
-import java.security.Security;
-import java.security.Provider;
 import java.security.GeneralSecurityException;
 import javax.crypto.spec.IvParameterSpec;
 import sun.security.krb5.KrbCryptoException;
-import sun.security.krb5.internal.Krb5;
-import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
+import sun.security.action.GetPropertyAction;
 
 public final class Des {
 
+    // RFC 3961 demands that UTF-8 encoding be used in DES's
+    // string-to-key function. For historical reasons, some
+    // implementations use a locale-specific encoding. Even
+    // so, when the client and server use different locales,
+    // they must agree on a common value, normally the one
+    // used when the password is set/reset.
+    //
+    // The following system property is provided to perform the
+    // string-to-key encoding. When set, the specified charset
+    // name is used. Otherwise, the system default charset.
+
+    private final static String CHARSET =
+            java.security.AccessController.doPrivileged(
+            new GetPropertyAction("sun.security.krb5.msinterop.des.s2kcharset"));
+
     private static final long[] bad_keys = {
         0x0101010101010101L, 0xfefefefefefefefeL,
         0x1f1f1f1f1f1f1f1fL, 0xe0e0e0e0e0e0e0e0L,
@@ -226,7 +238,11 @@
 
         // Convert password to byte array
         try {
-            cbytes = (new String(passwdChars)).getBytes();
+            if (CHARSET == null) {
+                cbytes = (new String(passwdChars)).getBytes();
+            } else {
+                cbytes = (new String(passwdChars)).getBytes(CHARSET);
+            }
         } catch (Exception e) {
             // clear-up sensitive information
             if (cbytes != null) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/security/krb5/internal/util/KerberosString.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.security.krb5.internal.util;
+
+import java.io.IOException;
+import java.security.AccessController;
+import sun.security.action.GetBooleanAction;
+import sun.security.util.DerValue;
+
+/**
+ * Implements the ASN.1 KerberosString type.
+ *
+ * <pre>
+ * KerberosString  ::= GeneralString (IA5String)
+ * </pre>
+ *
+ * This definition reflects the Network Working Group RFC 4120
+ * specification available at
+ * <a href="http://www.ietf.org/rfc/rfc4120.txt">
+ * http://www.ietf.org/rfc/rfc4120.txt</a>.
+ */
+public final class KerberosString {
+    /**
+     * RFC 4120 defines KerberosString as GeneralString (IA5String), which
+     * only includes ASCII characters. However, other implementations have been
+     * known to use GeneralString to contain UTF-8 encoding. To interop
+     * with these implementations, the following system property is defined.
+     * When set as true, KerberosString is encoded as UTF-8. Note that this
+     * only affects the byte encoding, the tag of the ASN.1 type is still
+     * GeneralString.
+     */
+    public static final boolean MSNAME = AccessController.doPrivileged(
+            new GetBooleanAction("sun.security.krb5.msinterop.kstring"));
+
+    private final String s;
+
+    public KerberosString(String s) {
+        this.s = s;
+    }
+
+    public KerberosString(DerValue der) throws IOException {
+        if (der.tag != DerValue.tag_GeneralString) {
+            throw new IOException(
+                "KerberosString's tag is incorrect: " + der.tag);
+        }
+        s = new String(der.getDataBytes(), MSNAME?"UTF8":"ASCII");
+    }
+
+    public String toString() {
+        return s;
+    }
+
+    public DerValue toDerValue() throws IOException {
+        // No need to cache the result since this method is
+        // only called once.
+        return new DerValue(DerValue.tag_GeneralString,
+                s.getBytes(MSNAME?"UTF8":"ASCII"));
+    }
+}
--- a/jdk/src/share/classes/sun/security/provider/PolicyFile.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/provider/PolicyFile.java	Wed Jul 05 17:01:52 2017 +0200
@@ -54,7 +54,6 @@
 import java.net.NetPermission;
 import java.util.PropertyPermission;
 import java.util.concurrent.atomic.AtomicReference;
-import java.awt.AWTPermission;
 /*
 import javax.security.auth.AuthPermission;
 import javax.security.auth.kerberos.ServicePermission;
@@ -1023,8 +1022,6 @@
             return new NetPermission(name, actions);
         } else if (claz.equals(AllPermission.class)) {
             return SecurityConstants.ALL_PERMISSION;
-        } else if (claz.equals(AWTPermission.class)) {
-            return new AWTPermission(name, actions);
 /*
         } else if (claz.equals(ReflectPermission.class)) {
             return new ReflectPermission(name, actions);
--- a/jdk/src/share/classes/sun/security/ssl/CipherSuite.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/CipherSuite.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2002-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
     // Flag indicating if CipherSuite availability can change dynamically.
     // This is the case when we rely on a JCE cipher implementation that
     // may not be available in the installed JCE providers.
-    // It is true because we do not have a Java ECC implementation.
+    // It is true because we might not have an ECC or Kerberos implementation.
     final static boolean DYNAMIC_AVAILABILITY = true;
 
     private final static boolean ALLOW_ECC = Debug.getBooleanProperty
@@ -278,14 +278,22 @@
         KeyExchange(String name, boolean allowed) {
             this.name = name;
             this.allowed = allowed;
-            this.alwaysAvailable = allowed && (name.startsWith("EC") == false);
+            this.alwaysAvailable = allowed &&
+                (!name.startsWith("EC")) && (!name.startsWith("KRB"));
         }
 
         boolean isAvailable() {
             if (alwaysAvailable) {
                 return true;
             }
-            return allowed && JsseJce.isEcAvailable();
+
+            if (name.startsWith("EC")) {
+                return (allowed && JsseJce.isEcAvailable());
+            } else if (name.startsWith("KRB")) {
+                return (allowed && JsseJce.isKerberosAvailable());
+            } else {
+                return allowed;
+            }
         }
 
         public String toString() {
--- a/jdk/src/share/classes/sun/security/ssl/JsseJce.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/JsseJce.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2001-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,29 @@
     // If yes, then all the EC based crypto we need is available.
     private static volatile Boolean ecAvailable;
 
+    // Flag indicating whether Kerberos crypto is available.
+    // If true, then all the Kerberos-based crypto we need is available.
+    private final static boolean kerberosAvailable;
+    static {
+        boolean temp;
+        try {
+            AccessController.doPrivileged(
+                new PrivilegedExceptionAction<Void>() {
+                    public Void run() throws Exception {
+                        // Test for Kerberos using the bootstrap class loader
+                        Class.forName("sun.security.krb5.PrincipalName", true,
+                                null);
+                        return null;
+                    }
+                });
+            temp = true;
+
+        } catch (Exception e) {
+            temp = false;
+        }
+        kerberosAvailable = temp;
+    }
+
     static {
         // force FIPS flag initialization
         // Because isFIPS() is synchronized and cryptoProvider is not modified
@@ -187,6 +210,10 @@
         ecAvailable = null;
     }
 
+    static boolean isKerberosAvailable() {
+        return kerberosAvailable;
+    }
+
     /**
      * Return an JCE cipher implementation for the specified algorithm.
      */
--- a/jdk/src/share/classes/sun/security/tools/JarSigner.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/tools/JarSigner.java	Wed Jul 05 17:01:52 2017 +0200
@@ -291,13 +291,21 @@
         for (n=0; n < args.length; n++) {
 
             String flags = args[n];
+            String modifier = null;
+            if (flags.charAt(0) == '-') {
+                int pos = flags.indexOf(':');
+                if (pos > 0) {
+                    modifier = flags.substring(pos+1);
+                    flags = flags.substring(0, pos);
+                }
+            }
 
             if (collator.compare(flags, "-keystore") == 0) {
                 if (++n == args.length) usageNoArg();
                 keystore = args[n];
             } else if (collator.compare(flags, "-storepass") ==0) {
                 if (++n == args.length) usageNoArg();
-                storepass = args[n].toCharArray();
+                storepass = getPass(modifier, args[n]);
             } else if (collator.compare(flags, "-storetype") ==0) {
                 if (++n == args.length) usageNoArg();
                 storetype = args[n];
@@ -329,7 +337,7 @@
                 debug = true;
             } else if (collator.compare(flags, "-keypass") ==0) {
                 if (++n == args.length) usageNoArg();
-                keypass = args[n].toCharArray();
+                keypass = getPass(modifier, args[n]);
             } else if (collator.compare(flags, "-sigfile") ==0) {
                 if (++n == args.length) usageNoArg();
                 sigfile = args[n];
@@ -355,13 +363,7 @@
             } else if (collator.compare(flags, "-verify") ==0) {
                 verify = true;
             } else if (collator.compare(flags, "-verbose") ==0) {
-                verbose = "all";
-            } else if (collator.compare(flags, "-verbose:all") ==0) {
-                verbose = "all";
-            } else if (collator.compare(flags, "-verbose:summary") ==0) {
-                verbose = "summary";
-            } else if (collator.compare(flags, "-verbose:grouped") ==0) {
-                verbose = "grouped";
+                verbose = (modifier != null) ? modifier : "all";
             } else if (collator.compare(flags, "-sigalg") ==0) {
                 if (++n == args.length) usageNoArg();
                 sigalg = args[n];
@@ -465,18 +467,25 @@
         }
     }
 
-    void usageNoArg() {
+    static char[] getPass(String modifier, String arg) {
+        char[] output = KeyTool.getPassWithModifier(modifier, arg);
+        if (output != null) return output;
+        usage();
+        return null;    // Useless, usage() already exit
+    }
+
+    static void usageNoArg() {
         System.out.println(rb.getString("Option lacks argument"));
         usage();
     }
 
-    void usage() {
+    static void usage() {
         System.out.println();
         System.out.println(rb.getString("Please type jarsigner -help for usage"));
         System.exit(1);
     }
 
-    void fullusage() {
+    static void fullusage() {
         System.out.println(rb.getString
                 ("Usage: jarsigner [options] jar-file alias"));
         System.out.println(rb.getString
--- a/jdk/src/share/classes/sun/security/tools/KeyTool.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java	Wed Jul 05 17:01:52 2017 +0200
@@ -76,6 +76,7 @@
 import sun.security.x509.*;
 
 import static java.security.KeyStore.*;
+import static sun.security.tools.KeyTool.Command.*;
 
 /**
  * This tool manages keystores.
@@ -92,7 +93,7 @@
 public final class KeyTool {
 
     private boolean debug = false;
-    private int command = -1;
+    private Command command = null;
     private String sigAlgName = null;
     private String keyAlgName = null;
     private boolean verbose = false;
@@ -146,24 +147,132 @@
 
     private List <String> v3ext = new ArrayList <String> ();
 
-    private static final int CERTREQ = 1;
-    private static final int CHANGEALIAS = 2;
-    private static final int DELETE = 3;
-    private static final int EXPORTCERT = 4;
-    private static final int GENKEYPAIR = 5;
-    private static final int GENSECKEY = 6;
-    // there is no HELP
-    private static final int IDENTITYDB = 7;
-    private static final int IMPORTCERT = 8;
-    private static final int IMPORTKEYSTORE = 9;
-    private static final int KEYCLONE = 10;
-    private static final int KEYPASSWD = 11;
-    private static final int LIST = 12;
-    private static final int PRINTCERT = 13;
-    private static final int SELFCERT = 14;
-    private static final int STOREPASSWD = 15;
-    private static final int GENCERT = 16;
-    private static final int PRINTCERTREQ = 17;
+    enum Command {
+        CERTREQ("Generates a certificate request",
+            "-alias", "-sigalg", "-file", "-keypass", "-keystore",
+            "-storepass", "-storetype", "-providername", "-providerclass",
+            "-providerarg", "-providerpath", "-v", "-protected"),
+        CHANGEALIAS("Changes an entry's alias",
+            "-alias", "-destalias", "-keypass", "-keystore", "-storepass",
+            "-storetype", "-providername", "-providerclass", "-providerarg",
+            "-providerpath", "-v", "-protected"),
+        DELETE("Deletes an entry",
+            "-alias", "-keystore", "-storepass", "-storetype",
+            "-providername", "-providerclass", "-providerarg",
+            "-providerpath", "-v", "-protected"),
+        EXPORTCERT("Exports certificate",
+            "-rfc", "-alias", "-file", "-keystore", "-storepass",
+            "-storetype", "-providername", "-providerclass", "-providerarg",
+            "-providerpath", "-v", "-protected"),
+        GENKEYPAIR("Generates a key pair",
+            "-alias", "-keyalg", "-keysize", "-sigalg", "-destalias",
+            "-startdate", "-ext", "-validity", "-keypass", "-keystore",
+            "-storepass", "-storetype", "-providername", "-providerclass",
+            "-providerarg", "-providerpath", "-v", "-protected"),
+        GENSECKEY("Generates a secret key",
+            "-alias", "-keypass", "-keyalg", "-keysize", "-keystore",
+            "-storepass", "-storetype", "-providername", "-providerclass",
+            "-providerarg", "-providerpath", "-v", "-protected"),
+        GENCERT("Generates certificate from a certificate request",
+            "-rfc", "-infile", "-outfile", "-alias", "-sigalg",
+            "-startdate", "-ext", "-validity", "-keypass", "-keystore",
+            "-storepass", "-storetype", "-providername", "-providerclass",
+            "-providerarg", "-providerpath", "-v", "-protected"),
+        IDENTITYDB("Imports entries from a JDK 1.1.x-style identity database",
+            "-file", "-storetype", "-keystore", "-storepass", "-providername",
+            "-providerclass", "-providerarg", "-providerpath", "-v"),
+        IMPORTCERT("Imports a certificate or a certificate chain",
+            "-noprompt", "-trustcacerts", "-protected", "-alias", "-file",
+            "-keypass", "-keystore", "-storepass", "-storetype",
+            "-providername", "-providerclass", "-providerarg",
+            "-providerpath", "-v"),
+        IMPORTKEYSTORE("Imports one or all entries from another keystore",
+            "-srckeystore", "-destkeystore", "-srcstoretype",
+            "-deststoretype", "-srcstorepass", "-deststorepass",
+            "-srcprotected", "-srcprovidername", "-destprovidername",
+            "-srcalias", "-destalias", "-srckeypass", "-destkeypass",
+            "-noprompt", "-providerclass", "-providerarg", "-providerpath",
+            "-v"),
+        KEYCLONE("Clones a key entry",
+            "-alias", "-destalias", "-keypass", "-new", "-storetype",
+            "-keystore", "-storepass", "-providername", "-providerclass",
+            "-providerarg", "-providerpath", "-v"),
+        KEYPASSWD("Changes the key password of an entry",
+            "-alias", "-keypass", "-new", "-keystore", "-storepass",
+            "-storetype", "-providername", "-providerclass", "-providerarg",
+            "-providerpath", "-v"),
+        LIST("Lists entries in a keystore",
+            "-rfc", "-alias", "-keystore", "-storepass", "-storetype",
+            "-providername", "-providerclass", "-providerarg",
+            "-providerpath", "-v", "-protected"),
+        PRINTCERT("Prints the content of a certificate",
+            "-rfc", "-file", "-sslserver", "-v"),
+        PRINTCERTREQ("Prints the content of a certificate request",
+            "-file", "-v"),
+        SELFCERT("Generates a self-signed certificate",
+            "-alias", "-sigalg", "-dname", "-startdate", "-validity", "-keypass",
+            "-storetype", "-keystore", "-storepass", "-providername",
+            "-providerclass", "-providerarg", "-providerpath", "-v"),
+        STOREPASSWD("Changes the store password of a keystore",
+            "-new", "-keystore", "-storepass", "-storetype", "-providername",
+            "-providerclass", "-providerarg", "-providerpath", "-v");
+
+        final String description;
+        final String[] options;
+        Command(String d, String... o) {
+            description = d;
+            options = o;
+        }
+        @Override
+        public String toString() {
+            return "-" + name().toLowerCase(Locale.ENGLISH);
+        }
+    };
+
+    private static String[][] options = {
+        // name, arg, description
+        {"-alias", "<alias>", "alias name of the entry to process"},
+        {"-destalias", "<destalias>", "destination alias"},
+        {"-destkeypass", "<arg>", "destination key password"},
+        {"-destkeystore", "<destkeystore>", "destination keystore name"},
+        {"-destprotected", null, "destination keystore password protected"},
+        {"-destprovidername", "<destprovidername>", "destination keystore provider name"},
+        {"-deststorepass", "<arg>", "destination keystore password"},
+        {"-deststoretype", "<deststoretype>", "destination keystore type"},
+        {"-dname", "<dname>", "distinguished name"},
+        {"-ext", "<value>", "X.509 extension"},
+        {"-file", "<filename>", "output file name"},
+        {"-file", "<filename>", "input file name"},
+        {"-infile", "<filename>", "input file name"},
+        {"-keyalg", "<keyalg>", "key algorithm name"},
+        {"-keypass", "<arg>", "key password"},
+        {"-keysize", "<keysize>", "key bit size"},
+        {"-keystore", "<keystore>", "keystore name"},
+        {"-new", "<arg>", "new password"},
+        {"-noprompt", null, "do not prompt"},
+        {"-outfile", "<filename>", "output file name"},
+        {"-protected", null, "password through protected mechanism"},
+        {"-providerarg", "<arg>", "provider argument"},
+        {"-providerclass", "<providerclass>", "provider class name"},
+        {"-providername", "<providername>", "provider name"},
+        {"-providerpath", "<pathlist>", "provider classpath"},
+        {"-rfc", null, "output in RFC style"},
+        {"-sigalg", "<sigalg>", "signature algorithm name"},
+        {"-srcalias", "<srcalias>", "source alias"},
+        {"-srckeypass", "<arg>", "source keystore password"},
+        {"-srckeystore", "<srckeystore>", "source keystore name"},
+        {"-srcprotected", null, "source keystore password protected"},
+        {"-srcprovidername", "<srcprovidername>", "source keystore provider name"},
+        {"-srcstorepass", "<arg>", "source keystore password"},
+        {"-srcstoretype", "<srcstoretype>", "source keystore type"},
+        {"-sslserver", "<server[:port]>", "SSL server host and port"},
+        {"-startdate", "<startdate>", "certificate validity start date/time"},
+        {"-storepass", "<arg>", "keystore password"},
+        {"-storetype", "<storetype>", "keystore type"},
+        {"-trustcacerts", null, "trust certificates from cacerts"},
+        {"-v", null, "verbose output"},
+        {"-validity", "<valDays>", "validity number of days"},
+    };
 
     private static final Class[] PARAM_STRING = { String.class };
 
@@ -192,7 +301,7 @@
     private void run(String[] args, PrintStream out) throws Exception {
         try {
             parseArgs(args);
-            if (command != -1) {
+            if (command != null) {
                 doCommands(out);
             }
         } catch (Exception e) {
@@ -224,59 +333,59 @@
      */
     void parseArgs(String[] args) {
 
-        if (args.length == 0) {
-            usage();
-            return;
-        }
-
         int i=0;
+        boolean help = args.length == 0;
 
         for (i=0; (i < args.length) && args[i].startsWith("-"); i++) {
 
             String flags = args[i];
+
+            // Check if the last option needs an arg
+            if (i == args.length - 1) {
+                for (String[] option: options) {
+                    // Only options with an arg need to be checked
+                    if (collator.compare(flags, option[0]) == 0) {
+                        if (option[1] != null) errorNeedArgument(flags);
+                        break;
+                    }
+                }
+            }
+
+            /*
+             * Check modifiers
+             */
+            String modifier = null;
+            int pos = flags.indexOf(':');
+            if (pos > 0) {
+                modifier = flags.substring(pos+1);
+                flags = flags.substring(0, pos);
+            }
             /*
              * command modes
              */
-            if (collator.compare(flags, "-certreq") == 0) {
-                command = CERTREQ;
-            } else if (collator.compare(flags, "-delete") == 0) {
-                command = DELETE;
-            } else if (collator.compare(flags, "-export") == 0 ||
-                    collator.compare(flags, "-exportcert") == 0) {
+            boolean isCommand = false;
+            for (Command c: Command.values()) {
+                if (collator.compare(flags, c.toString()) == 0) {
+                    command = c;
+                    isCommand = true;
+                    break;
+                }
+            }
+
+            if (isCommand) {
+                // already recognized as a command
+            } else if (collator.compare(flags, "-export") == 0) {
                 command = EXPORTCERT;
-            } else if (collator.compare(flags, "-genkey") == 0 ||
-                    collator.compare(flags, "-genkeypair") == 0) {
+            } else if (collator.compare(flags, "-genkey") == 0) {
                 command = GENKEYPAIR;
-            } else if (collator.compare(flags, "-help") == 0) {
-                usage();
-                return;
-            } else if (collator.compare(flags, "-identitydb") == 0) { // obsolete
-                command = IDENTITYDB;
-            } else if (collator.compare(flags, "-import") == 0 ||
-                    collator.compare(flags, "-importcert") == 0) {
+            } else if (collator.compare(flags, "-import") == 0) {
                 command = IMPORTCERT;
-            } else if (collator.compare(flags, "-keyclone") == 0) { // obsolete
-                command = KEYCLONE;
-            } else if (collator.compare(flags, "-changealias") == 0) {
-                command = CHANGEALIAS;
-            } else if (collator.compare(flags, "-keypasswd") == 0) {
-                command = KEYPASSWD;
-            } else if (collator.compare(flags, "-list") == 0) {
-                command = LIST;
-            } else if (collator.compare(flags, "-printcert") == 0) {
-                command = PRINTCERT;
-            } else if (collator.compare(flags, "-selfcert") == 0) {     // obsolete
-                command = SELFCERT;
-            } else if (collator.compare(flags, "-storepasswd") == 0) {
-                command = STOREPASSWD;
-            } else if (collator.compare(flags, "-importkeystore") == 0) {
-                command = IMPORTKEYSTORE;
-            } else if (collator.compare(flags, "-genseckey") == 0) {
-                command = GENSECKEY;
-            } else if (collator.compare(flags, "-gencert") == 0) {
-                command = GENCERT;
-            } else if (collator.compare(flags, "-printcertreq") == 0) {
-                command = PRINTCERTREQ;
+            }
+            /*
+             * Help
+             */
+            else if (collator.compare(flags, "-help") == 0) {
+                help = true;
             }
 
             /*
@@ -284,101 +393,74 @@
              */
             else if (collator.compare(flags, "-keystore") == 0 ||
                     collator.compare(flags, "-destkeystore") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                ksfname = args[i];
+                ksfname = args[++i];
             } else if (collator.compare(flags, "-storepass") == 0 ||
                     collator.compare(flags, "-deststorepass") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                storePass = args[i].toCharArray();
+                storePass = getPass(modifier, args[++i]);
                 passwords.add(storePass);
             } else if (collator.compare(flags, "-storetype") == 0 ||
                     collator.compare(flags, "-deststoretype") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                storetype = args[i];
+                storetype = args[++i];
             } else if (collator.compare(flags, "-srcstorepass") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                srcstorePass = args[i].toCharArray();
+                srcstorePass = getPass(modifier, args[++i]);
                 passwords.add(srcstorePass);
             } else if (collator.compare(flags, "-srcstoretype") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                srcstoretype = args[i];
+                srcstoretype = args[++i];
             } else if (collator.compare(flags, "-srckeypass") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                srckeyPass = args[i].toCharArray();
+                srckeyPass = getPass(modifier, args[++i]);
                 passwords.add(srckeyPass);
             } else if (collator.compare(flags, "-srcprovidername") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                srcProviderName = args[i];
+                srcProviderName = args[++i];
             } else if (collator.compare(flags, "-providername") == 0 ||
                     collator.compare(flags, "-destprovidername") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                providerName = args[i];
+                providerName = args[++i];
             } else if (collator.compare(flags, "-providerpath") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                pathlist = args[i];
+                pathlist = args[++i];
             } else if (collator.compare(flags, "-keypass") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                keyPass = args[i].toCharArray();
+                keyPass = getPass(modifier, args[++i]);
                 passwords.add(keyPass);
             } else if (collator.compare(flags, "-new") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                newPass = args[i].toCharArray();
+                newPass = getPass(modifier, args[++i]);
                 passwords.add(newPass);
             } else if (collator.compare(flags, "-destkeypass") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                destKeyPass = args[i].toCharArray();
+                destKeyPass = getPass(modifier, args[++i]);
                 passwords.add(destKeyPass);
             } else if (collator.compare(flags, "-alias") == 0 ||
                     collator.compare(flags, "-srcalias") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                alias = args[i];
+                alias = args[++i];
             } else if (collator.compare(flags, "-dest") == 0 ||
                     collator.compare(flags, "-destalias") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                dest = args[i];
+                dest = args[++i];
             } else if (collator.compare(flags, "-dname") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                dname = args[i];
+                dname = args[++i];
             } else if (collator.compare(flags, "-keysize") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                keysize = Integer.parseInt(args[i]);
+                keysize = Integer.parseInt(args[++i]);
             } else if (collator.compare(flags, "-keyalg") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                keyAlgName = args[i];
+                keyAlgName = args[++i];
             } else if (collator.compare(flags, "-sigalg") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                sigAlgName = args[i];
+                sigAlgName = args[++i];
             } else if (collator.compare(flags, "-startdate") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                startDate = args[i];
+                startDate = args[++i];
             } else if (collator.compare(flags, "-validity") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                validity = Long.parseLong(args[i]);
+                validity = Long.parseLong(args[++i]);
             } else if (collator.compare(flags, "-ext") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                v3ext.add(args[i]);
+                v3ext.add(args[++i]);
             } else if (collator.compare(flags, "-file") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                filename = args[i];
+                filename = args[++i];
             } else if (collator.compare(flags, "-infile") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                infilename = args[i];
+                infilename = args[++i];
             } else if (collator.compare(flags, "-outfile") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                outfilename = args[i];
+                outfilename = args[++i];
             } else if (collator.compare(flags, "-sslserver") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                sslserver = args[i];
+                sslserver = args[++i];
             } else if (collator.compare(flags, "-srckeystore") == 0) {
-                if (++i == args.length) errorNeedArgument(flags);
-                srcksfname = args[i];
+                srcksfname = args[++i];
             } else if ((collator.compare(flags, "-provider") == 0) ||
                         (collator.compare(flags, "-providerclass") == 0)) {
-                if (++i == args.length) errorNeedArgument(flags);
                 if (providers == null) {
                     providers = new HashSet<Pair <String, String>> (3);
                 }
-                String providerClass = args[i];
+                String providerClass = args[++i];
                 String providerArg = null;
 
                 if (args.length > (i+1)) {
@@ -418,19 +500,24 @@
         }
 
         if (i<args.length) {
-            MessageFormat form = new MessageFormat
-                (rb.getString("Usage error, <arg> is not a legal command"));
-            Object[] source = {args[i]};
-            throw new RuntimeException(form.format(source));
-        }
-
-        if (command == -1) {
-            System.err.println(rb.getString("Usage error: no command provided"));
+            System.err.println(rb.getString("Illegal option:  ") + args[i]);
             tinyHelp();
         }
+
+        if (command == null) {
+            if (help) {
+                usage();
+            } else {
+                System.err.println(rb.getString("Usage error: no command provided"));
+                tinyHelp();
+            }
+        } else if (help) {
+            usage();
+            command = null;
+        }
     }
 
-    boolean isKeyStoreRelated(int cmd) {
+    boolean isKeyStoreRelated(Command cmd) {
         return cmd != PRINTCERT && cmd != PRINTCERTREQ;
     }
 
@@ -2600,7 +2687,7 @@
         do {
             if (maxRetry-- < 0) {
                 throw new RuntimeException(rb.getString(
-                        "Too may retries, program terminated"));
+                        "Too many retries, program terminated"));
             }
             commonName = inputString(in,
                     rb.getString("What is your first and last name?"),
@@ -3086,7 +3173,7 @@
         do {
             if (maxRetry-- < 0) {
                 throw new RuntimeException(rb.getString(
-                        "Too may retries, program terminated"));
+                        "Too many retries, program terminated"));
             }
             System.err.print(prompt);
             System.err.flush();
@@ -3258,7 +3345,8 @@
         int nmatch = 0;
         for (int i = 0; i<list.length; i++) {
             String one = list[i];
-            if (one.toLowerCase().startsWith(s.toLowerCase())) {
+            if (one.toLowerCase(Locale.ENGLISH)
+                    .startsWith(s.toLowerCase(Locale.ENGLISH))) {
                 match[nmatch++] = i;
             } else {
                 StringBuffer sb = new StringBuffer();
@@ -3368,9 +3456,9 @@
             // Honoring requested extensions
             if (reqex != null) {
                 for(String extstr: extstrs) {
-                    if (extstr.toLowerCase().startsWith("honored=")) {
+                    if (extstr.toLowerCase(Locale.ENGLISH).startsWith("honored=")) {
                         List<String> list = Arrays.asList(
-                                extstr.toLowerCase().substring(8).split(","));
+                                extstr.toLowerCase(Locale.ENGLISH).substring(8).split(","));
                         // First check existence of "all"
                         if (list.contains("all")) {
                             ext = reqex;    // we know ext was null
@@ -3687,227 +3775,69 @@
      * Prints the usage of this tool.
      */
     private void usage() {
-        System.err.println(rb.getString("keytool usage:\n"));
-
-        System.err.println(rb.getString
-                ("-certreq     [-v] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>] [-sigalg <sigalg>]"));
-        System.err.println(rb.getString
-                ("\t     [-dname <dname>]"));
-        System.err.println(rb.getString
-                ("\t     [-file <csr_file>] [-keypass <keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-changealias [-v] [-protected] -alias <alias> -destalias <destalias>"));
-        System.err.println(rb.getString
-                ("\t     [-keypass <keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-delete      [-v] [-protected] -alias <alias>"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-exportcert  [-v] [-rfc] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>] [-file <cert_file>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-genkeypair  [-v] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>]"));
-        System.err.println(rb.getString
-                ("\t     [-keyalg <keyalg>] [-keysize <keysize>]"));
-        System.err.println(rb.getString
-                ("\t     [-sigalg <sigalg>] [-dname <dname>]"));
-        System.err.println(rb.getString
-                ("\t     [-startdate <startdate>]"));
-        System.err.println(rb.getString
-                ("\t     [-ext <key>[:critical][=<value>]]..."));
-        System.err.println(rb.getString
-                ("\t     [-validity <valDays>] [-keypass <keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-gencert     [-v] [-rfc] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-infile <infile>] [-outfile <outfile>]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>]"));
-        System.err.println(rb.getString
-                ("\t     [-dname <dname>]"));
-        System.err.println(rb.getString
-                ("\t     [-sigalg <sigalg>]"));
-        System.err.println(rb.getString
-                ("\t     [-startdate <startdate>]"));
-        System.err.println(rb.getString
-                ("\t     [-ext <key>[:critical][=<value>]]..."));
-        System.err.println(rb.getString
-                ("\t     [-validity <valDays>] [-keypass <keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-genseckey   [-v] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>] [-keypass <keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keyalg <keyalg>] [-keysize <keysize>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString("-help"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-importcert  [-v] [-noprompt] [-trustcacerts] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>]"));
-        System.err.println(rb.getString
-                ("\t     [-file <cert_file>] [-keypass <keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-importkeystore [-v] "));
-        System.err.println(rb.getString
-                ("\t     [-srckeystore <srckeystore>] [-destkeystore <destkeystore>]"));
-        System.err.println(rb.getString
-                ("\t     [-srcstoretype <srcstoretype>] [-deststoretype <deststoretype>]"));
-        System.err.println(rb.getString
-                ("\t     [-srcstorepass <srcstorepass>] [-deststorepass <deststorepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-srcprotected] [-destprotected]"));
-        System.err.println(rb.getString
-                ("\t     [-srcprovidername <srcprovidername>]\n\t     [-destprovidername <destprovidername>]"));
-        System.err.println(rb.getString
-                ("\t     [-srcalias <srcalias> [-destalias <destalias>]"));
-        System.err.println(rb.getString
-                ("\t       [-srckeypass <srckeypass>] [-destkeypass <destkeypass>]]"));
-        System.err.println(rb.getString
-                ("\t     [-noprompt]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-keypasswd   [-v] [-alias <alias>]"));
-        System.err.println(rb.getString
-                ("\t     [-keypass <old_keypass>] [-new <new_keypass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-list        [-v | -rfc] [-protected]"));
-        System.err.println(rb.getString
-                ("\t     [-alias <alias>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-printcert   [-v] [-rfc] [-file <cert_file> | -sslserver <host[:port]>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-printcertreq   [-v] [-file <cert_file>]"));
-        System.err.println();
-
-        System.err.println(rb.getString
-                ("-storepasswd [-v] [-new <new_storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-keystore <keystore>] [-storepass <storepass>]"));
-        System.err.println(rb.getString
-                ("\t     [-storetype <storetype>] [-providername <name>]"));
-        System.err.println(rb.getString
-                ("\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."));
-        System.err.println(rb.getString
-                ("\t     [-providerpath <pathlist>]"));
+        if (command != null) {
+            System.err.println("keytool " + command +
+                    rb.getString(" [OPTION]..."));
+            System.err.println();
+            System.err.println(rb.getString(command.description));
+            System.err.println();
+            System.err.println(rb.getString("Options:"));
+            System.err.println();
+
+            // Left and right sides of the options list
+            String[] left = new String[command.options.length];
+            String[] right = new String[command.options.length];
+
+            // Check if there's an unknown option
+            boolean found = false;
+
+            // Length of left side of options list
+            int lenLeft = 0;
+            for (int j=0; j<left.length; j++) {
+                for (String[] opt: options) {
+                    if (collator.compare(opt[0], command.options[j]) == 0) {
+                        left[j] = opt[0];
+                        if (opt[1] != null) left[j] += " " + opt[1];
+                        if (left[j].length() > lenLeft) {
+                            lenLeft = left[j].length();
+                        }
+                        right[j] = rb.getString(opt[2]);
+                        found = true;
+                        break;
+                    }
+                }
+                if (!found) {
+                    throw new RuntimeException("ERROR: CANNOT FIND " + command.options[j]);
+                }
+            }
+            for (int j=0; j<left.length; j++) {
+                System.err.printf(" %-" + lenLeft + "s  %s\n",
+                        left[j], right[j]);
+            }
+            System.err.println();
+            System.err.println(rb.getString(
+                    "Use \"keytool -help\" for all available commands"));
+        } else {
+            System.err.println(rb.getString(
+                    "Key and Certificate Management Tool"));
+            System.err.println();
+            System.err.println(rb.getString("Commands:"));
+            System.err.println();
+            for (Command c: Command.values()) {
+                if (c != IDENTITYDB
+                        && c != KEYCLONE
+                        && c != SELFCERT) {     // Deprecated commands
+                    System.err.printf(" %-20s%s\n", c, rb.getString(c.description));
+                }
+            }
+            System.err.println();
+            System.err.println(rb.getString(
+                    "Use \"keytool -command_name -help\" for usage of command_name"));
+        }
     }
 
     private void tinyHelp() {
-        System.err.println(rb.getString("Try keytool -help"));
-
-        // do not drown user with the help lines.
+        usage();
         if (debug) {
             throw new RuntimeException("NO BIG ERROR, SORRY");
         } else {
@@ -3921,6 +3851,61 @@
                 rb.getString("Command option <flag> needs an argument.")).format(source));
         tinyHelp();
     }
+
+    private char[] getPass(String modifier, String arg) {
+        char[] output = getPassWithModifier(modifier, arg);
+        if (output != null) return output;
+        tinyHelp();
+        return null;    // Useless, tinyHelp() already exits.
+    }
+
+    // This method also used by JarSigner
+    public static char[] getPassWithModifier(String modifier, String arg) {
+        if (modifier == null) {
+            return arg.toCharArray();
+        } else if (collator.compare(modifier, "env") == 0) {
+            String value = System.getenv(arg);
+            if (value == null) {
+                System.err.println(rb.getString(
+                        "Cannot find environment variable: ") + arg);
+                return null;
+            } else {
+                return value.toCharArray();
+            }
+        } else if (collator.compare(modifier, "file") == 0) {
+            try {
+                URL url = null;
+                try {
+                    url = new URL(arg);
+                } catch (java.net.MalformedURLException mue) {
+                    File f = new File(arg);
+                    if (f.exists()) {
+                        url = f.toURI().toURL();
+                    } else {
+                        System.err.println(rb.getString(
+                                "Cannot find file: ") + arg);
+                        return null;
+                    }
+                }
+                BufferedReader br = new BufferedReader(new InputStreamReader(
+                            url.openStream()));
+                String value = br.readLine();
+                br.close();
+                if (value == null) {
+                    return new char[0];
+                } else {
+                    return value.toCharArray();
+                }
+            } catch (IOException ioe) {
+                System.err.println(ioe);
+                return null;
+            }
+        } else {
+            System.err.println(rb.getString("Unknown password type: ") +
+                    modifier);
+            return null;
+        }
+    }
 }
 
 // This class is exactly the same as com.sun.tools.javac.util.Pair,
@@ -3960,3 +3945,4 @@
         return new Pair<A,B>(a,b);
     }
 }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/security/util/PermissionFactory.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.security.util;
+
+import java.security.Permission;
+
+/**
+ * A factory object that creates Permission objects.
+ */
+
+public interface PermissionFactory<T extends Permission> {
+    T newPermission(String name);
+}
--- a/jdk/src/share/classes/sun/security/util/Resources.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/util/Resources.java	Wed Jul 05 17:01:52 2017 +0200
@@ -46,18 +46,149 @@
         {"*******************************************\n\n",
                 "*******************************************\n\n"},
 
-        // keytool
+        // keytool: Help part
+        {" [OPTION]...", " [OPTION]..."},
+        {"Options:", "Options:"},
+        {"Use \"keytool -help\" for all available commands",
+                 "Use \"keytool -help\" for all available commands"},
+        {"Key and Certificate Management Tool",
+                 "Key and Certificate Management Tool"},
+        {"Commands:", "Commands:"},
+        {"Use \"keytool -command_name -help\" for usage of command_name",
+                "Use \"keytool -command_name -help\" for usage of command_name"},
+        // keytool: help: commands
+        {"Generates a certificate request",
+                "Generates a certificate request"}, //-certreq
+        {"Changes an entry's alias",
+                "Changes an entry's alias"}, //-changealias
+        {"Deletes an entry",
+                "Deletes an entry"}, //-delete
+        {"Exports certificate",
+                "Exports certificate"}, //-exportcert
+        {"Generates a key pair",
+                "Generates a key pair"}, //-genkeypair
+        {"Generates a secret key",
+                "Generates a secret key"}, //-genseckey
+        {"Generates certificate from a certificate request",
+                "Generates certificate from a certificate request"}, //-gencert
+        {"Imports entries from a JDK 1.1.x-style identity database",
+                "Imports entries from a JDK 1.1.x-style identity database"}, //-identitydb
+        {"Imports a certificate or a certificate chain",
+                "Imports a certificate or a certificate chain"}, //-importcert
+        {"Imports one or all entries from another keystore",
+                "Imports one or all entries from another keystore"}, //-importkeystore
+        {"Clones a key entry",
+                "Clones a key entry"}, //-keyclone
+        {"Changes the key password of an entry",
+                "Changes the key password of an entry"}, //-keypasswd
+        {"Lists entries in a keystore",
+                "Lists entries in a keystore"}, //-list
+        {"Prints the content of a certificate",
+                "Prints the content of a certificate"}, //-printcert
+        {"Prints the content of a certificate request",
+                "Prints the content of a certificate request"}, //-printcertreq
+        {"Generates a self-signed certificate",
+                "Generates a self-signed certificate"}, //-selfcert
+        {"Changes the store password of a keystore",
+                "Changes the store password of a keystore"}, //-storepasswd
+        // keytool: help: options
+        {"alias name of the entry to process",
+                "alias name of the entry to process"}, //-alias
+        {"destination alias",
+                "destination alias"}, //-destalias
+        {"destination key password",
+                "destination key password"}, //-destkeypass
+        {"destination keystore name",
+                "destination keystore name"}, //-destkeystore
+        {"destination keystore password protected",
+                "destination keystore password protected"}, //-destprotected
+        {"destination keystore provider name",
+                "destination keystore provider name"}, //-destprovidername
+        {"destination keystore password",
+                "destination keystore password"}, //-deststorepass
+        {"destination keystore type",
+                "destination keystore type"}, //-deststoretype
+        {"distinguished name",
+                "distinguished name"}, //-dname
+        {"X.509 extension",
+                "X.509 extension"}, //-ext
+        {"output file name",
+                "output file name"}, //-file
+        {"input file name",
+                "input file name"}, //-file
+        {"input file name",
+                "input file name"}, //-infile
+        {"key algorithm name",
+                "key algorithm name"}, //-keyalg
+        {"key password",
+                "key password"}, //-keypass
+        {"key bit size",
+                "key bit size"}, //-keysize
+        {"keystore name",
+                "keystore name"}, //-keystore
+        {"new password",
+                "new password"}, //-new
+        {"do not prompt",
+                "do not prompt"}, //-noprompt
+        {"output file name",
+                "output file name"}, //-outfile
+        {"password through protected mechanism",
+                "password through protected mechanism"}, //-protected
+        {"provider argument",
+                "provider argument"}, //-providerarg
+        {"provider class name",
+                "provider class name"}, //-providerclass
+        {"provider name",
+                "provider name"}, //-providername
+        {"provider classpath",
+                "provider classpath"}, //-providerpath
+        {"output in RFC style",
+                "output in RFC style"}, //-rfc
+        {"signature algorithm name",
+                "signature algorithm name"}, //-sigalg
+        {"source alias",
+                "source alias"}, //-srcalias
+        {"source keystore password",
+                "source keystore password"}, //-srckeypass
+        {"source keystore name",
+                "source keystore name"}, //-srckeystore
+        {"source keystore password protected",
+                "source keystore password protected"}, //-srcprotected
+        {"source keystore provider name",
+                "source keystore provider name"}, //-srcprovidername
+        {"source keystore password",
+                "source keystore password"}, //-srcstorepass
+        {"source keystore type",
+                "source keystore type"}, //-srcstoretype
+        {"SSL server host and port",
+                "SSL server host and port"}, //-sslserver
+        {"certificate validity start date/time",
+                "certificate validity start date/time"}, //-startdate
+        {"keystore password",
+                "keystore password"}, //-storepass
+        {"keystore type",
+                "keystore type"}, //-storetype
+        {"trust certificates from cacerts",
+                "trust certificates from cacerts"}, //-trustcacerts
+        {"verbose output",
+                "verbose output"}, //-v
+        {"validity number of days",
+                "validity number of days"}, //-validity
+        // keytool: Running part
         {"keytool error: ", "keytool error: "},
         {"Illegal option:  ", "Illegal option:  "},
         {"Illegal value: ", "Illegal value: "},
-        {"Try keytool -help","Try keytool -help"},
+        {"Unknown password type: ", "Unknown password type: "},
+        {"Cannot find environment variable: ",
+                "Cannot find environment variable: "},
+        {"Cannot find file: ", "Cannot find file: "},
         {"Command option <flag> needs an argument.", "Command option {0} needs an argument."},
         {"Warning:  Different store and key passwords not supported for PKCS12 KeyStores. Ignoring user-specified <command> value.",
                 "Warning:  Different store and key passwords not supported for PKCS12 KeyStores. Ignoring user-specified {0} value."},
         {"-keystore must be NONE if -storetype is {0}",
                 "-keystore must be NONE if -storetype is {0}"},
-        {"Too may retries, program terminated",
-                 "Too may retries, program terminated"},
+        {"Too many retries, program terminated",
+                 "Too many retries, program terminated"},
         {"-storepasswd and -keypasswd commands not supported if -storetype is {0}",
                 "-storepasswd and -keypasswd commands not supported if -storetype is {0}"},
         {"-keypasswd commands not supported if -storetype is PKCS12",
@@ -77,7 +208,6 @@
                 "Validity must be greater than zero"},
         {"provName not a provider", "{0} not a provider"},
         {"Usage error: no command provided", "Usage error: no command provided"},
-        {"Usage error, <arg> is not a legal command", "Usage error, {0} is not a legal command"},
         {"Source keystore file exists, but is empty: ", "Source keystore file exists, but is empty: "},
         {"Please specify -srckeystore", "Please specify -srckeystore"},
         {"Must not specify both -v and -rfc with 'list' command",
@@ -279,7 +409,6 @@
                 "Secret Key not generated, alias <{0}> already exists"},
         {"Please provide -keysize for secret key generation",
                 "Please provide -keysize for secret key generation"},
-        {"keytool usage:\n", "keytool usage:\n"},
 
         {"Extensions: ", "Extensions: "},
         {"(Empty value)", "(Empty value)"},
@@ -297,139 +426,6 @@
         {"Odd number of hex digits found: ", "Odd number of hex digits found: "},
         {"command {0} is ambiguous:", "command {0} is ambiguous:"},
 
-        {"-certreq     [-v] [-protected]",
-                "-certreq     [-v] [-protected]"},
-        {"\t     [-alias <alias>] [-sigalg <sigalg>]",
-                "\t     [-alias <alias>] [-sigalg <sigalg>]"},
-        {"\t     [-dname <dname>]", "\t     [-dname <dname>]"},
-        {"\t     [-file <csr_file>] [-keypass <keypass>]",
-                "\t     [-file <csr_file>] [-keypass <keypass>]"},
-        {"\t     [-keystore <keystore>] [-storepass <storepass>]",
-                "\t     [-keystore <keystore>] [-storepass <storepass>]"},
-        {"\t     [-storetype <storetype>] [-providername <name>]",
-                "\t     [-storetype <storetype>] [-providername <name>]"},
-        {"\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ...",
-                "\t     [-providerclass <provider_class_name> [-providerarg <arg>]] ..."},
-        {"\t     [-providerpath <pathlist>]",
-                "\t     [-providerpath <pathlist>]"},
-        {"-delete      [-v] [-protected] -alias <alias>",
-                "-delete      [-v] [-protected] -alias <alias>"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        //{"-export      [-v] [-rfc] [-protected]",
-        //       "-export      [-v] [-rfc] [-protected]"},
-        {"-exportcert  [-v] [-rfc] [-protected]",
-                "-exportcert  [-v] [-rfc] [-protected]"},
-        {"\t     [-alias <alias>] [-file <cert_file>]",
-                "\t     [-alias <alias>] [-file <cert_file>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        //{"-genkey      [-v] [-protected]",
-        //        "-genkey      [-v] [-protected]"},
-        {"-genkeypair  [-v] [-protected]",
-                "-genkeypair  [-v] [-protected]"},
-        {"\t     [-alias <alias>]", "\t     [-alias <alias>]"},
-        {"\t     [-keyalg <keyalg>] [-keysize <keysize>]",
-                "\t     [-keyalg <keyalg>] [-keysize <keysize>]"},
-        {"\t     [-sigalg <sigalg>] [-dname <dname>]",
-                "\t     [-sigalg <sigalg>] [-dname <dname>]"},
-        {"\t     [-startdate <startdate>]",
-                "\t     [-startdate <startdate>]"},
-        {"\t     [-validity <valDays>] [-keypass <keypass>]",
-                "\t     [-validity <valDays>] [-keypass <keypass>]"},
-        /** rest is same as -certreq starting from -keystore **/
-        {"-gencert     [-v] [-rfc] [-protected]",
-                "-gencert     [-v] [-rfc] [-protected]"},
-        {"\t     [-infile <infile>] [-outfile <outfile>]",
-                 "\t     [-infile <infile>] [-outfile <outfile>]"},
-        {"\t     [-sigalg <sigalg>]",
-                "\t     [-sigalg <sigalg>]"},
-        {"\t     [-ext <key>[:critical][=<value>]]...",
-                "\t     [-ext <key>[:critical][=<value>]]..."},
-
-        {"-genseckey   [-v] [-protected]",
-                "-genseckey   [-v] [-protected]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-help", "-help"},
-        //{"-identitydb  [-v] [-protected]",
-        //      "-identitydb  [-v] [-protected]"},
-        //{"\t     [-file <idb_file>]", "\t     [-file <idb_file>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        //{"-import      [-v] [-noprompt] [-trustcacerts] [-protected]",
-        //       "-import      [-v] [-noprompt] [-trustcacerts] [-protected]"},
-        {"-importcert  [-v] [-noprompt] [-trustcacerts] [-protected]",
-                "-importcert  [-v] [-noprompt] [-trustcacerts] [-protected]"},
-        {"\t     [-alias <alias>]", "\t     [-alias <alias>]"},
-        {"\t     [-alias <alias>] [-keypass <keypass>]",
-            "\t     [-alias <alias>] [-keypass <keypass>]"},
-        {"\t     [-file <cert_file>] [-keypass <keypass>]",
-                "\t     [-file <cert_file>] [-keypass <keypass>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-importkeystore [-v] ",
-                "-importkeystore [-v] "},
-        {"\t     [-srckeystore <srckeystore>] [-destkeystore <destkeystore>]",
-                "\t     [-srckeystore <srckeystore>] [-destkeystore <destkeystore>]"},
-        {"\t     [-srcstoretype <srcstoretype>] [-deststoretype <deststoretype>]",
-                "\t     [-srcstoretype <srcstoretype>] [-deststoretype <deststoretype>]"},
-        {"\t     [-srcprotected] [-destprotected]",
-                "\t     [-srcprotected] [-destprotected]"},
-        {"\t     [-srcstorepass <srcstorepass>] [-deststorepass <deststorepass>]",
-                "\t     [-srcstorepass <srcstorepass>] [-deststorepass <deststorepass>]"},
-        {"\t     [-srcprovidername <srcprovidername>]\n\t     [-destprovidername <destprovidername>]",  // line too long, split to 2
-                 "\t     [-srcprovidername <srcprovidername>]\n\t     [-destprovidername <destprovidername>]"},
-        {"\t     [-srcalias <srcalias> [-destalias <destalias>]",
-                "\t     [-srcalias <srcalias> [-destalias <destalias>]"},
-        {"\t       [-srckeypass <srckeypass>] [-destkeypass <destkeypass>]]",
-                "\t       [-srckeypass <srckeypass>] [-destkeypass <destkeypass>]]"},
-        {"\t     [-noprompt]", "\t     [-noprompt]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-changealias [-v] [-protected] -alias <alias> -destalias <destalias>",
-                "-changealias [-v] [-protected] -alias <alias> -destalias <destalias>"},
-        {"\t     [-keypass <keypass>]", "\t     [-keypass <keypass>]"},
-
-        //{"-keyclone    [-v] [-protected]",
-        //      "-keyclone    [-v] [-protected]"},
-        //{"\t     [-alias <alias>] -dest <dest_alias>",
-        //      "\t     [-alias <alias>] -dest <dest_alias>"},
-        //{"\t     [-keypass <keypass>] [-new <new_keypass>]",
-        //      "\t     [-keypass <keypass>] [-new <new_keypass>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-keypasswd   [-v] [-alias <alias>]",
-                "-keypasswd   [-v] [-alias <alias>]"},
-        {"\t     [-keypass <old_keypass>] [-new <new_keypass>]",
-                "\t     [-keypass <old_keypass>] [-new <new_keypass>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-list        [-v | -rfc] [-protected]",
-                "-list        [-v | -rfc] [-protected]"},
-        {"\t     [-alias <alias>]", "\t     [-alias <alias>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-printcert   [-v] [-rfc] [-file <cert_file> | -sslserver <host[:port]>]",
-                "-printcert   [-v] [-rfc] [-file <cert_file> | -sslserver <host[:port]>]"},
-        {"-printcertreq   [-v] [-file <cert_file>]",
-                 "-printcertreq   [-v] [-file <cert_file>]"},
-        {"No certificate from the SSL server",
-                "No certificate from the SSL server"},
-
-        //{"-selfcert    [-v] [-protected]",
-        //      "-selfcert    [-v] [-protected]"},
-        {"\t     [-alias <alias>]", "\t     [-alias <alias>]"},
-        //{"\t     [-dname <dname>] [-validity <valDays>]",
-        //      "\t     [-dname <dname>] [-validity <valDays>]"},
-        //{"\t     [-keypass <keypass>] [-sigalg <sigalg>]",
-        //      "\t     [-keypass <keypass>] [-sigalg <sigalg>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
-        {"-storepasswd [-v] [-new <new_storepass>]",
-                "-storepasswd [-v] [-new <new_storepass>]"},
-        /** rest is same as -certreq starting from -keystore **/
-
         // policytool
         {"Warning: A public key for alias 'signers[i]' does not exist.  Make sure a KeyStore is properly configured.",
                 "Warning: A public key for alias {0} does not exist.  Make sure a KeyStore is properly configured."},
@@ -679,3 +675,4 @@
         return contents;
     }
 }
+
--- a/jdk/src/share/classes/sun/security/util/SecurityConstants.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/security/util/SecurityConstants.java	Wed Jul 05 17:01:52 2017 +0200
@@ -25,12 +25,12 @@
 
 package sun.security.util;
 
-import java.io.FilePermission;
-import java.awt.AWTPermission;
-import java.util.PropertyPermission;
-import java.lang.RuntimePermission;
 import java.net.SocketPermission;
 import java.net.NetPermission;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.Permission;
+import java.security.BasicPermission;
 import java.security.SecurityPermission;
 import java.security.AllPermission;
 import javax.security.auth.AuthPermission;
@@ -71,45 +71,118 @@
     // sun.security.provider.PolicyFile
     public static final AllPermission ALL_PERMISSION = new AllPermission();
 
-    // java.lang.SecurityManager
-    public static final AWTPermission TOPLEVEL_WINDOW_PERMISSION =
-        new AWTPermission("showWindowWithoutWarningBanner");
-
-    // java.lang.SecurityManager
-    public static final AWTPermission ACCESS_CLIPBOARD_PERMISSION =
-        new AWTPermission("accessClipboard");
+    /**
+     * Permission type used when AWT is not present.
+     */
+    private static class FakeAWTPermission extends BasicPermission {
+        private static final long serialVersionUID = -1L;
+        public FakeAWTPermission(String name) {
+            super(name);
+        }
+        public String toString() {
+            return "(\"java.awt.AWTPermission\" \"" + getName() + "\")";
+        }
+    }
 
-    // java.lang.SecurityManager
-    public static final AWTPermission CHECK_AWT_EVENTQUEUE_PERMISSION =
-        new AWTPermission("accessEventQueue");
+    /**
+     * Permission factory used when AWT is not present.
+     */
+    private static class FakeAWTPermissionFactory
+        implements PermissionFactory<FakeAWTPermission>
+    {
+        @Override
+        public FakeAWTPermission newPermission(String name) {
+            return new FakeAWTPermission(name);
+        }
+    }
 
-    // java.awt.Dialog
-    public static final AWTPermission TOOLKIT_MODALITY_PERMISSION =
-        new AWTPermission("toolkitModality");
+    /**
+     * AWT Permissions used in the JDK.
+     */
+    public static class AWT {
+        private AWT() { }
 
-    // java.awt.Robot
-    public static final AWTPermission READ_DISPLAY_PIXELS_PERMISSION =
-        new AWTPermission("readDisplayPixels");
+        /**
+         * The class name of the factory to create java.awt.AWTPermission objects.
+         */
+        private static final String AWTFactory = "sun.awt.AWTPermissionFactory";
+
+        /**
+         * The PermissionFactory to create AWT permissions (or fake permissions
+         * if AWT is not present).
+         */
+        private static final PermissionFactory<?> factory = permissionFactory();
 
-    // java.awt.Robot
-    public static final AWTPermission CREATE_ROBOT_PERMISSION =
-        new AWTPermission("createRobot");
+        private static PermissionFactory<?> permissionFactory() {
+            Class<?> c = AccessController
+                .doPrivileged(new PrivilegedAction<Class<?>>() {
+                    public Class<?> run() {
+                        try {
+                           return Class.forName(AWTFactory, true, null);
+                        } catch (ClassNotFoundException e) {
+                            // not available
+                            return null;
+                        }
+                    }});
+            if (c != null) {
+                // AWT present
+                try {
+                    return (PermissionFactory<?>)c.newInstance();
+                } catch (InstantiationException x) {
+                    throw new InternalError(x.getMessage());
+                } catch (IllegalAccessException x) {
+                    throw new InternalError(x.getMessage());
+                }
+            } else {
+                // AWT not present
+                return new FakeAWTPermissionFactory();
+            }
+        }
 
-    // java.awt.MouseInfo
-    public static final AWTPermission WATCH_MOUSE_PERMISSION =
-        new AWTPermission("watchMousePointer");
+        private static Permission newAWTPermission(String name) {
+            return factory.newPermission(name);
+        }
+
+        // java.lang.SecurityManager
+        public static final Permission TOPLEVEL_WINDOW_PERMISSION =
+            newAWTPermission("showWindowWithoutWarningBanner");
 
-    // java.awt.Window
-    public static final AWTPermission SET_WINDOW_ALWAYS_ON_TOP_PERMISSION =
-        new AWTPermission("setWindowAlwaysOnTop");
+        // java.lang.SecurityManager
+        public static final Permission ACCESS_CLIPBOARD_PERMISSION =
+            newAWTPermission("accessClipboard");
+
+        // java.lang.SecurityManager
+        public static final Permission CHECK_AWT_EVENTQUEUE_PERMISSION =
+            newAWTPermission("accessEventQueue");
+
+        // java.awt.Dialog
+        public static final Permission TOOLKIT_MODALITY_PERMISSION =
+            newAWTPermission("toolkitModality");
+
+        // java.awt.Robot
+        public static final Permission READ_DISPLAY_PIXELS_PERMISSION =
+            newAWTPermission("readDisplayPixels");
 
-    // java.awt.Toolkit
-    public static final AWTPermission ALL_AWT_EVENTS_PERMISSION =
-        new AWTPermission("listenToAllAWTEvents");
+        // java.awt.Robot
+        public static final Permission CREATE_ROBOT_PERMISSION =
+            newAWTPermission("createRobot");
+
+        // java.awt.MouseInfo
+        public static final Permission WATCH_MOUSE_PERMISSION =
+            newAWTPermission("watchMousePointer");
 
-    // java.awt.SystemTray
-    public static final AWTPermission ACCESS_SYSTEM_TRAY_PERMISSION =
-        new AWTPermission("accessSystemTray");
+        // java.awt.Window
+        public static final Permission SET_WINDOW_ALWAYS_ON_TOP_PERMISSION =
+            newAWTPermission("setWindowAlwaysOnTop");
+
+        // java.awt.Toolkit
+        public static final Permission ALL_AWT_EVENTS_PERMISSION =
+            newAWTPermission("listenToAllAWTEvents");
+
+        // java.awt.SystemTray
+        public static final Permission ACCESS_SYSTEM_TRAY_PERMISSION =
+            newAWTPermission("accessSystemTray");
+    }
 
     // java.net.URL
     public static final NetPermission SPECIFY_HANDLER_PERMISSION =
--- a/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Wed Jul 05 17:01:52 2017 +0200
@@ -53,7 +53,7 @@
 import java.io.*;
 import java.util.*;
 import sun.font.FontDesignMetrics;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
 import sun.java2d.SunGraphicsEnvironment;
 
 import java.util.concurrent.Callable;
@@ -193,6 +193,19 @@
     }
 
     /**
+     * Fill the character buffer cache.  Return the buffer length.
+     */
+    private static int syncCharsBuffer(String s) {
+        int length = s.length();
+        if ((charsBuffer == null) || (charsBuffer.length < length)) {
+            charsBuffer = s.toCharArray();
+        } else {
+            s.getChars(0, length, charsBuffer, 0);
+        }
+        return length;
+    }
+
+    /**
      * checks whether TextLayout is required to handle characters.
      *
      * @param text characters to be tested
@@ -202,7 +215,7 @@
      *         <tt>false</tt> if TextLayout is not required
      */
     public static final boolean isComplexLayout(char[] text, int start, int limit) {
-        return FontManager.isComplexText(text, start, limit);
+        return FontUtilities.isComplexText(text, start, limit);
     }
 
     //
@@ -237,15 +250,23 @@
      * Returns the left side bearing of the first character of string. The
      * left side bearing is calculated from the passed in
      * FontMetrics.  If the passed in String is less than one
-     * character, this will throw a StringIndexOutOfBoundsException exception.
+     * character {@code 0} is returned.
      *
      * @param c JComponent that will display the string
      * @param fm FontMetrics used to measure the String width
      * @param string String to get the left side bearing for.
+     * @throws NullPointerException if {@code string} is {@code null}
+     *
+     * @return the left side bearing of the first character of string
+     * or {@code 0} if the string is empty
      */
     public static int getLeftSideBearing(JComponent c, FontMetrics fm,
                                          String string) {
-        return getLeftSideBearing(c, fm, string.charAt(0));
+        int res = 0;
+        if (!string.isEmpty()) {
+            res = getLeftSideBearing(c, fm, string.charAt(0));
+        }
+        return res;
     }
 
     /**
@@ -353,7 +374,21 @@
         if (string == null || string.equals("")) {
             return 0;
         }
-        return fm.stringWidth(string);
+        boolean needsTextLayout = ((c != null) &&
+                (c.getClientProperty(TextAttribute.NUMERIC_SHAPING) != null));
+        if (needsTextLayout) {
+            synchronized(charsBufferLock) {
+                int length = syncCharsBuffer(string);
+                needsTextLayout = isComplexLayout(charsBuffer, 0, length);
+            }
+        }
+        if (needsTextLayout) {
+            TextLayout layout = createTextLayout(c, string,
+                                    fm.getFont(), fm.getFontRenderContext());
+            return (int) layout.getAdvance();
+        } else {
+            return fm.stringWidth(string);
+        }
     }
 
 
@@ -394,21 +429,11 @@
                                     String string, int availTextWidth) {
         // c may be null here.
         String clipString = "...";
-        int stringLength = string.length();
         availTextWidth -= SwingUtilities2.stringWidth(c, fm, clipString);
-        if (availTextWidth <= 0) {
-            //can not fit any characters
-            return clipString;
-        }
-
         boolean needsTextLayout;
 
         synchronized (charsBufferLock) {
-            if (charsBuffer == null || charsBuffer.length < stringLength) {
-                charsBuffer  = string.toCharArray();
-            } else {
-                string.getChars(0, stringLength, charsBuffer, 0);
-            }
+            int stringLength = syncCharsBuffer(string);
             needsTextLayout =
                 isComplexLayout(charsBuffer, 0, stringLength);
             if (!needsTextLayout) {
@@ -425,6 +450,10 @@
         if (needsTextLayout) {
             FontRenderContext frc = getFontRenderContext(c, fm);
             AttributedString aString = new AttributedString(string);
+            if (c != null) {
+                aString.addAttribute(TextAttribute.NUMERIC_SHAPING,
+                        c.getClientProperty(TextAttribute.NUMERIC_SHAPING));
+            }
             LineBreakMeasurer measurer =
                 new LineBreakMeasurer(aString.getIterator(), frc);
             int nChars = measurer.nextOffset(availTextWidth);
@@ -465,7 +494,7 @@
                  */
                 float screenWidth = (float)
                    g2d.getFont().getStringBounds(text, DEFAULT_FRC).getWidth();
-                TextLayout layout = new TextLayout(text, g2d.getFont(),
+                TextLayout layout = createTextLayout(c, text, g2d.getFont(),
                                                    g2d.getFontRenderContext());
 
                 layout = layout.getJustifiedLayout(screenWidth);
@@ -505,7 +534,21 @@
                 }
             }
 
-            g.drawString(text, x, y);
+            boolean needsTextLayout = ((c != null) &&
+                (c.getClientProperty(TextAttribute.NUMERIC_SHAPING) != null));
+            if (needsTextLayout) {
+                synchronized(charsBufferLock) {
+                    int length = syncCharsBuffer(text);
+                    needsTextLayout = isComplexLayout(charsBuffer, 0, length);
+                }
+            }
+            if (needsTextLayout) {
+                TextLayout layout = createTextLayout(c, text, g2.getFont(),
+                                                    g2.getFontRenderContext());
+                layout.draw(g2, x, y);
+            } else {
+                g.drawString(text, x, y);
+            }
 
             if (oldAAValue != null) {
                 g2.setRenderingHint(KEY_TEXT_ANTIALIASING, oldAAValue);
@@ -547,11 +590,7 @@
             boolean needsTextLayout = isPrinting;
             if (!needsTextLayout) {
                 synchronized (charsBufferLock) {
-                    if (charsBuffer == null || charsBuffer.length < textLength) {
-                        charsBuffer = text.toCharArray();
-                    } else {
-                        text.getChars(0, textLength, charsBuffer, 0);
-                    }
+                    syncCharsBuffer(text);
                     needsTextLayout =
                         isComplexLayout(charsBuffer, 0, textLength);
                 }
@@ -567,7 +606,7 @@
                 Graphics2D g2d = getGraphics2D(g);
                 if (g2d != null) {
                     TextLayout layout =
-                        new TextLayout(text, g2d.getFont(),
+                        createTextLayout(c, text, g2d.getFont(),
                                        g2d.getFontRenderContext());
                     if (isPrinting) {
                         float screenWidth = (float)g2d.getFont().
@@ -728,7 +767,7 @@
                     !isFontRenderContextPrintCompatible
                     (deviceFontRenderContext, frc)) {
                     TextLayout layout =
-                        new TextLayout(new String(data,offset,length),
+                        createTextLayout(c, new String(data, offset, length),
                                        g2d.getFont(),
                                        deviceFontRenderContext);
                     float screenWidth = (float)g2d.getFont().
@@ -846,6 +885,20 @@
         return retVal;
     }
 
+    private static TextLayout createTextLayout(JComponent c, String s,
+                                            Font f, FontRenderContext frc) {
+        Object shaper = (c == null ?
+                    null : c.getClientProperty(TextAttribute.NUMERIC_SHAPING));
+        if (shaper == null) {
+            return new TextLayout(s, f, frc);
+        } else {
+            Map<TextAttribute, Object> a = new HashMap<TextAttribute, Object>();
+            a.put(TextAttribute.FONT, f);
+            a.put(TextAttribute.NUMERIC_SHAPING, shaper);
+            return new TextLayout(s, a, frc);
+        }
+    }
+
     /*
      * Checks if two given FontRenderContexts are compatible for printing.
      * We can't just use equals as we want to exclude from the comparison :
--- a/jdk/src/share/native/common/check_code.c	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/common/check_code.c	Wed Jul 05 17:01:52 2017 +0200
@@ -338,7 +338,8 @@
                           int** code_lengths, unsigned char*** code);
 static void verify_method(context_type *context, jclass cb, int index,
                           int code_length, unsigned char* code);
-static void free_all_code(int num_methods, int* lengths, unsigned char** code);
+static void free_all_code(context_type* context, int num_methods,
+                          unsigned char** code);
 static void verify_field(context_type *context, jclass cb, int index);
 
 static void verify_opcode_operands (context_type *, unsigned int inumber, int offset);
@@ -813,11 +814,11 @@
         /* Look at each method */
         for (i = JVM_GetClassFieldsCount(env, cb); --i >= 0;)
             verify_field(context, cb, i);
-  num_methods = JVM_GetClassMethodsCount(env, cb);
-  read_all_code(context, cb, num_methods, &code_lengths, &code);
-  for (i = num_methods - 1; i >= 0; --i)
+        num_methods = JVM_GetClassMethodsCount(env, cb);
+        read_all_code(context, cb, num_methods, &code_lengths, &code);
+        for (i = num_methods - 1; i >= 0; --i)
             verify_method(context, cb, i, code_lengths[i], code[i]);
-  free_all_code(num_methods, code_lengths, code);
+        free_all_code(context, num_methods, code);
         result = CC_OK;
     } else {
         result = context->err_code;
@@ -836,9 +837,6 @@
     if (context->exceptions)
         free(context->exceptions);
 
-    if (context->code)
-        free(context->code);
-
     if (context->constant_types)
         free(context->constant_types);
 
@@ -895,41 +893,42 @@
 read_all_code(context_type* context, jclass cb, int num_methods,
               int** lengths_addr, unsigned char*** code_addr)
 {
-  int* lengths = malloc(sizeof(int) * num_methods);
-  unsigned char** code = malloc(sizeof(unsigned char*) * num_methods);
-
-  *(lengths_addr) = lengths;
-  *(code_addr) = code;
-
-  if (lengths == 0 || code == 0) {
-    CCout_of_memory(context);
-  } else {
+    int* lengths;
+    unsigned char** code;
     int i;
+
+    lengths = malloc(sizeof(int) * num_methods);
+    check_and_push(context, lengths, VM_MALLOC_BLK);
+
+    code = malloc(sizeof(unsigned char*) * num_methods);
+    check_and_push(context, code, VM_MALLOC_BLK);
+
+    *(lengths_addr) = lengths;
+    *(code_addr) = code;
+
     for (i = 0; i < num_methods; ++i) {
-      lengths[i] = JVM_GetMethodIxByteCodeLength(context->env, cb, i);
-      if (lengths[i] != 0) {
-        code[i] = malloc(sizeof(unsigned char) * (lengths[i] + 1));
-        if (code[i] == NULL) {
-          CCout_of_memory(context);
+        lengths[i] = JVM_GetMethodIxByteCodeLength(context->env, cb, i);
+        if (lengths[i] > 0) {
+            code[i] = malloc(sizeof(unsigned char) * (lengths[i] + 1));
+            check_and_push(context, code[i], VM_MALLOC_BLK);
+            JVM_GetMethodIxByteCode(context->env, cb, i, code[i]);
         } else {
-          JVM_GetMethodIxByteCode(context->env, cb, i, code[i]);
+            code[i] = NULL;
         }
-      } else {
-        code[i] = NULL;
-      }
     }
-  }
 }
 
 static void
-free_all_code(int num_methods, int* lengths, unsigned char** code)
+free_all_code(context_type* context, int num_methods, unsigned char** code)
 {
   int i;
   for (i = 0; i < num_methods; ++i) {
-    free(code[i]);
+      if (code[i] != NULL) {
+          pop_and_free(context);
+      }
   }
-  free(lengths);
-  free(code);
+  pop_and_free(context); /* code */
+  pop_and_free(context); /* lengths */
 }
 
 /* Verify the code of one method */
--- a/jdk/src/share/native/sun/awt/giflib/gifalloc.c	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/awt/giflib/gifalloc.c	Wed Jul 05 17:01:52 2017 +0200
@@ -88,6 +88,7 @@
 
     Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
     if (Object->Colors == (GifColorType *) NULL) {
+        free(Object);
         return ((ColorMapObject *) NULL);
     }
 
--- a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -37,6 +37,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
 {
     // NOTE: For now, we'll just pick the first alternative...
@@ -64,3 +66,5 @@
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __ALTERNATESUBSTITUTIONSUBTABLES_H
 #define __ALTERNATESUBSTITUTIONSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "OpenTypeTables.h"
 #include "GlyphSubstitutionTables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct AlternateSetTable
 {
     le_uint16 glyphCount;
@@ -52,4 +59,5 @@
     le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/AnchorTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/AnchorTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "AnchorTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 void AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance,
                             LEPoint &anchor) const
 {
@@ -124,3 +126,6 @@
 
     fontInstance->pixelsToUnits(pixels, anchor);
 }
+
+U_NAMESPACE_END
+
--- a/jdk/src/share/native/sun/font/layout/AnchorTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/AnchorTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,10 +32,17 @@
 #ifndef __ANCHORTABLES_H
 #define __ANCHORTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct AnchorTable
 {
     le_uint16  anchorFormat;
@@ -66,5 +73,7 @@
     void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const;
 };
 
+U_NAMESPACE_END
+#endif
 
-#endif
+
--- a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -49,23 +49,25 @@
 #include "ArabicShaping.h"
 #include "CanonShaping.h"
 
+U_NAMESPACE_BEGIN
+
 le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const
 {
     return fFontInstance->canDisplay((LEUnicode) glyph);
 }
 
-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(
-    const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-    le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ArabicOpenTypeLayoutEngine)
+
+ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
 {
     fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
     fFeatureOrder = TRUE;
 }
 
-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(
-    const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                                                       le_int32 typoFlags)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
 {
     fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
@@ -86,9 +88,8 @@
 // Input: characters
 // Output: characters, char indices, tags
 // Returns: output character count
-le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-    LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -124,8 +125,8 @@
     return count;
 }
 
-void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+                                                      LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -137,24 +138,20 @@
     }
 
     if (fGPOSTable != NULL) {
-        OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count,
-            reverse, glyphStorage, success);
+        OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success);
     } else if (fGDEFTable != NULL) {
         GDEFMarkFilter filter(fGDEFTable);
 
         adjustMarkGlyphs(glyphStorage, &filter, success);
     } else {
-        GlyphDefinitionTableHeader *gdefTable =
-            (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
+        GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
         GDEFMarkFilter filter(gdefTable);
 
         adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
     }
 }
 
-UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(
-    const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
     : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
 {
     fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
@@ -169,8 +166,7 @@
 }
 
 // "glyphs", "indices" -> glyphs, indices
-le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(
-    LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -193,17 +189,14 @@
 
     glyphStorage.adoptCharIndicesArray(tempGlyphStorage);
 
-    ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE,
-        TRUE, glyphStorage, success);
+    ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE, TRUE, glyphStorage, success);
 
     LE_DELETE_ARRAY(tempChars);
 
     return tempGlyphCount;
 }
 
-void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -228,9 +221,8 @@
     }
 }
 
-void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_bool reverse,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+                                                      LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -245,3 +237,6 @@
 
     adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
 }
+
+U_NAMESPACE_END
+
--- a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -43,6 +43,8 @@
 #include "GlyphDefinitionTables.h"
 #include "GlyphPositioningTables.h"
 
+U_NAMESPACE_BEGIN
+
 /**
  * This class implements OpenType layout for Arabic fonts. It overrides
  * the characerProcessing method to assign the correct OpenType feature
@@ -71,8 +73,8 @@
      *
      * @internal
      */
-    ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-        le_int32 languageCode, le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+    ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -87,8 +89,8 @@
      *
      * @internal
      */
-    ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-        le_int32 languageCode, le_int32 typoFlags);
+    ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                               le_int32 typoFlags);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -97,6 +99,20 @@
      */
     virtual ~ArabicOpenTypeLayoutEngine();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
 
     /**
@@ -108,8 +124,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the characters are in a
-     *     right to left directional run
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
      *
      * Output parameters:
      * @param outChars - the output character arrayt
@@ -121,9 +136,8 @@
      *
      * @internal
      */
-    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method applies the GPOS table if it is present, otherwise it ensures that all vowel
@@ -142,11 +156,9 @@
      *
      * @internal
      */
-    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
-    // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
-    // le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
 };
 
@@ -178,8 +190,8 @@
      *
      * @internal
      */
-    UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+    UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                le_int32 typoFlags);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -208,8 +220,7 @@
      *
      * @internal
      */
-    virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
-        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method copies the input characters into the output glyph index array,
@@ -227,8 +238,7 @@
      *
      * @internal
      */
-    virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_bool reverse, le_bool mirror,
+    virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
         LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
@@ -245,8 +255,9 @@
      *
      * @internal
      */
-    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "LEGlyphStorage.h"
 #include "ClassDefinitionTables.h"
 
+U_NAMESPACE_BEGIN
+
 // This table maps Unicode joining types to
 // ShapeTypes.
 const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] =
@@ -102,9 +104,7 @@
 #define markFeatureMask 0x00040000UL
 #define mkmkFeatureMask 0x00020000UL
 
-#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | \
-    markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | \
-    dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
+#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
 
 #define SHAPE_MASK 0xF0000000UL
 
@@ -226,3 +226,5 @@
         adjustTags(erout, 2, glyphStorage);
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ArabicShaping.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ArabicShaping.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __ARABICSHAPING_H
 #define __ARABICSHAPING_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
-class ArabicShaping {
+class ArabicShaping /* not : public UObject because all methods are static */ {
 public:
     // Joining types
     enum JoiningTypes
@@ -74,8 +81,8 @@
 
     typedef le_int32 ShapeType;
 
-    static void shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount,
-        le_int32 charMax, le_bool rightToLeft, LEGlyphStorage &glyphStorage);
+    static void shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
+                      le_bool rightToLeft, LEGlyphStorage &glyphStorage);
 
     static const FeatureMap *getFeatureMap(le_int32 &count);
 
@@ -88,8 +95,8 @@
     static const le_uint8 shapingTypeTable[];
     static const ShapeType shapeTypes[];
 
-    static void adjustTags(le_int32 outIndex, le_int32 shapeOffset,
-        LEGlyphStorage &glyphStorage);
+    static void adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage);
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/AttachmentPosnSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/AttachmentPosnSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __ATTACHMENTPOSITIONINGSUBTABLES_H
 #define __ATTACHMENTPOSITIONINGSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "GlyphPositioningTables.h"
 #include "ValueRecords.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct AttachmentPositioningSubtable : GlyphPositioningSubtable
 {
     Offset    baseCoverageTableOffset;
@@ -55,4 +62,6 @@
     return getGlyphCoverage(baseCoverageTableOffset, baseGlyphID);
 }
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/CanonData.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CanonData.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,8 @@
 #include "LETypes.h"
 #include "CanonShaping.h"
 
+U_NAMESPACE_BEGIN
+
 const le_uint8 CanonShaping::glyphSubstitutionTable[] = {
     0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x01, 0x58, 0x02, 0x86, 0x00, 0x12, 0x61, 0x72, 0x61, 0x62,
     0x00, 0x6E, 0x62, 0x65, 0x6E, 0x67, 0x00, 0x82, 0x63, 0x79, 0x72, 0x6C, 0x00, 0x8E, 0x64, 0x65,
@@ -3773,3 +3775,5 @@
     0x00, 0xDC, 0xD1, 0x85, 0xD1, 0x89, 0x00, 0xE6, 0xD1, 0x8A, 0xD1, 0x8B, 0x00, 0xDC, 0xD1, 0xAA,
     0xD1, 0xAD, 0x00, 0xE6, 0xD2, 0x42, 0xD2, 0x44, 0x00, 0xE6
 };
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,8 +35,9 @@
 #include "GlyphDefinitionTables.h"
 #include "ClassDefinitionTables.h"
 
-void CanonShaping::sortMarks(le_int32 *indices,
-    const le_int32 *combiningClasses, le_int32 index, le_int32 limit)
+U_NAMESPACE_BEGIN
+
+void CanonShaping::sortMarks(le_int32 *indices, const le_int32 *combiningClasses, le_int32 index, le_int32 limit)
 {
     for (le_int32 j = index + 1; j < limit; j += 1) {
         le_int32 i;
@@ -55,13 +56,11 @@
     }
 }
 
-void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount,
-    le_bool rightToLeft, LEUnicode *outChars, LEGlyphStorage &glyphStorage)
+void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft,
+                                LEUnicode *outChars, LEGlyphStorage &glyphStorage)
 {
-    const GlyphDefinitionTableHeader *gdefTable =
-        (const GlyphDefinitionTableHeader *) glyphDefinitionTable;
-    const ClassDefinitionTable *classTable =
-        gdefTable->getMarkAttachClassDefinitionTable();
+    const GlyphDefinitionTableHeader *gdefTable = (const GlyphDefinitionTableHeader *) glyphDefinitionTable;
+    const ClassDefinitionTable *classTable = gdefTable->getMarkAttachClassDefinitionTable();
     le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount);
     le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount);
     LEErrorCode status = LE_NO_ERROR;
@@ -103,3 +102,5 @@
     LE_DELETE_ARRAY(indices);
     LE_DELETE_ARRAY(combiningClasses);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/CanonShaping.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CanonShaping.h	Wed Jul 05 17:01:52 2017 +0200
@@ -34,20 +34,22 @@
 
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
-class CanonShaping
+class CanonShaping /* not : public UObject because all members are static */
 {
 public:
     static const le_uint8 glyphSubstitutionTable[];
     static const le_uint8 glyphDefinitionTable[];
 
-    static void reorderMarks(const LEUnicode *inChars, le_int32 charCount,
-        le_bool rightToLeft, LEUnicode *outChars, LEGlyphStorage &glyphStorage);
+    static void reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft,
+                                   LEUnicode *outChars, LEGlyphStorage &glyphStorage);
 
 private:
-    static void sortMarks(le_int32 *indices, const le_int32 *combiningClasses,
-        le_int32 index, le_int32 limit);
+    static void sortMarks(le_int32 *indices, const le_int32 *combiningClasses, le_int32 index, le_int32 limit);
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 
+U_NAMESPACE_BEGIN
+
 class LEFontInstance;
 
 /**
@@ -43,7 +45,7 @@
  *
  * @internal
  */
-class CharSubstitutionFilter : public LEGlyphFilter
+class CharSubstitutionFilter : public UMemory, public LEGlyphFilter
 {
 private:
     /**
@@ -98,4 +100,7 @@
     le_bool accept(LEGlyphID glyph) const;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "ClassDefinitionTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_int32 ClassDefinitionTable::getGlyphClass(LEGlyphID glyphID) const
 {
     switch(SWAPW(classFormat)) {
@@ -139,3 +141,5 @@
 
     return FALSE;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __CLASSDEFINITIONTABLES_H
 #define __CLASSDEFINITIONTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct ClassDefinitionTable
 {
     le_uint16 classFormat;
@@ -69,4 +76,5 @@
     le_bool hasGlyphClass(le_int32 glyphClass) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertion.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertion.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __CONTEXTUALGLYPHINSERTION_H
 #define __CONTEXTUALGLYPHINSERTION_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "StateTables.h"
 #include "MorphTables.h"
 #include "MorphStateTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct ContextualGlyphInsertionHeader : MorphStateTableHeader
 {
 };
@@ -60,4 +67,5 @@
     ByteOffset markedInsertionListOffset;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,6 +39,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor)
+
 ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
   : StateTableProcessor(morphSubtableHeader)
 {
@@ -57,8 +61,7 @@
     markGlyph = 0;
 }
 
-ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage,
-    le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
 {
     const ContextualGlyphSubstitutionStateEntry *entry = &entryTable[index];
     ByteOffset newState = SWAPW(entry->newStateOffset);
@@ -97,3 +100,5 @@
 void ContextualGlyphSubstitutionProcessor::endStateTable()
 {
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
 #define __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "StateTableProcessor.h"
 #include "ContextualGlyphSubstitution.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class ContextualGlyphSubstitutionProcessor : public StateTableProcessor
@@ -52,6 +59,20 @@
     ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
     virtual ~ContextualGlyphSubstitutionProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     ContextualGlyphSubstitutionProcessor();
 
@@ -62,6 +83,8 @@
     le_int32 markGlyph;
 
     const ContextualGlyphSubstitutionHeader *contextualGlyphSubstitutionHeader;
+
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,18 @@
 #ifndef __CONTEXTUALGLYPHSUBSTITUTION_H
 #define __CONTEXTUALGLYPHSUBSTITUTION_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "StateTables.h"
 #include "MorphTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct ContextualGlyphSubstitutionHeader : MorphStateTableHeader
 {
     ByteOffset  substitutionTableOffset;
@@ -55,4 +62,5 @@
     WordOffset currOffset;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -39,6 +38,8 @@
 #include "CoverageTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 /*
     NOTE: This could be optimized somewhat by keeping track
     of the previous sequenceIndex in the loop and doing next()
@@ -350,7 +351,7 @@
 
 // NOTE: This could be a #define, but that seems to confuse
 // the Visual Studio .NET 2003 compiler on the calls to the
-// GlyphIterator constructor.  It somehow can't decide if
+// GlyphIterator constructor. It somehow can't decide if
 // emptyFeatureList matches an le_uint32 or an le_uint16...
 static const FeatureMask emptyFeatureList = 0x00000000UL;
 
@@ -542,3 +543,5 @@
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __CONTEXTUALSUBSTITUTIONSUBTABLES_H
 #define __CONTEXTUALSUBSTITUTIONSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "GlyphIterator.h"
 #include "LookupProcessor.h"
 
+U_NAMESPACE_BEGIN
+
 struct SubstitutionLookupRecord
 {
     le_uint16  sequenceIndex;
@@ -218,4 +225,5 @@
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/CoverageTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CoverageTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "CoverageTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const
 {
     switch(SWAPW(coverageFormat))
@@ -106,3 +108,5 @@
 
     return startCoverageIndex + (ttGlyphID - firstInRange);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/CoverageTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CoverageTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __COVERAGETABLES_H
 #define __COVERAGETABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct CoverageTable
 {
     le_uint16 coverageFormat;
@@ -58,5 +65,5 @@
     le_int32 getGlyphCoverage(LEGlyphID glyphID) const;
 };
 
-
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -37,6 +37,8 @@
 #include "OpenTypeUtilities.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
 {
     LEGlyphID glyphID       = glyphIterator->getCurrGlyphID();
@@ -68,3 +70,5 @@
 
     return 1;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,10 +32,17 @@
 #ifndef __CURSIVEATTACHMENTSUBTABLES_H
 #define __CURSIVEATTACHMENTSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "GlyphPositioningTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEFontInstance;
 class GlyphIterator;
 
@@ -53,4 +60,7 @@
     le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/DefaultCharMapper.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/DefaultCharMapper.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -32,9 +31,16 @@
 #ifndef __DEFAULTCHARMAPPER_H
 #define __DEFAULTCHARMAPPER_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 
+U_NAMESPACE_BEGIN
+
 /**
  * This class is an instance of LECharMapper which
  * implements control character filtering and bidi
@@ -42,7 +48,7 @@
  *
  * @see LECharMapper
  */
-class DefaultCharMapper : public LECharMapper
+class DefaultCharMapper : public UMemory, public LECharMapper
 {
 private:
     le_bool fFilterControls;
@@ -77,4 +83,5 @@
     LEUnicode32 mapChar(LEUnicode32 ch) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/DeviceTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/DeviceTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998 - 2005 - All Rights Reserved
  *
  */
@@ -34,6 +35,8 @@
 #include "DeviceTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 const le_uint16 DeviceTable::fieldMasks[]    = {0x0003, 0x000F, 0x00FF};
 const le_uint16 DeviceTable::fieldSignBits[] = {0x0002, 0x0008, 0x0080};
 const le_uint16 DeviceTable::fieldBits[]     = {     2,      4,      8};
@@ -62,3 +65,5 @@
 
     return result;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/DeviceTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/DeviceTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -32,10 +33,15 @@
 #ifndef __DEVICETABLES_H
 #define __DEVICETABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
-#include "GlyphIterator.h"
-#include "GlyphPositionAdjustments.h"
+
+U_NAMESPACE_BEGIN
 
 struct DeviceTable
 {
@@ -52,5 +58,7 @@
     static const le_uint16 fieldBits[];
 };
 
+U_NAMESPACE_END
+#endif
 
-#endif
+
--- a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,7 +25,8 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 2003 - All Rights Reserved
+ *
+ * (C) Copyright IBM Corp. 2002 - All Rights Reserved
  *
  */
 
@@ -37,6 +38,9 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+
 // FIXME: should look at the format too... maybe have a sub-class for it?
 le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
                                       GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
@@ -52,3 +56,5 @@
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 2002-2003 - All Rights Reserved
  *
  */
@@ -32,12 +33,19 @@
 #ifndef __EXTENSIONSUBTABLES_H
 #define __EXTENSIONSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "GlyphSubstitutionTables.h"
 #include "LookupProcessor.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct ExtensionSubtable //: GlyphSubstitutionSubtable
 {
     le_uint16 substFormat;
@@ -48,4 +56,5 @@
                       GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/Features.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/Features.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
@@ -35,6 +36,8 @@
 #include "Features.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 const FeatureTable *FeatureListTable::getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const
 {
     if (featureIndex >= SWAPW(featureCount)) {
@@ -79,3 +82,5 @@
     return 0;
 #endif
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/Features.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/Features.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __FEATURES_H
 #define __FEATURES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct FeatureRecord
 {
     ATag        featureTag;
@@ -53,9 +60,10 @@
     le_uint16           featureCount;
     FeatureRecord       featureRecordArray[ANY_NUMBER];
 
-    const FeatureTable *getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const;
+    const FeatureTable  *getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const;
 
     const FeatureTable *getFeatureTable(LETag featureTag) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,8 @@
 #include "GDEFMarkFilter.h"
 #include "GlyphDefinitionTables.h"
 
+U_NAMESPACE_BEGIN
+
 GDEFMarkFilter::GDEFMarkFilter(const GlyphDefinitionTableHeader *gdefTable)
 {
     classDefTable = gdefTable->getGlyphClassDefinitionTable();
@@ -50,3 +52,5 @@
 
     return glyphClass == gcdMarkGlyph;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,18 @@
 #ifndef __GDEFMARKFILTER__H
 #define __GDEFMARKFILTER__H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "GlyphDefinitionTables.h"
 
-class GDEFMarkFilter : public LEGlyphFilter
+U_NAMESPACE_BEGIN
+
+class GDEFMarkFilter : public UMemory, public LEGlyphFilter
 {
 private:
     const GlyphClassDefinitionTable *classDefTable;
@@ -51,5 +58,5 @@
     virtual le_bool accept(LEGlyphID glyph) const;
 };
 
-
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -23,6 +23,7 @@
  *
  */
 
+
 /*
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -36,8 +37,11 @@
 
 #include "MorphTables.h"
 
-GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-    le_int32 languageCode, const MorphTableHeader *morphTable)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine)
+
+GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable)
     : LayoutEngine(fontInstance, scriptCode, languageCode, 0), fMorphTable(morphTable)
 {
     // nothing else to do?
@@ -49,9 +53,7 @@
 }
 
 // apply 'mort' table
-le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
-    LEErrorCode &success)
+le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -74,9 +76,8 @@
 }
 
 // apply positional tables
-void GXLayoutEngine::adjustGlyphPositions(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_bool /*reverse*/,
-    LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success)
+void GXLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/,
+                                          LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -89,3 +90,5 @@
 
     // FIXME: no positional processing yet...
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GXLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -23,6 +23,7 @@
  *
  */
 
+
 /*
  *
  * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
@@ -37,6 +38,8 @@
 
 #include "MorphTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEFontInstance;
 class LEGlyphStorage;
 
@@ -70,8 +73,7 @@
      *
      * @internal
      */
-    GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-        le_int32 languageCode, const MorphTableHeader *morphTable);
+    GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -80,6 +82,20 @@
      */
     virtual ~GXLayoutEngine();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
 
     /**
@@ -99,10 +115,8 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the text is in a
-     *    right to left directional run
-     * @param glyphStorage - the glyph storage object. The glyph
-     *    and char index arrays will be set.
+     * @param rightToLeft - <code>TRUE</code> if the text is in a right to left directional run
+     * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
@@ -111,8 +125,7 @@
      *
      * @internal
      */
-    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
+    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
         LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
@@ -120,16 +133,18 @@
      * 'kern', 'trak', 'bsln', 'opbd' and 'just' tables.
      *
      * Input parameters:
-     * @param glyphStorage - the object holding the glyph storage.
-     *     The positions will be updated as needed.
+     * @param glyphStorage - the object holding the glyph storage. The positions will be updated as needed.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
      *
      * @internal
      */
-    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+                                      LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,8 @@
 #include "GlyphDefinitionTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 const GlyphClassDefinitionTable *GlyphDefinitionTableHeader::getGlyphClassDefinitionTable() const
 {
     return (const GlyphClassDefinitionTable *) ((char *) this + SWAPW(glyphClassDefOffset));
@@ -53,3 +55,5 @@
 {
     return (const MarkAttachClassDefinitionTable *) ((char *) this + SWAPW(MarkAttachClassDefOffset));
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,10 +32,17 @@
 #ifndef __GLYPHDEFINITIONTABLES_H
 #define __GLYPHDEFINITIONTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "ClassDefinitionTables.h"
 
+U_NAMESPACE_BEGIN
+
 typedef ClassDefinitionTable GlyphClassDefinitionTable;
 
 enum GlyphClassDefinitions
@@ -110,4 +117,5 @@
     const MarkAttachClassDefinitionTable *getMarkAttachClassDefinitionTable() const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,11 +38,10 @@
 #include "Lookups.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
 
-GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage,
-    GlyphPositionAdjustments *theGlyphPositionAdjustments,
-    le_bool rightToLeft, le_uint16 theLookupFlags, FeatureMask theFeatureMask,
-    const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
+GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
+                             FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
   : direction(1), position(-1), nextLimit(-1), prevLimit(-1),
     glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments),
     srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask),
@@ -262,8 +261,8 @@
     glyphPositionAdjustments->setBaseOffset(position, baseOffset);
 }
 
-void GlyphIterator::adjustCurrGlyphPositionAdjustment(float xPlacementAdjust,
-    float yPlacementAdjust, float xAdvanceAdjust, float yAdvanceAdjust)
+void GlyphIterator::adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
+                                                      float xAdvanceAdjust, float yAdvanceAdjust)
 {
     if (direction < 0) {
         if (position <= nextLimit || position >= prevLimit) {
@@ -281,8 +280,8 @@
     glyphPositionAdjustments->adjustYAdvance(position, yAdvanceAdjust);
 }
 
-void GlyphIterator::setCurrGlyphPositionAdjustment(float xPlacementAdjust,
-    float yPlacementAdjust, float xAdvanceAdjust, float yAdvanceAdjust)
+void GlyphIterator::setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
+                                                      float xAdvanceAdjust, float yAdvanceAdjust)
 {
     if (direction < 0) {
         if (position <= nextLimit || position >= prevLimit) {
@@ -484,10 +483,11 @@
 
     do {
         newPosition -= direction;
-    } while (newPosition != prevLimit && glyphStorage[newPosition] != 0xFFFE &&
-        filterGlyph(newPosition));
+    } while (newPosition != prevLimit && glyphStorage[newPosition] != 0xFFFE && filterGlyph(newPosition));
 
     position = newPosition;
 
     return position != prevLimit;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphIterator.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphIterator.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,26 +32,24 @@
 #ifndef __GLYPHITERATOR_H
 #define __GLYPHITERATOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "GlyphDefinitionTables.h"
 
-struct InsertionRecord
-{
-    InsertionRecord *next;
-    le_int32 position;
-    le_int32 count;
-    LEGlyphID glyphs[ANY_NUMBER];
-};
+U_NAMESPACE_BEGIN
 
 class LEGlyphStorage;
 class GlyphPositionAdjustments;
 
-class GlyphIterator {
+class GlyphIterator : public UMemory {
 public:
-    GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments,
-        le_bool rightToLeft, le_uint16 theLookupFlags, FeatureMask theFeatureMask,
-        const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
+    GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
+        FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
 
     GlyphIterator(GlyphIterator &that);
 
@@ -122,4 +120,5 @@
     GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GlyphLookupTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphLookupTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "GlyphLookupTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_bool GlyphLookupTableHeader::coversScript(LETag scriptTag) const
 {
     const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
@@ -51,3 +53,5 @@
     // Note: don't have to SWAPW langSysTable->featureCount to check for non-zero.
     return langSysTable != NULL && langSysTable->featureCount != 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphLookupTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphLookupTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __GLYPHLOOKUPTABLES_H
 #define __GLYPHLOOKUPTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct GlyphLookupTableHeader
 {
     fixed32 version;
@@ -46,4 +53,7 @@
     le_bool coversScriptAndLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
 };
 
+U_NAMESPACE_END
+
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/GlyphPositionAdjustments.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphPositionAdjustments.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,8 @@
 #include "LEGlyphStorage.h"
 #include "LEFontInstance.h"
 
+U_NAMESPACE_BEGIN
+
 #define CHECK_ALLOCATE_ARRAY(array, type, size) \
     if (array == NULL) { \
         array = (type *) new type[size]; \
@@ -185,3 +187,5 @@
 
     return NULL;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphPositionAdjustments.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphPositionAdjustments.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,16 +32,23 @@
 #ifndef __GLYPHPOSITIONADJUSTMENTS_H
 #define __GLYPHPOSITIONADJUSTMENTS_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 class LEFontInstance;
 
-class GlyphPositionAdjustments
+class GlyphPositionAdjustments : public UMemory
 {
 private:
-    class Adjustment {
+    class Adjustment : public UMemory {
     public:
 
         inline Adjustment();
@@ -78,7 +85,7 @@
         // allow copying of this class because all of its fields are simple types
     };
 
-    class EntryExitPoint
+    class EntryExitPoint : public UMemory
     {
     public:
         inline EntryExitPoint();
@@ -144,14 +151,11 @@
     inline void adjustXAdvance(le_int32 index, float xAdjustment);
     inline void adjustYAdvance(le_int32 index, float yAdjustment);
 
-    void setEntryPoint(le_int32 index, LEPoint &newEntryPoint,
-        le_bool baselineIsLogicalEnd);
-    void setExitPoint(le_int32 index, LEPoint &newExitPoint,
-        le_bool baselineIsLogicalEnd);
+    void setEntryPoint(le_int32 index, LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd);
+    void setExitPoint(le_int32 index, LEPoint &newExitPoint, le_bool baselineIsLogicalEnd);
     void setCursiveGlyph(le_int32 index, le_bool baselineIsLogicalEnd);
 
-    void applyCursiveAdjustments(LEGlyphStorage &glyphStorage, le_bool rightToLeft,
-        const LEFontInstance *fontInstance);
+    void applyCursiveAdjustments(LEGlyphStorage &glyphStorage, le_bool rightToLeft, const LEFontInstance *fontInstance);
 };
 
 inline GlyphPositionAdjustments::Adjustment::Adjustment()
@@ -160,10 +164,8 @@
     // nothing else to do!
 }
 
-inline GlyphPositionAdjustments::Adjustment::Adjustment(float xPlace, float yPlace,
-    float xAdv, float yAdv, le_int32 baseOff)
-  : xPlacement(xPlace), yPlacement(yPlace), xAdvance(xAdv), yAdvance(yAdv),
-    baseOffset(baseOff)
+inline GlyphPositionAdjustments::Adjustment::Adjustment(float xPlace, float yPlace, float xAdv, float yAdv, le_int32 baseOff)
+  : xPlacement(xPlace), yPlacement(yPlace), xAdvance(xAdv), yAdvance(yAdv), baseOffset(baseOff)
 {
     // nothing else to do!
 }
@@ -246,7 +248,7 @@
 inline GlyphPositionAdjustments::EntryExitPoint::EntryExitPoint()
     : fFlags(0)
 {
-    fEntryPoint.fX = fEntryPoint.fY = fExitPoint.fX = fEntryPoint.fY = 0;
+    fEntryPoint.fX = fEntryPoint.fY = fExitPoint.fX = fExitPoint.fY = 0;
 }
 
 inline GlyphPositionAdjustments::EntryExitPoint::~EntryExitPoint()
@@ -264,12 +266,10 @@
     return (fFlags & EEF_BASELINE_IS_LOGICAL_END) != 0;
 }
 
-inline void GlyphPositionAdjustments::EntryExitPoint::setEntryPoint(
-    LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd)
+inline void GlyphPositionAdjustments::EntryExitPoint::setEntryPoint(LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd)
 {
     if (baselineIsLogicalEnd) {
-        fFlags |= (EEF_HAS_ENTRY_POINT | EEF_IS_CURSIVE_GLYPH |
-        EEF_BASELINE_IS_LOGICAL_END);
+        fFlags |= (EEF_HAS_ENTRY_POINT | EEF_IS_CURSIVE_GLYPH | EEF_BASELINE_IS_LOGICAL_END);
     } else {
         fFlags |= (EEF_HAS_ENTRY_POINT | EEF_IS_CURSIVE_GLYPH);
     }
@@ -277,12 +277,10 @@
     fEntryPoint = newEntryPoint;
 }
 
-inline void GlyphPositionAdjustments::EntryExitPoint::setExitPoint(
-    LEPoint &newExitPoint, le_bool baselineIsLogicalEnd)
+inline void GlyphPositionAdjustments::EntryExitPoint::setExitPoint(LEPoint &newExitPoint, le_bool baselineIsLogicalEnd)
 {
     if (baselineIsLogicalEnd) {
-        fFlags |= (EEF_HAS_EXIT_POINT | EEF_IS_CURSIVE_GLYPH |
-            EEF_BASELINE_IS_LOGICAL_END);
+        fFlags |= (EEF_HAS_EXIT_POINT | EEF_IS_CURSIVE_GLYPH | EEF_BASELINE_IS_LOGICAL_END);
     } else {
         fFlags |= (EEF_HAS_EXIT_POINT | EEF_IS_CURSIVE_GLYPH);
     }
@@ -290,8 +288,7 @@
     fExitPoint  = newExitPoint;
 }
 
-inline void GlyphPositionAdjustments::EntryExitPoint::setCursiveGlyph(
-    le_bool baselineIsLogicalEnd)
+inline void GlyphPositionAdjustments::EntryExitPoint::setCursiveGlyph(le_bool baselineIsLogicalEnd)
 {
     if (baselineIsLogicalEnd) {
         fFlags |= (EEF_IS_CURSIVE_GLYPH | EEF_BASELINE_IS_LOGICAL_END);
@@ -386,4 +383,5 @@
     return fEntryExitPoints != NULL;
 }
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -40,18 +39,18 @@
 #include "LEGlyphStorage.h"
 #include "GlyphPositionAdjustments.h"
 
-void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage,
-    GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
-    LETag scriptTag, LETag languageTag,
-    const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
-    const LEFontInstance *fontInstance,
-    const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
+U_NAMESPACE_BEGIN
+
+void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
+                                          LETag scriptTag, LETag languageTag,
+                                          const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+                                          const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
 {
-    GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureMap,
-        featureMapCount, featureOrder);
+    GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureMap, featureMapCount, featureOrder);
 
-    processor.process(glyphStorage, glyphPositionAdjustments, rightToLeft,
-                      glyphDefinitionTableHeader, fontInstance);
+    processor.process(glyphStorage, glyphPositionAdjustments, rightToLeft, glyphDefinitionTableHeader, fontInstance);
 
     glyphPositionAdjustments->applyCursiveAdjustments(glyphStorage, rightToLeft, fontInstance);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -32,11 +31,18 @@
 #ifndef __GLYPHPOSITIONINGTABLES_H
 #define __GLYPHPOSITIONINGTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "Lookups.h"
 #include "GlyphLookupTables.h"
 
+U_NAMESPACE_BEGIN
+
 class  LEFontInstance;
 class  LEGlyphStorage;
 class  LEGlyphFilter;
@@ -45,12 +51,10 @@
 
 struct GlyphPositioningTableHeader : public GlyphLookupTableHeader
 {
-    void    process(LEGlyphStorage &glyphStorage,
-                GlyphPositionAdjustments *glyphPositionAdjustments,
+    void    process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
                 le_bool rightToLeft, LETag scriptTag, LETag languageTag,
                 const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
-                const LEFontInstance *fontInstance,
-                const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
+                const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
 };
 
 enum GlyphPositioningSubtableTypes
@@ -68,4 +72,5 @@
 
 typedef LookupSubtable GlyphPositioningSubtable;
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998 - 2005 - All Rights Reserved
  *
  */
@@ -50,6 +49,8 @@
 #include "GlyphPosnLookupProc.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 // Aside from the names, the contextual positioning subtables are
 // the same as the contextual substitution subtables.
 typedef ContextualSubstitutionSubtable ContextualPositioningSubtable;
@@ -57,8 +58,7 @@
 
 GlyphPositioningLookupProcessor::GlyphPositioningLookupProcessor(
         const GlyphPositioningTableHeader *glyphPositioningTableHeader,
-        LETag scriptTag, LETag languageTag,
-        const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
+        LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
     : LookupProcessor(
                       (char *) glyphPositioningTableHeader,
                       SWAPW(glyphPositioningTableHeader->scriptListOffset),
@@ -166,3 +166,5 @@
 GlyphPositioningLookupProcessor::~GlyphPositioningLookupProcessor()
 {
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -32,6 +31,11 @@
 #ifndef __GLYPHPOSITIONINGLOOKUPPROCESSOR_H
 #define __GLYPHPOSITIONINGLOOKUPPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -42,12 +46,13 @@
 #include "GlyphIterator.h"
 #include "LookupProcessor.h"
 
+U_NAMESPACE_BEGIN
+
 class GlyphPositioningLookupProcessor : public LookupProcessor
 {
 public:
     GlyphPositioningLookupProcessor(const GlyphPositioningTableHeader *glyphPositioningTableHeader,
-        LETag scriptTag, LETag languageTag,
-        const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
+        LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
 
     virtual ~GlyphPositioningLookupProcessor();
 
@@ -63,4 +68,5 @@
     GlyphPositioningLookupProcessor &operator=(const GlyphPositioningLookupProcessor &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -48,17 +48,17 @@
 #include "GlyphSubstLookupProc.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor(
         const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader,
-        LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter,
-        const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
+        LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
     : LookupProcessor(
                       (char *) glyphSubstitutionTableHeader,
                       SWAPW(glyphSubstitutionTableHeader->scriptListOffset),
                       SWAPW(glyphSubstitutionTableHeader->featureListOffset),
                       SWAPW(glyphSubstitutionTableHeader->lookupListOffset),
-                      scriptTag, languageTag, featureMap, featureMapCount, featureOrder)
-    , fFilter(filter)
+                      scriptTag, languageTag, featureMap, featureMapCount, featureOrder), fFilter(filter)
 {
     // anything?
 }
@@ -143,3 +143,5 @@
 GlyphSubstitutionLookupProcessor::~GlyphSubstitutionLookupProcessor()
 {
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -32,6 +31,11 @@
 #ifndef __GLYPHSUBSTITUTIONLOOKUPPROCESSOR_H
 #define __GLYPHSUBSTITUTIONLOOKUPPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "LEFontInstance.h"
@@ -43,12 +47,13 @@
 #include "GlyphIterator.h"
 #include "LookupProcessor.h"
 
+U_NAMESPACE_BEGIN
+
 class GlyphSubstitutionLookupProcessor : public LookupProcessor
 {
 public:
     GlyphSubstitutionLookupProcessor(const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader,
-        LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter,
-        const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
+        LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
 
     virtual ~GlyphSubstitutionLookupProcessor();
 
@@ -65,4 +70,5 @@
     GlyphSubstitutionLookupProcessor &operator=(const GlyphSubstitutionLookupProcessor &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -40,14 +40,15 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
-le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage,
-    le_bool rightToLeft, LETag scriptTag, LETag languageTag,
-    const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
-    const LEGlyphFilter *filter, const FeatureMap *featureMap,
-    le_int32 featureMapCount, le_bool featureOrder) const
+U_NAMESPACE_BEGIN
+
+le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag,
+                                           const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+                                           const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
 {
-    GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureMap,
-        featureMapCount, featureOrder);
+    GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureMap, featureMapCount, featureOrder);
 
     return processor.process(glyphStorage, NULL, rightToLeft, glyphDefinitionTableHeader, NULL);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,22 +32,27 @@
 #ifndef __GLYPHSUBSTITUTIONTABLES_H
 #define __GLYPHSUBSTITUTIONTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 #include "Lookups.h"
 #include "GlyphLookupTables.h"
 
+U_NAMESPACE_BEGIN
+
 class  LEGlyphStorage;
 class  LEGlyphFilter;
 struct GlyphDefinitionTableHeader;
 
 struct GlyphSubstitutionTableHeader : public GlyphLookupTableHeader
 {
-    le_int32 process(LEGlyphStorage &glyphStorage,
-        le_bool rightToLeft, LETag scriptTag, LETag languageTag,
-        const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
-        const LEGlyphFilter *filter, const FeatureMap *featureMap,
-        le_int32 featureMapCount, le_bool featureOrder) const;
+    le_int32    process(LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag,
+                        const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEGlyphFilter *filter,
+                        const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
 };
 
 enum GlyphSubstitutionSubtableTypes
@@ -64,4 +69,5 @@
 
 typedef LookupSubtable GlyphSubstitutionSubtable;
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/HanLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/HanLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * HanLayoutEngine.cpp: OpenType processing for Han fonts.
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved.
@@ -41,6 +40,10 @@
 #include "LEGlyphStorage.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HanOpenTypeLayoutEngine)
+
 #define loclFeatureTag LE_LOCL_FEATURE_TAG
 #define smplFeatureTag LE_SMPL_FEATURE_TAG
 #define tradFeatureTag LE_TRAD_FEATURE_TAG
@@ -60,9 +63,8 @@
 
 #define features (loclFeatureMask)
 
-HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode,  le_int32 languageCode, le_int32 typoFlags,
-    const GlyphSubstitutionTableHeader *gsubTable)
+HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
 {
     fFeatureMap      = featureMap;
@@ -74,9 +76,8 @@
     // nothing to do
 }
 
-le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
-    LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
+        LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -104,3 +105,5 @@
 
     return count;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/HanLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/HanLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -23,8 +23,8 @@
  *
  */
 
+
 /*
- *
  * HanLayoutEngine.h: OpenType processing for Han fonts.
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved.
@@ -40,6 +40,8 @@
 
 #include "GlyphSubstitutionTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 /**
@@ -69,9 +71,8 @@
      *
      * @internal
      */
-    HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-        le_int32 languageCode,
-        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+    HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
 
 
     /**
@@ -81,6 +82,20 @@
      */
     virtual ~HanOpenTypeLayoutEngine();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
 
     /**
@@ -92,10 +107,8 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the characters are in a
-     *    right to left directional run
-     * @param glyphStorage - the object holding the glyph storage. The char
-     *    index and auxillary data arrays will be set.
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+     * @param glyphStorage - the object holding the glyph storage. The char index and auxillary data arrays will be set.
      *
      * Output parameters:
      * @param outChars - the output character arrayt
@@ -107,9 +120,10 @@
      *
      * @internal
      */
-    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "OpenTypeUtilities.h"
 #include "IndicReordering.h"
 
+U_NAMESPACE_BEGIN
+
 // Split matra table indices
 #define _x1  (1 << CF_INDEX_SHIFT)
 #define _x2  (2 << CF_INDEX_SHIFT)
@@ -279,7 +281,7 @@
 
 static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
 
-static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 3, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
+static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 4, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
 
 //
 // IndicClassTable addresses
@@ -385,3 +387,5 @@
 
     return classTable->getWorstCaseExpansion();
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -45,20 +45,20 @@
 
 #include "IndicReordering.h"
 
-IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
-    const GlyphSubstitutionTableHeader *gsubTable)
-    : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable),
-    fMPreFixups(NULL)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine)
+
+IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                    le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+    : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable), fMPreFixups(NULL)
 {
     fFeatureMap = IndicReordering::getFeatureMap(fFeatureMapCount);
     fFeatureOrder = TRUE;
 }
 
-IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
-    : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags),
-    fMPreFixups(NULL)
+IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+    : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fMPreFixups(NULL)
 {
     fFeatureMap = IndicReordering::getFeatureMap(fFeatureMapCount);
     fFeatureOrder = TRUE;
@@ -71,9 +71,8 @@
 
 // Input: characters, tags
 // Output: glyphs, char indices
-le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+                    LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -84,8 +83,7 @@
         return 0;
     }
 
-    le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max,
-        rightToLeft, glyphStorage, success);
+    le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max, rightToLeft, glyphStorage, success);
 
     if (LE_FAILURE(success)) {
         return 0;
@@ -99,9 +97,8 @@
 // Input: characters
 // Output: characters, char indices, tags
 // Returns: output character count
-le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-    LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -131,9 +128,10 @@
 
     // NOTE: assumes this allocates featureTags...
     // (probably better than doing the worst case stuff here...)
-    le_int32 outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode,
-        outChars, glyphStorage, &fMPreFixups);
+    le_int32 outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups);
+
     glyphStorage.adoptGlyphCount(outCharCount);
-
     return outCharCount;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -43,6 +43,8 @@
 #include "GlyphDefinitionTables.h"
 #include "GlyphPositioningTables.h"
 
+U_NAMESPACE_BEGIN
+
 class MPreFixups;
 class LEGlyphStorage;
 
@@ -77,9 +79,8 @@
      *
      * @internal
      */
-    IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode,
-        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+    IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -94,8 +95,8 @@
      *
      * @internal
      */
-    IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+    IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                              le_int32 typoFlags);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -104,6 +105,20 @@
      */
    virtual ~IndicOpenTypeLayoutEngine();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
 
     /**
@@ -117,10 +132,9 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the characters are in a
-     *    right to left directional run
-     * @param glyphStorage - the glyph storage object. The glyph and character
-     *    index arrays will be set. The auxillary data array will be set to the feature tags.
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+     * @param glyphStorage - the glyph storage object. The glyph and character index arrays will be set.
+     *                       the auxillary data array will be set to the feature tags.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
@@ -129,9 +143,8 @@
      *
      * @internal
      */
-    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method does character to glyph mapping, applies the GSUB table and applies
@@ -147,11 +160,9 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the characters are in a
-     *    right to left directional run
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
      * @param featureTags - the feature tag array
-     * @param glyphStorage - the glyph storage object. The glyph and char
-     *    index arrays will be set.
+     * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
@@ -163,12 +174,14 @@
      *
      * @internal
      */
-    virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
-        LEErrorCode &success);
+    virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
 private:
+
     MPreFixups *fMPreFixups;
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/IndicRearrangement.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicRearrangement.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __INDICREARRANGEMENT_H
 #define __INDICREARRANGEMENT_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "StateTables.h"
 #include "MorphTables.h"
 #include "MorphStateTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct IndicRearrangementSubtableHeader : MorphStateTableHeader
 {
 };
@@ -78,4 +85,6 @@
 {
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,6 +39,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor)
+
 IndicRearrangementProcessor::IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader)
   : StateTableProcessor(morphSubtableHeader)
 {
@@ -56,8 +60,7 @@
     lastGlyph = 0;
 }
 
-ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage,
-    le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
 {
     const IndicRearrangementStateEntry *entry = &entryTable[index];
     ByteOffset newState = SWAPW(entry->newStateOffset);
@@ -416,3 +419,5 @@
         break;
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __INDICREARRANGEMENTPROCESSOR_H
 #define __INDICREARRANGEMENTPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "StateTableProcessor.h"
 #include "IndicRearrangement.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class IndicRearrangementProcessor : public StateTableProcessor
@@ -54,12 +61,28 @@
     IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader);
     virtual ~IndicRearrangementProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
     le_int32 firstGlyph;
     le_int32 lastGlyph;
 
     const IndicRearrangementStateEntry *entryTable;
     const IndicRearrangementSubtableHeader *indicRearrangementSubtableHeader;
+
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,8 @@
 #include "LEGlyphStorage.h"
 #include "MPreFixups.h"
 
+U_NAMESPACE_BEGIN
+
 #define initFeatureTag LE_INIT_FEATURE_TAG
 #define nuktFeatureTag LE_NUKT_FEATURE_TAG
 #define akhnFeatureTag LE_AKHN_FEATURE_TAG
@@ -71,7 +73,7 @@
 #define distFeatureMask 0x00020000UL
 #define initFeatureMask 0x00010000UL
 
-class ReorderingOutput {
+class ReorderingOutput : public UMemory {
 private:
     le_int32   fOutIndex;
     LEUnicode *fOutChars;
@@ -187,8 +189,7 @@
         fOutIndex += 1;
     }
 
-    le_bool noteMatra(const IndicClassTable *classTable, LEUnicode matra, le_uint32 matraIndex,
-        FeatureMask matraFeatures, le_bool wordStart)
+    le_bool noteMatra(const IndicClassTable *classTable, LEUnicode matra, le_uint32 matraIndex, FeatureMask matraFeatures, le_bool wordStart)
     {
         IndicClassTable::CharClass matraClass = classTable->getCharClass(matra);
 
@@ -219,13 +220,12 @@
         return FALSE;
     }
 
-    void noteVowelModifier(const IndicClassTable *classTable, LEUnicode vowelModifier,
-        le_uint32 vowelModifierIndex, FeatureMask vowelModifierFeatures)
+    void noteVowelModifier(const IndicClassTable *classTable, LEUnicode vowelModifier, le_uint32 vowelModifierIndex, FeatureMask vowelModifierFeatures)
     {
         IndicClassTable::CharClass vmClass = classTable->getCharClass(vowelModifier);
 
         fVMIndex = vowelModifierIndex;
-        fVMFeatures = vowelModifierFeatures;
+        fVMFeatures  = vowelModifierFeatures;
 
         if (IndicClassTable::isVowelModifier(vmClass)) {
            switch (vmClass & CF_POS_MASK) {
@@ -244,13 +244,12 @@
         }
     }
 
-    void noteStressMark(const IndicClassTable *classTable, LEUnicode stressMark,
-        le_uint32 stressMarkIndex, FeatureMask stressMarkFeatures)
+    void noteStressMark(const IndicClassTable *classTable, LEUnicode stressMark, le_uint32 stressMarkIndex, FeatureMask stressMarkFeatures)
     {
        IndicClassTable::CharClass smClass = classTable->getCharClass(stressMark);
 
         fSMIndex = stressMarkIndex;
-        fSMFeatures = stressMarkFeatures;
+        fSMFeatures  = stressMarkFeatures;
 
         if (IndicClassTable::isStressMark(smClass)) {
             switch (smClass & CF_POS_MASK) {
@@ -360,9 +359,7 @@
 };
 
 // TODO: Find better names for these!
-#define tagArray4 (nuktFeatureMask | akhnFeatureMask | vatuFeatureMask | presFeatureMask | \
-    blwsFeatureMask | abvsFeatureMask | pstsFeatureMask | halnFeatureMask | \
-    blwmFeatureMask | abvmFeatureMask | distFeatureMask)
+#define tagArray4 (nuktFeatureMask | akhnFeatureMask | vatuFeatureMask | presFeatureMask | blwsFeatureMask | abvsFeatureMask | pstsFeatureMask | halnFeatureMask | blwmFeatureMask | abvmFeatureMask | distFeatureMask)
 #define tagArray3 (pstfFeatureMask | tagArray4)
 #define tagArray2 (halfFeatureMask | tagArray3)
 #define tagArray1 (blwfFeatureMask | tagArray2)
@@ -415,8 +412,7 @@
     return featureMap;
 }
 
-le_int32 IndicReordering::findSyllable(const IndicClassTable *classTable,
-    const LEUnicode *chars, le_int32 prev, le_int32 charCount)
+le_int32 IndicReordering::findSyllable(const IndicClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount)
 {
     le_int32 cursor = prev;
     le_int8 state = 0;
@@ -752,3 +748,5 @@
         delete mpreFixups;
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/IndicReordering.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/IndicReordering.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __INDICREORDERING_H
 #define __INDICREORDERING_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 // Characters that get refered to by name...
 #define C_SIGN_ZWNJ           0x200C
 #define C_SIGN_ZWJ            0x200D
@@ -140,7 +147,7 @@
     static const IndicClassTable *getScriptClassTable(le_int32 scriptCode);
 };
 
-class IndicReordering {
+class IndicReordering /* not : public UObject because all methods are static */ {
 public:
     static le_int32 getWorstCaseExpansion(le_int32 scriptCode);
 
@@ -156,8 +163,7 @@
     // do not instantiate
     IndicReordering();
 
-    static le_int32 findSyllable(const IndicClassTable *classTable, const LEUnicode *chars,
-        le_int32 prev, le_int32 charCount);
+    static le_int32 findSyllable(const IndicClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount);
 
 };
 
@@ -305,4 +311,5 @@
     return hasBelowBaseForm(getCharClass(ch));
 }
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/KernTable.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/KernTable.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 2004-2005 - All Rights Reserved
  *
  */
@@ -39,6 +40,8 @@
 
 #define DEBUG 0
 
+U_NAMESPACE_BEGIN
+
 struct PairInfo {
   le_uint32 key;   // sigh, MSVC compiler gags on union here
   le_int16  value; // fword, kern value in funits
@@ -191,6 +194,12 @@
     float adjust = 0;
     for (int i = 1, e = storage.getGlyphCount(); i < e; ++i) {
       key = key << 16 | (storage[i] & 0xffff);
+
+      // argh, to do a binary search, we need to have the pair list in sorted order
+      // but it is not in sorted order on win32 platforms because of the endianness difference
+      // so either I have to swap the element each time I examine it, or I have to swap
+      // all the elements ahead of time and store them in the font
+
       const PairInfo* p = pairs;
       const PairInfo* tp = (const PairInfo*)(p + rangeShift);
       if (key > tp->key) {
@@ -238,3 +247,6 @@
     storage.adjustPosition(storage.getGlyphCount(), adjust, 0, success);
   }
 }
+
+U_NAMESPACE_END
+
--- a/jdk/src/share/native/sun/font/layout/KernTable.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/KernTable.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 2004-2005 - All Rights Reserved
  *
  */
@@ -37,9 +38,12 @@
 #endif
 
 #include "LETypes.h"
+//#include "LEFontInstance.h"
+//#include "LEGlyphStorage.h"
 
 #include <stdio.h>
 
+U_NAMESPACE_BEGIN
 struct PairInfo;
 class  LEFontInstance;
 class  LEGlyphStorage;
@@ -67,4 +71,6 @@
   void process(LEGlyphStorage& storage);
 };
 
+U_NAMESPACE_END
+
 #endif
--- a/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -23,8 +23,8 @@
  *
  */
 
+
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  * This file is a modification of the ICU file IndicLayoutEngine.cpp
@@ -38,17 +38,20 @@
 #include "LEGlyphStorage.h"
 #include "KhmerReordering.h"
 
-KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
-    const GlyphSubstitutionTableHeader *gsubTable)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(KhmerOpenTypeLayoutEngine)
+
+KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                    le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
 {
     fFeatureMap   = KhmerReordering::getFeatureMap(fFeatureMapCount);
     fFeatureOrder = TRUE;
 }
 
-KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                                                     le_int32 typoFlags)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
 {
     fFeatureMap   = KhmerReordering::getFeatureMap(fFeatureMapCount);
@@ -63,16 +66,14 @@
 // Input: characters
 // Output: characters, char indices, tags
 // Returns: output character count
-le_int32 KhmerOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-    LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 KhmerOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
     }
 
-    if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
-        offset >= max || offset + count > max) {
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
         success = LE_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
@@ -96,9 +97,10 @@
 
     // NOTE: assumes this allocates featureTags...
     // (probably better than doing the worst case stuff here...)
-    le_int32 outCharCount = KhmerReordering::reorder(&chars[offset], count,
-        fScriptCode, outChars, glyphStorage);
+    le_int32 outCharCount = KhmerReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage);
 
     glyphStorage.adoptGlyphCount(outCharCount);
     return outCharCount;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -23,6 +23,7 @@
  *
  */
 
+
 /*
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -45,19 +46,18 @@
 // #include "GlyphDefinitionTables.h"
 // #include "GlyphPositioningTables.h"
 
+U_NAMESPACE_BEGIN
+
 // class MPreFixups;
 // class LEGlyphStorage;
 
 /**
  * This class implements OpenType layout for Khmer OpenType fonts, as
- * specified by Microsoft in "Creating and Supporting OpenType Fonts
- * for Khmer Scripts"
- * (http://www.microsoft.com/typography/otspec/indicot/default.htm)
- * TODO: change url
+ * specified by Microsoft in "Creating and Supporting OpenType Fonts for
+ * Khmer Scripts" (http://www.microsoft.com/typography/otspec/indicot/default.htm) TODO: change url
  *
- * This class overrides the characterProcessing method to do Khmer
- * character processing and reordering (See the MS spec. for more
- * details)
+ * This class overrides the characterProcessing method to do Khmer character processing
+ * and reordering (See the MS spec. for more details)
  *
  * @internal
  */
@@ -65,11 +65,10 @@
 {
 public:
     /**
-     * This is the main constructor. It constructs an instance of
-     * KhmerOpenTypeLayoutEngine for a particular font, script and
-     * language. It takes the GSUB table as a parameter since
-     * LayoutEngine::layoutEngineFactory has to read the GSUB table to
-     * know that it has an Khmer OpenType font.
+     * This is the main constructor. It constructs an instance of KhmerOpenTypeLayoutEngine for
+     * a particular font, script and language. It takes the GSUB table as a parameter since
+     * LayoutEngine::layoutEngineFactory has to read the GSUB table to know that it has an
+     * Khmer OpenType font.
      *
      * @param fontInstance - the font
      * @param scriptCode - the script
@@ -82,14 +81,12 @@
      *
      * @internal
      */
-    KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
-        const GlyphSubstitutionTableHeader *gsubTable);
+    KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
 
     /**
-     * This constructor is used when the font requires a "canned" GSUB
-     * table which can't be known until after this constructor has
-     * been invoked.
+     * This constructor is used when the font requires a "canned" GSUB table which can't be known
+     * until after this constructor has been invoked.
      *
      * @param fontInstance - the font
      * @param scriptCode - the script
@@ -100,8 +97,8 @@
      *
      * @internal
      */
-    KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+    KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                              le_int32 typoFlags);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -110,25 +107,35 @@
      */
    virtual ~KhmerOpenTypeLayoutEngine();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
 
     /**
-     * This method does Khmer OpenType character processing. It
-     * assigns the OpenType feature tags to the characters, and may
-     * generate output characters which have been reordered.  It may
-     * also split some vowels, resulting in more output characters
-     * than input characters.
+     * This method does Khmer OpenType character processing. It assigns the OpenType feature
+     * tags to the characters, and may generate output characters which have been reordered.
+     * It may also split some vowels, resulting in more output characters than input characters.
      *
      * Input parameters:
      * @param chars - the input character context
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the characters are in
-     * a right to left directional run
-     * @param glyphStorage - the glyph storage object. The glyph and
-     * character index arrays will be set.  the auxillary data array
-     * will be set to the feature tags.
+     * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+     * @param glyphStorage - the glyph storage object. The glyph and character index arrays will be set.
+     *                       the auxillary data array will be set to the feature tags.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
@@ -137,9 +144,11 @@
      *
      * @internal
      */
-    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/KhmerReordering.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/KhmerReordering.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -37,6 +37,9 @@
 #include "KhmerReordering.h"
 #include "LEGlyphStorage.h"
 
+
+U_NAMESPACE_BEGIN
+
 // Characters that get refered to by name...
 enum
 {
@@ -53,35 +56,23 @@
 
 enum
 {
-    // simple classes, they are used in the statetable (in this file)
-    // to control the length of a syllable they are also used to know
-    // where a character should be placed (location in reference to
-    // the base character) and also to know if a character, when
-    // independtly displayed, should be displayed with a dotted-circle
-    // to indicate error in syllable construction
-
+    // simple classes, they are used in the statetable (in this file) to control the length of a syllable
+    // they are also used to know where a character should be placed (location in reference to the base character)
+    // and also to know if a character, when independtly displayed, should be displayed with a dotted-circle to
+    // indicate error in syllable construction
     _xx = KhmerClassTable::CC_RESERVED,
-    _sa = KhmerClassTable::CC_SIGN_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE
-          | KhmerClassTable::CF_POS_ABOVE,
-    _sp = KhmerClassTable::CC_SIGN_AFTER | KhmerClassTable::CF_DOTTED_CIRCLE
-          | KhmerClassTable::CF_POS_AFTER,
+    _sa = KhmerClassTable::CC_SIGN_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_POS_ABOVE,
+    _sp = KhmerClassTable::CC_SIGN_AFTER | KhmerClassTable::CF_DOTTED_CIRCLE| KhmerClassTable::CF_POS_AFTER,
     _c1 = KhmerClassTable::CC_CONSONANT | KhmerClassTable::CF_CONSONANT,
     _c2 = KhmerClassTable::CC_CONSONANT2 | KhmerClassTable::CF_CONSONANT,
     _c3 = KhmerClassTable::CC_CONSONANT3 | KhmerClassTable::CF_CONSONANT,
-    _rb = KhmerClassTable::CC_ROBAT | KhmerClassTable::CF_POS_ABOVE
-          | KhmerClassTable::CF_DOTTED_CIRCLE,
-    _cs = KhmerClassTable::CC_CONSONANT_SHIFTER | KhmerClassTable::CF_DOTTED_CIRCLE
-          | KhmerClassTable::CF_SHIFTER,
-    _dl = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BEFORE
-          | KhmerClassTable::CF_DOTTED_CIRCLE,
-    _db = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BELOW
-          | KhmerClassTable::CF_DOTTED_CIRCLE,
-    _da = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_ABOVE
-          | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_ABOVE_VOWEL,
-    _dr = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_AFTER
-          | KhmerClassTable::CF_DOTTED_CIRCLE,
-    _co = KhmerClassTable::CC_COENG | KhmerClassTable::CF_COENG
-          | KhmerClassTable::CF_DOTTED_CIRCLE,
+    _rb = KhmerClassTable::CC_ROBAT | KhmerClassTable::CF_POS_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE,
+    _cs = KhmerClassTable::CC_CONSONANT_SHIFTER | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_SHIFTER,
+    _dl = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BEFORE | KhmerClassTable::CF_DOTTED_CIRCLE,
+    _db = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BELOW | KhmerClassTable::CF_DOTTED_CIRCLE,
+    _da = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_ABOVE_VOWEL,
+    _dr = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_AFTER | KhmerClassTable::CF_DOTTED_CIRCLE,
+    _co = KhmerClassTable::CC_COENG | KhmerClassTable::CF_COENG | KhmerClassTable::CF_DOTTED_CIRCLE,
 
     // split vowel
     _va = _da | KhmerClassTable::CF_SPLIT_VOWEL,
@@ -90,13 +81,10 @@
 
 
 // Character class tables
-
-// _xx character does not combine into syllable, such as numbers,
-//     puntuation marks, non-Khmer signs...
+// _xx character does not combine into syllable, such as numbers, puntuation marks, non-Khmer signs...
 // _sa Sign placed above the base
 // _sp Sign placed after the base
-// _c1 Consonant of type 1 or independent vowel (independent vowels
-//     behave as type 1 consonants)
+// _c1 Consonant of type 1 or independent vowel (independent vowels behave as type 1 consonants)
 // _c2 Consonant of type 2 (only RO)
 // _c3 Consonant of type 3
 // _rb Khmer sign robat u17CC. combining mark for subscript consonants
@@ -105,13 +93,10 @@
 // _db Dependent vowel placed below the base
 // _da Dependent vowel placed above the base
 // _dr Dependent vowel placed behind the base (right of the base)
-// _co Khmer combining mark COENG u17D2, combines with the consonant
-//     or independent vowel following it to create a subscript consonant
-//     or independent vowel
-// _va Khmer split vowel in wich the first part is before the base and
-//     the second one above the base
-// _vr Khmer split vowel in wich the first part is before the base and
-//     the second one behind (right of) the base
+// _co Khmer combining mark COENG u17D2, combines with the consonant or independent vowel following
+//     it to create a subscript consonant or independent vowel
+// _va Khmer split vowel in wich the first part is before the base and the second one above the base
+// _vr Khmer split vowel in wich the first part is before the base and the second one behind (right of) the base
 
 static const KhmerClassTable::CharClass khmerCharClasses[] =
 {
@@ -129,19 +114,19 @@
 //
 
 //
-// The range of characters defined in the above table is defined
-// here. FOr Khmer 1780 to 17DF Even if the Khmer range is bigger, all
-// other characters are not combinable, and therefore treated as _xx
+// The range of characters defined in the above table is defined here. FOr Khmer 1780 to 17DF
+// Even if the Khmer range is bigger, all other characters are not combinable, and therefore treated
+// as _xx
 static const KhmerClassTable khmerClassTable = {0x1780, 0x17df, khmerCharClasses};
 
 
-// Below we define how a character in the input string is either in
-// the khmerCharClasses table (in which case we get its type back), a
-// ZWJ or ZWNJ (two characters that may appear within the syllable,
-// but are not in the table) we also get their type back, or an
-// unknown object in which case we get _xx (CC_RESERVED) back
+// Below we define how a character in the input string is either in the khmerCharClasses table
+// (in which case we get its type back), a ZWJ or ZWNJ (two characters that may appear
+// within the syllable, but are not in the table) we also get their type back, or an unknown object
+// in which case we get _xx (CC_RESERVED) back
 KhmerClassTable::CharClass KhmerClassTable::getCharClass(LEUnicode ch) const
 {
+
     if (ch == C_SIGN_ZWJ) {
         return CC_ZERO_WIDTH_J_MARK;
     }
@@ -164,13 +149,14 @@
 
 
 
-class ReorderingOutput {
+class ReorderingOutput : public UMemory {
 private:
     le_int32 fOutIndex;
     LEUnicode *fOutChars;
 
     LEGlyphStorage &fGlyphStorage;
 
+
 public:
     ReorderingOutput(LEUnicode *outChars, LEGlyphStorage &glyphStorage)
         : fOutIndex(0), fOutChars(outChars), fGlyphStorage(glyphStorage)
@@ -232,18 +218,11 @@
 #define abvmFeatureMask 0x00100000UL
 #define mkmkFeatureMask 0x00080000UL
 
-#define tagPref    (prefFeatureMask | presFeatureMask | \
-    cligFeatureMask | distFeatureMask)
-#define tagAbvf    (abvfFeatureMask | abvsFeatureMask | \
-    cligFeatureMask | distFeatureMask | abvmFeatureMask | mkmkFeatureMask)
-#define tagPstf    (blwfFeatureMask | blwsFeatureMask | prefFeatureMask | \
-    presFeatureMask | pstfFeatureMask | pstsFeatureMask | cligFeatureMask | \
-    distFeatureMask | blwmFeatureMask)
-#define tagBlwf    (blwfFeatureMask | blwsFeatureMask | cligFeatureMask | \
-    distFeatureMask | blwmFeatureMask | mkmkFeatureMask)
-#define tagDefault (prefFeatureMask | blwfFeatureMask | presFeatureMask | \
-    blwsFeatureMask | cligFeatureMask | distFeatureMask | abvmFeatureMask | \
-    blwmFeatureMask | mkmkFeatureMask)
+#define tagPref    (prefFeatureMask | presFeatureMask | cligFeatureMask | distFeatureMask)
+#define tagAbvf    (abvfFeatureMask | abvsFeatureMask | cligFeatureMask | distFeatureMask | abvmFeatureMask | mkmkFeatureMask)
+#define tagPstf    (blwfFeatureMask | blwsFeatureMask | prefFeatureMask | presFeatureMask | pstfFeatureMask | pstsFeatureMask | cligFeatureMask | distFeatureMask | blwmFeatureMask)
+#define tagBlwf    (blwfFeatureMask | blwsFeatureMask | cligFeatureMask | distFeatureMask | blwmFeatureMask | mkmkFeatureMask)
+#define tagDefault (prefFeatureMask | blwfFeatureMask | presFeatureMask | blwsFeatureMask | cligFeatureMask | distFeatureMask | abvmFeatureMask | blwmFeatureMask | mkmkFeatureMask)
 
 
 
@@ -274,35 +253,32 @@
 // The stateTable is used to calculate the end (the length) of a well
 // formed Khmer Syllable.
 //
-// Each horizontal line is ordered exactly the same way as the values
-// in KhmerClassTable CharClassValues in KhmerReordering.h This
-// coincidence of values allows the follow up of the table.
+// Each horizontal line is ordered exactly the same way as the values in KhmerClassTable
+// CharClassValues in KhmerReordering.h This coincidence of values allows the
+// follow up of the table.
 //
-// Each line corresponds to a state, which does not necessarily need
-// to be a type of component... for example, state 2 is a base, with
-// is always a first character in the syllable, but the state could be
-// produced a consonant of any type when it is the first character
-// that is analysed (in ground state).
+// Each line corresponds to a state, which does not necessarily need to be a type
+// of component... for example, state 2 is a base, with is always a first character
+// in the syllable, but the state could be produced a consonant of any type when
+// it is the first character that is analysed (in ground state).
 //
 // Differentiating 3 types of consonants is necessary in order to
 // forbid the use of certain combinations, such as having a second
-// coeng after a coeng RO.
-// The inexistent possibility of having a type 3 after another type 3
-// is permitted, eliminating it would very much complicate the table,
-// and it does not create typing problems, as the case above.
+// coeng after a coeng RO,
+// The inexistent possibility of having a type 3 after another type 3 is permitted,
+// eliminating it would very much complicate the table, and it does not create typing
+// problems, as the case above.
 //
-// The table is quite complex, in order to limit the number of coeng
-// consonants to 2 (by means of the table).
+// The table is quite complex, in order to limit the number of coeng consonants
+// to 2 (by means of the table).
 //
 // There a peculiarity, as far as Unicode is concerned:
 // - The consonant-shifter is considered in two possible different
-//   locations, the one considered in Unicode 3.0 and the one considered
-//   in Unicode 4.0. (there is a backwards compatibility problem in this
-//   standard).
+//   locations, the one considered in Unicode 3.0 and the one considered in
+//   Unicode 4.0. (there is a backwards compatibility problem in this standard).
 
 
-// xx    independent character, such as a number, punctuation sign or
-//       non-khmer char
+// xx    independent character, such as a number, punctuation sign or non-khmer char
 //
 // c1    Khmer consonant of type 1 or an independent vowel
 //       that is, a letter in which the subscript for is only under the
@@ -320,10 +296,9 @@
 //
 // co    coeng character (u17D2)
 //
-// dv    dependent vowel (including split vowels, they are treated in the
-//       same way).  even if dv is not defined above, the component that is
-//       really tested for is KhmerClassTable::CC_DEPENDENT_VOWEL, which is
-//       common to all dependent vowels
+// dv    dependent vowel (including split vowels, they are treated in the same way).
+//       even if dv is not defined above, the component that is really tested for is
+//       KhmerClassTable::CC_DEPENDENT_VOWEL, which is common to all dependent vowels
 //
 // zwj   Zero Width joiner
 //
@@ -352,8 +327,7 @@
     {-1, -1, -1, -1, 12, 13, -1, -1, 16, 17,  1, 14}, //  8 - First consonant of type 2 after coeng
     {-1, -1, -1, -1, 12, 13, -1, 10, 16, 17,  1, 14}, //  9 - First consonant or type 3 after ceong
     {-1, 11, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1}, // 10 - Second Coeng (no register shifter before)
-    {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17,  1, 14}, // 11 - Second coeng consonant
-                                                      //      (or ind. vowel) no register shifter before
+    {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17,  1, 14}, // 11 - Second coeng consonant (or ind. vowel) no register shifter before
     {-1, -1,  1, -1, -1, 13, -1, -1, 16, -1, -1, -1}, // 12 - Second ZWNJ before a register shifter
     {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17,  1, 14}, // 13 - Second register shifter
     {-1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1}, // 14 - ZWJ before vowel
@@ -363,6 +337,7 @@
     {-1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1}, // 18 - ZWJ after vowel
     {-1,  1, -1,  1, -1, -1, -1, -1, -1, -1, -1, -1}, // 19 - Third coeng
     {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1}, // 20 - dependent vowel after a Robat
+
 };
 
 
@@ -377,15 +352,13 @@
 // Given an input string of characters and a location in which to start looking
 // calculate, using the state table, which one is the last character of the syllable
 // that starts in the starting position.
-le_int32 KhmerReordering::findSyllable(const KhmerClassTable *classTable,
-    const LEUnicode *chars, le_int32 prev, le_int32 charCount)
+le_int32 KhmerReordering::findSyllable(const KhmerClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount)
 {
     le_int32 cursor = prev;
     le_int8 state = 0;
 
     while (cursor < charCount) {
-        KhmerClassTable::CharClass charClass = (classTable->getCharClass(chars[cursor])
-            & KhmerClassTable::CF_CLASS_MASK);
+        KhmerClassTable::CharClass charClass = (classTable->getCharClass(chars[cursor]) & KhmerClassTable::CF_CLASS_MASK);
 
         state = khmerStateTable[state][charClass];
 
@@ -402,8 +375,8 @@
 
 // This is the real reordering function as applied to the Khmer language
 
-le_int32 KhmerReordering::reorder(const LEUnicode *chars, le_int32 charCount,
-    le_int32 /*scriptCode*/, LEUnicode *outChars, LEGlyphStorage &glyphStorage)
+le_int32 KhmerReordering::reorder(const LEUnicode *chars, le_int32 charCount, le_int32 /*scriptCode*/,
+                                  LEUnicode *outChars, LEGlyphStorage &glyphStorage)
 {
     const KhmerClassTable *classTable = KhmerClassTable::getKhmerClassTable();
 
@@ -442,8 +415,7 @@
             // and because CC_CONSONANT2 is enough to identify it, as it is the only consonant
             // with this flag
             if ( (charClass & KhmerClassTable::CF_COENG) && (i + 1 < syllable) &&
-                 ( (classTable->getCharClass(chars[i + 1]) &
-                    KhmerClassTable::CF_CLASS_MASK) == KhmerClassTable::CC_CONSONANT2) )
+                 ( (classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_CLASS_MASK) == KhmerClassTable::CC_CONSONANT2) )
             {
                     coengRo = i;
             }
@@ -455,16 +427,15 @@
             output.writeChar(C_RO, coengRo + 1, tagPref);
         }
 
-        // shall we add a dotted circle?  If in the position in which
-        // the base should be (first char in the string) there is a
-        // character that has the Dotted circle flag (a character that
-        // cannot be a base) then write a dotted circle
+        // shall we add a dotted circle?
+        // If in the position in which the base should be (first char in the string) there is
+        // a character that has the Dotted circle flag (a character that cannot be a base)
+        // then write a dotted circle
         if (classTable->getCharClass(chars[prev]) & KhmerClassTable::CF_DOTTED_CIRCLE) {
             output.writeChar(C_DOTTED_CIRCLE, prev, tagDefault);
         }
 
-        // copy what is left to the output, skipping before vowels and
-        // coeng Ro if they are present
+        // copy what is left to the output, skipping before vowels and coeng Ro if they are present
         for (i = prev; i < syllable; i += 1) {
             charClass = classTable->getCharClass(chars[i]);
 
@@ -515,30 +486,14 @@
                     // and there is an extra rule for C_VOWEL_AA + C_SIGN_NIKAHIT also for two
                     // different positions, right after the shifter or after a vowel (Unicode 4)
                     if ( (charClass & KhmerClassTable::CF_SHIFTER) && (i + 1 < syllable) ) {
-                        if (classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_ABOVE_VOWEL ) {
-                            output.writeChar(chars[i], i, tagBlwf);
-                            break;
-                        }
-                        if (i + 2 < syllable &&
-                            ( (classTable->getCharClass(chars[i + 1]) &
-                               KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA) &&
-                            ( (classTable->getCharClass(chars[i + 2]) &
-                               KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT) )
-                        {
-                            output.writeChar(chars[i], i, tagBlwf);
-                            break;
-                        }
-                        if (i + 3 < syllable && (classTable->getCharClass(chars[i + 3]) &
-                            KhmerClassTable::CF_ABOVE_VOWEL) )
-                        {
-                            output.writeChar(chars[i], i, tagBlwf);
-                            break;
-                        }
-                        if (i + 4 < syllable &&
-                            ( (classTable->getCharClass(chars[i + 3]) &
-                               KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA) &&
-                            ( (classTable->getCharClass(chars[i + 4]) &
-                               KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT) )
+                        if ((classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_ABOVE_VOWEL)
+                            || (i + 2 < syllable
+                                && ( (classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA)
+                                && ( (classTable->getCharClass(chars[i + 2]) & KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT))
+                            || (i + 3 < syllable && (classTable->getCharClass(chars[i + 3]) & KhmerClassTable::CF_ABOVE_VOWEL))
+                            || (i + 4 < syllable
+                                && ( (classTable->getCharClass(chars[i + 3]) & KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA)
+                                && ( (classTable->getCharClass(chars[i + 4]) & KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT) ) )
                         {
                             output.writeChar(chars[i], i, tagBlwf);
                             break;
@@ -556,3 +511,6 @@
 
     return output.getOutputIndex();
 }
+
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/KhmerReordering.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/KhmerReordering.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  * This file is a modification of the ICU file IndicReordering.h
@@ -35,80 +34,60 @@
 #ifndef __KHMERREORDERING_H
 #define __KHMERREORDERING_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 // Vocabulary
-
-// Base ->
-//     A consonant or an independent vowel in its full (not
-//     subscript) form. It is the center of the syllable, it can be
-//     souranded by coeng (subscript) consonants, vowels, split
-//     vowels, signs... but there is only one base in a syllable, it
-//     has to be coded as the first character of the syllable.
-// split vowel ->
-//     vowel that has two parts placed separately (e.g. Before and
-//     after the consonant).  Khmer language has five of them. Khmer
-//     split vowels either have one part before the base and one after
-//     the base or they have a part before the base and a part above
-//     the base.  The first part of all Khmer split vowels is the same
-//     character, identical to the glyph of Khmer dependent vowel SRA
-//     EI
-// coeng ->
-//     modifier used in Khmer to construct coeng (subscript)
-//     consonants differently than indian languages, the coeng
-//     modifies the consonant that follows it, not the one preceding
-//     it Each consonant has two forms, the base form and the
-//     subscript form the base form is the normal one (using the
-//     consonants code-point), the subscript form is displayed when
-//     the combination coeng + consonant is encountered.
-// Consonant of type 1 ->
-//     A consonant which has subscript for that only occupies space
-//     under a base consonant
-// Consonant of type 2 ->
-//     Its subscript form occupies space under and before the base
-//     (only one, RO)
-// Consonant of Type 3 ->
-//     Its subscript form occupies space under and after the base
-//     (KHO, CHHO, THHO, BA, YO, SA)
-// Consonant shifter ->
-//     Khmer has to series of consonants. The same dependent vowel has
-//     different sounds if it is attached to a consonant of the first
-//     series or a consonant of the second series Most consonants have
-//     an equivalent in the other series, but some of theme exist only
-//     in one series (for example SA). If we want to use the consonant
-//     SA with a vowel sound that can only be done with a vowel sound
-//     that corresponds to a vowel accompanying a consonant of the
-//     other series, then we need to use a consonant shifter: TRIISAP
-//     or MUSIKATOAN x17C9 y x17CA. TRIISAP changes a first series
-//     consonant to second series sound and MUSIKATOAN a second series
-//     consonant to have a first series vowel sound.  Consonant
-//     shifter are both normally supercript marks, but, when they are
-//     followed by a superscript, they change shape and take the form
-//     of subscript dependent vowel SRA U.  If they are in the same
-//     syllable as a coeng consonant, Unicode 3.0 says that they
-//     should be typed before the coeng. Unicode 4.0 breaks the
-//     standard and says that it should be placed after the coeng
-//     consonant.
-// Dependent vowel ->
-//     In khmer dependent vowels can be placed above, below, before or
-//     after the base Each vowel has its own position. Only one vowel
-//     per syllable is allowed.
-// Signs ->
-//     Khmer has above signs and post signs. Only one above sign
-//     and/or one post sign are Allowed in a syllable.
+//     Base ->         A consonant or an independent vowel in its full (not subscript) form. It is the
+//                     center of the syllable, it can be souranded by coeng (subscript) consonants, vowels,
+//                     split vowels, signs... but there is only one base in a syllable, it has to be coded as
+//                     the first character of the syllable.
+//     split vowel --> vowel that has two parts placed separately (e.g. Before and after the consonant).
+//                     Khmer language has five of them. Khmer split vowels either have one part before the
+//                     base and one after the base or they have a part before the base and a part above the base.
+//                     The first part of all Khmer split vowels is the same character, identical to
+//                     the glyph of Khmer dependent vowel SRA EI
+//     coeng -->  modifier used in Khmer to construct coeng (subscript) consonants
+//                Differently than indian languages, the coeng modifies the consonant that follows it,
+//                not the one preceding it  Each consonant has two forms, the base form and the subscript form
+//                the base form is the normal one (using the consonants code-point), the subscript form is
+//                displayed when the combination coeng + consonant is encountered.
+//     Consonant of type 1 -> A consonant which has subscript for that only occupies space under a base consonant
+//     Consonant of type 2.-> Its subscript form occupies space under and before the base (only one, RO)
+//     Consonant of Type 3 -> Its subscript form occupies space under and after the base (KHO, CHHO, THHO, BA, YO, SA)
+//     Consonant shifter -> Khmer has to series of consonants. The same dependent vowel has different sounds
+//                          if it is attached to a consonant of the first series or a consonant of the second series
+//                          Most consonants have an equivalent in the other series, but some of theme exist only in
+//                          one series (for example SA). If we want to use the consonant SA with a vowel sound that
+//                          can only be done with a vowel sound that corresponds to a vowel accompanying a consonant
+//                          of the other series, then we need to use a consonant shifter: TRIISAP or MUSIKATOAN
+//                          x17C9 y x17CA. TRIISAP changes a first series consonant to second series sound and
+//                          MUSIKATOAN a second series consonant to have a first series vowel sound.
+//                          Consonant shifter are both normally supercript marks, but, when they are followed by a
+//                          superscript, they change shape and take the form of subscript dependent vowel SRA U.
+//                          If they are in the same syllable as a coeng consonant, Unicode 3.0 says that they
+//                          should be typed before the coeng. Unicode 4.0 breaks the standard and says that it should
+//                          be placed after the coeng consonant.
+//     Dependent vowel ->   In khmer dependent vowels can be placed above, below, before or after the base
+//                          Each vowel has its own position. Only one vowel per syllable is allowed.
+//     Signs            ->  Khmer has above signs and post signs. Only one above sign and/or one post sign are
+//                          Allowed in a syllable.
+//
 //
 
-// This list must include all types of components that can be used
-// inside a syllable
-struct KhmerClassTable
+struct KhmerClassTable    // This list must include all types of components that can be used inside a syllable
 {
-    // order is important here! This order must be the same that is
-    // found in each horizontal line in the statetable for Khmer (file
-    // KhmerReordering.cpp).
-    enum CharClassValues
+    enum CharClassValues  // order is important here! This order must be the same that is found in each horizontal
+                          // line in the statetable for Khmer (file KhmerReordering.cpp).
     {
         CC_RESERVED             =  0,
         CC_CONSONANT            =  1, // consonant of type 1 or independent vowel
@@ -116,8 +95,7 @@
         CC_CONSONANT3           =  3, // Consonant of type 3
         CC_ZERO_WIDTH_NJ_MARK   =  4, // Zero Width non joiner character (0x200C)
         CC_CONSONANT_SHIFTER    =  5,
-        CC_ROBAT                =  6, // Khmer special diacritic accent
-                                      // -treated differently in state table
+        CC_ROBAT                =  6, // Khmer special diacritic accent -treated differently in state table
         CC_COENG                =  7, // Subscript consonant combining character
         CC_DEPENDENT_VOWEL      =  8,
         CC_SIGN_ABOVE           =  9,
@@ -131,10 +109,8 @@
         CF_CLASS_MASK    = 0x0000FFFF,
 
         CF_CONSONANT     = 0x01000000,  // flag to speed up comparing
-        CF_SPLIT_VOWEL   = 0x02000000,  // flag for a split vowel -> the first part
-                                        // is added in front of the syllable
-        CF_DOTTED_CIRCLE = 0x04000000,  // add a dotted circle if a character with
-                                        // this flag is the first in a syllable
+        CF_SPLIT_VOWEL   = 0x02000000,  // flag for a split vowel -> the first part is added in front of the syllable
+        CF_DOTTED_CIRCLE = 0x04000000,  // add a dotted circle if a character with this flag is the first in a syllable
         CF_COENG         = 0x08000000,  // flag to speed up comparing
         CF_SHIFTER       = 0x10000000,  // flag to speed up comparing
         CF_ABOVE_VOWEL   = 0x20000000,  // flag to speed up comparing
@@ -161,10 +137,10 @@
 };
 
 
-class KhmerReordering {
+class KhmerReordering /* not : public UObject because all methods are static */ {
 public:
-    static le_int32 reorder(const LEUnicode *theChars, le_int32 charCount,
-        le_int32 scriptCode, LEUnicode *outChars, LEGlyphStorage &glyphStorage);
+    static le_int32 reorder(const LEUnicode *theChars, le_int32 charCount, le_int32 scriptCode,
+        LEUnicode *outChars, LEGlyphStorage &glyphStorage);
 
     static const FeatureMap *getFeatureMap(le_int32 &count);
 
@@ -172,8 +148,10 @@
     // do not instantiate
     KhmerReordering();
 
-    static le_int32 findSyllable(const KhmerClassTable *classTable,
-        const LEUnicode *chars, le_int32 prev, le_int32 charCount);
+    static le_int32 findSyllable(const KhmerClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount);
+
 };
 
+
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LEFontInstance.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEFontInstance.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  *******************************************************************************
  *
  *   Copyright (C) 1999-2005, International Business Machines
@@ -42,6 +41,10 @@
 #include "LEFontInstance.h"
 #include "LEGlyphStorage.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEFontInstance)
+
 const LEFontInstance *LEFontInstance::getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit,
                                                        le_int32 script, LEErrorCode &success) const
 {
@@ -59,7 +62,7 @@
 }
 
 void LEFontInstance::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
-    le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const
+                                      le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const
 {
     le_int32 i, out = 0, dir = 1;
 
@@ -100,3 +103,5 @@
 
     return mapCharToGlyph(mappedChar);
 }
+U_NAMESPACE_END
+
--- a/jdk/src/share/native/sun/font/layout/LEFontInstance.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEFontInstance.h	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,12 @@
 #define __LEFONTINSTANCE_H
 
 #include "LETypes.h"
+/**
+ * \file
+ * \brief C++ API: Layout Engine Font Instance object
+ */
+
+U_NAMESPACE_BEGIN
 
 /**
  * Instances of this class are used by <code>LEFontInstance::mapCharsToGlyphs</code> and
@@ -44,7 +50,7 @@
  *
  * @stable ICU 3.2
  */
-class LECharMapper
+class LECharMapper /* not : public UObject because this is an interface/mixin class */
 {
 public:
     /**
@@ -97,7 +103,7 @@
  *
  * @draft ICU 3.0
  */
-class LEFontInstance
+class U_LAYOUT_API LEFontInstance : public UObject
 {
 public:
 
@@ -160,8 +166,7 @@
      *
      * @stable ICU 3.2
      */
-    virtual const LEFontInstance *getSubFont(const LEUnicode chars[], le_int32 *offset,
-        le_int32 limit, le_int32 script, LEErrorCode &success) const;
+    virtual const LEFontInstance *getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit, le_int32 script, LEErrorCode &success) const;
 
     //
     // Font file access
@@ -238,8 +243,7 @@
      *
      * @draft ICU 3.0
      */
-    virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
-        le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const;
+    virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const;
 
     /**
      * This method maps a single character to a glyph index, using the
@@ -502,6 +506,21 @@
      * @stable ICU 3.2
      */
     virtual le_int32 getLineHeight() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 3.2
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 3.2
+     */
+    static UClassID getStaticClassID();
+
 };
 
 inline le_bool LEFontInstance::canDisplay(LEUnicode32 ch) const
@@ -562,4 +581,7 @@
     return getAscent() + getDescent() + getLeading();
 }
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h	Wed Jul 05 17:01:52 2017 +0200
@@ -34,14 +34,15 @@
 
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
 /**
  * This is a helper class that is used to
  * recognize a set of glyph indices.
  *
  * @internal
  */
-class LEGlyphFilter
-{
+class LEGlyphFilter /* not : public UObject because this is an interface/mixin class */ {
 public:
     /**
      * Destructor.
@@ -63,4 +64,5 @@
     virtual le_bool accept(LEGlyphID glyph) const = 0;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  **********************************************************************
  *   Copyright (C) 1998-2005, International Business Machines
  *   Corporation and others.  All Rights Reserved.
@@ -35,6 +34,10 @@
 #include "LEInsertionList.h"
 #include "LEGlyphStorage.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEGlyphStorage)
+
 LEGlyphStorage::LEGlyphStorage()
     : fGlyphCount(0), fGlyphs(NULL), fCharIndices(NULL), fPositions(NULL),
       fAuxData(NULL), fInsertionList(NULL), fSrcIndex(0), fDestIndex(0)
@@ -603,3 +606,6 @@
 
     return FALSE;
 }
+
+U_NAMESPACE_END
+
--- a/jdk/src/share/native/sun/font/layout/LEGlyphStorage.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEGlyphStorage.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  **********************************************************************
  *   Copyright (C) 1998-2005, International Business Machines
  *   Corporation and others.  All Rights Reserved.
@@ -38,6 +37,13 @@
 #include "LEInsertionList.h"
 
 /**
+ * \file
+ * \brief C++ API: This class encapsulates the per-glyph storage used by the ICU LayoutEngine.
+ */
+
+U_NAMESPACE_BEGIN
+
+/**
  * This class encapsulates the per-glyph storage used by the ICU LayoutEngine.
  * For each glyph it holds the glyph ID, the index of the backing store character
  * which produced the glyph, the X and Y position of the glyph and an auxillary data
@@ -50,7 +56,7 @@
  *
  * @draft ICU 3.6
  */
-class U_LAYOUT_API LEGlyphStorage : protected LEInsertionCallback
+class U_LAYOUT_API LEGlyphStorage : public UObject, protected LEInsertionCallback
 {
 private:
     /**
@@ -112,35 +118,37 @@
 
 protected:
     /**
-     * This implements <code>LEInsertionCallback</code>. The
-     * <code>LEInsertionList</code> will call this method once for
-     * each insertion.
+     * This implements <code>LEInsertionCallback</code>. The <code>LEInsertionList</code>
+     * will call this method once for each insertion.
      *
      * @param atPosition the position of the insertion
      * @param count the number of glyphs being inserted
      * @param newGlyphs the address of the new glyph IDs
      *
-     * @return <code>true</code> if <code>LEInsertionList</code>
-     * should stop processing the insertion list after this insertion.
+     * @return <code>true</code> if <code>LEInsertionList</code> should stop
+     *         processing the insertion list after this insertion.
      *
      * @see LEInsertionList.h
      *
      * @draft ICU 3.0
      */
-    virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count,
-        LEGlyphID newGlyphs[]);
+    virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[]);
 
 public:
 
     /**
-     * Allocates an empty <code>LEGlyphStorage</code> object. You must
-     * call <code>allocateGlyphArray, allocatePositions and
-     * allocateAuxData</code> to allocate the data.
+     * Allocates an empty <code>LEGlyphStorage</code> object. You must call
+     * <code>allocateGlyphArray, allocatePositions and allocateAuxData</code>
+     * to allocate the data.
+     *
+     * @draft ICU 3.0
      */
     LEGlyphStorage();
 
     /**
      * The destructor. This will deallocate all of the arrays.
+     *
+     * @draft ICU 3.0
      */
     ~LEGlyphStorage();
 
@@ -154,9 +162,9 @@
     inline le_int32 getGlyphCount() const;
 
     /**
-     * This method copies the glyph array into a caller supplied
-     * array.  The caller must ensure that the array is large enough
-     * to hold all the glyphs.
+     * This method copies the glyph array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold all
+     * the glyphs.
      *
      * @param glyphs - the destiniation glyph array
      * @param success - set to an error code if the operation fails
@@ -166,10 +174,10 @@
     void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
 
     /**
-     * This method copies the glyph array into a caller supplied
-     * array, ORing in extra bits. (This functionality is needed by
-     * the JDK, which uses 32 bits pre glyph idex, with the high 16
-     * bits encoding the composite font slot number)
+     * This method copies the glyph array into a caller supplied array,
+     * ORing in extra bits. (This functionality is needed by the JDK,
+     * which uses 32 bits pre glyph idex, with the high 16 bits encoding
+     * the composite font slot number)
      *
      * @param glyphs - the destination (32 bit) glyph array
      * @param extraBits - this value will be ORed with each glyph index
@@ -177,13 +185,12 @@
      *
      * @draft ICU 3.0
      */
-    void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits,
-        LEErrorCode &success) const;
+    void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
 
     /**
-     * This method copies the character index array into a caller
-     * supplied array.  The caller must ensure that the array is large
-     * enough to hold a character index for each glyph.
+     * This method copies the character index array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold a
+     * character index for each glyph.
      *
      * @param charIndices - the destiniation character index array
      * @param success - set to an error code if the operation fails
@@ -193,9 +200,9 @@
     void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
 
     /**
-     * This method copies the character index array into a caller
-     * supplied array.  The caller must ensure that the array is large
-     * enough to hold a character index for each glyph.
+     * This method copies the character index array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold a
+     * character index for each glyph.
      *
      * @param charIndices - the destiniation character index array
      * @param indexBase - an offset which will be added to each index
@@ -203,14 +210,13 @@
      *
      * @draft ICU 3.0
      */
-    void getCharIndices(le_int32 charIndices[], le_int32 indexBase,
-        LEErrorCode &success) const;
+    void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
 
     /**
-     * This method copies the position array into a caller supplied
-     * array.  The caller must ensure that the array is large enough
-     * to hold an X and Y position for each glyph, plus an extra X and
-     * Y for the advance of the last glyph.
+     * This method copies the position array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold an
+     * X and Y position for each glyph, plus an extra X and Y for the
+     * advance of the last glyph.
      *
      * @param positions - the destiniation position array
      * @param success - set to an error code if the operation fails
@@ -233,33 +239,27 @@
      *
      * @draft ICU 3.0
      */
-    void getGlyphPosition(le_int32 glyphIndex, float &x, float &y,
-        LEErrorCode &success) const;
+    void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
 
     /**
-     * This method allocates the glyph array, the char indices array
-     * and the insertion list. You must call this method before using
-     * the object. This method also initializes the char indices
+     * This method allocates the glyph array, the char indices array and the insertion list. You
+     * must call this method before using the object. This method also initializes the char indices
      * array.
-     * @param initialGlyphCount the initial size of the glyph and char
-     *     indices arrays.
-     * @param rightToLeft <code>true</code> if the original input text
-     *     is right to left.
-     * @param success set to an error code if the storage cannot be
-     *     allocated of if the initial glyph count is not positive.
+     *
+     * @param initialGlyphCount the initial size of the glyph and char indices arrays.
+     * @param rightToLeft <code>true</code> if the original input text is right to left.
+     * @param success set to an error code if the storage cannot be allocated of if the initial
+     *        glyph count is not positive.
      *
      * @draft ICU 3.0
      */
-    void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft,
-        LEErrorCode &success);
+    void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft, LEErrorCode &success);
 
     /**
-     * This method allocates the storage for the glyph positions. It
-     * allocates one extra X, Y position pair for the position just
-     * after the last glyph.
+     * This method allocates the storage for the glyph positions. It allocates one extra X, Y
+     * position pair for the position just after the last glyph.
      *
-     * @param success set to an error code if the positions array
-     *     cannot be allocated.
+     * @param success set to an error code if the positions array cannot be allocated.
      *
      * @return the number of X, Y position pairs allocated.
      *
@@ -270,8 +270,7 @@
     /**
      * This method allocates the storage for the auxillary glyph data.
      *
-     * @param success set to an error code if the aulillary data array
-     *     cannot be allocated.
+     * @param success set to an error code if the aulillary data array cannot be allocated.
      *
      * @return the size of the auxillary data array.
      *
@@ -282,10 +281,8 @@
     /**
      * Copy the entire auxillary data array.
      *
-     * @param auxData the auxillary data array will be copied to this
-     *     address
-     * @param success set to an error code if the data cannot be
-     *     copied
+     * @param auxData the auxillary data array will be copied to this address
+     * @param success set to an error code if the data cannot be copied
      *
      * @draft ICU 3.6
      */
@@ -295,8 +292,7 @@
      * Get the glyph ID for a particular glyph.
      *
      * @param glyphIndex the index into the glyph array
-     * @param success set to an error code if the glyph ID cannot be
-     *     retrieved.
+     * @param success set to an error code if the glyph ID cannot be retrieved.
      *
      * @return the glyph ID
      *
@@ -308,8 +304,7 @@
      * Get the char index for a particular glyph.
      *
      * @param glyphIndex the index into the glyph array
-     * @param success set to an error code if the char index cannot be
-     *     retrieved.
+     * @param success set to an error code if the char index cannot be retrieved.
      *
      * @return the character index
      *
@@ -322,8 +317,7 @@
      * Get the auxillary data for a particular glyph.
      *
      * @param glyphIndex the index into the glyph array
-     * @param success set to an error code if the auxillary data
-     *     cannot be retrieved.
+     * @param success set to an error code if the auxillary data cannot be retrieved.
      *
      * @return the auxillary data
      *
@@ -345,11 +339,10 @@
 
     /**
      * Call this method to replace a single glyph in the glyph array
-     * with multiple glyphs. This method uses the
-     * <code>LEInsertionList</code> to do the insertion. It returns
-     * the address of storage where the new glyph IDs can be
-     * stored. They will not actually be inserted into the glyph array
-     * until <code>applyInsertions</code> is called.
+     * with multiple glyphs. This method uses the <code>LEInsertionList</code>
+     * to do the insertion. It returns the address of storage where the new
+     * glyph IDs can be stored. They will not actually be inserted into the
+     * glyph array until <code>applyInsertions</code> is called.
      *
      * @param atIndex the index of the glyph to be replaced
      * @param insertCount the number of glyphs to replace it with
@@ -381,26 +374,22 @@
      *
      * @param glyphIndex the index of the glyph
      * @param glyphID the new glyph ID
-     * @param success will be set to an error code if the glyph ID
-     *     cannot be set.
+     * @param success will be set to an error code if the glyph ID cannot be set.
      *
      * @draft ICU 3.0
      */
-    void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID,
-        LEErrorCode &success);
+    void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID, LEErrorCode &success);
 
     /**
      * Set the char index for a particular glyph.
      *
      * @param glyphIndex the index of the glyph
      * @param charIndex the new char index
-     * @param success will be set to an error code if the char index
-     *     cannot be set.
+     * @param success will be set to an error code if the char index cannot be set.
      *
      * @draft ICU 3.0
      */
-    void setCharIndex(le_int32 glyphIndex, le_int32 charIndex,
-        LEErrorCode &success);
+    void setCharIndex(le_int32 glyphIndex, le_int32 charIndex, LEErrorCode &success);
 
     /**
      * Set the X, Y position for a particular glyph.
@@ -408,13 +397,11 @@
      * @param glyphIndex the index of the glyph
      * @param x the new X position
      * @param y the new Y position
-     * @param success will be set to an error code if the position
-     *     cannot be set.
+     * @param success will be set to an error code if the position cannot be set.
      *
      * @draft ICU 3.0
      */
-    void setPosition(le_int32 glyphIndex, float x, float y,
-        LEErrorCode &success);
+    void setPosition(le_int32 glyphIndex, float x, float y, LEErrorCode &success);
 
     /**
      * Adjust the X, Y position for a particular glyph.
@@ -422,21 +409,18 @@
      * @param glyphIndex the index of the glyph
      * @param xAdjust the adjustment to the glyph's X position
      * @param yAdjust the adjustment to the glyph's Y position
-     * @param success will be set to an error code if the glyph's
-     *     position cannot be adjusted.
+     * @param success will be set to an error code if the glyph's position cannot be adjusted.
      *
      * @draft ICU 3.0
      */
-    void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust,
-        LEErrorCode &success);
+    void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success);
 
     /**
      * Set the auxillary data for a particular glyph.
      *
      * @param glyphIndex the index of the glyph
      * @param auxData the new auxillary data
-     * @param success will be set to an error code if the auxillary
-     *     data cannot be set.
+     * @param success will be set to an error code if the auxillary data cannot be set.
      *
      * @draft ICU 3.6
      */
@@ -511,14 +495,28 @@
     void adoptGlyphCount(le_int32 newGlyphCount);
 
     /**
-     * This method frees the glyph, character index, position and
-     * auxillary data arrays so that the LayoutEngine can be reused to
-     * layout a different characer array. (This method is also called
+     * This method frees the glyph, character index, position  and
+     * auxillary data arrays so that the LayoutEngine can be reused
+     * to layout a different characer array. (This method is also called
      * by the destructor)
      *
      * @draft ICU 3.0
      */
     void reset();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @draft ICU 3.0
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @draft ICU 3.0
+     */
+    static UClassID getStaticClassID();
 };
 
 inline le_int32 LEGlyphStorage::getGlyphCount() const
@@ -531,4 +529,7 @@
     return fGlyphs[glyphIndex];
 }
 
+
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/LEInsertionList.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEInsertionList.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  **********************************************************************
  *   Copyright (C) 1998-2004, International Business Machines
  *   Corporation and others.  All Rights Reserved.
@@ -34,6 +33,8 @@
 #include "LETypes.h"
 #include "LEInsertionList.h"
 
+U_NAMESPACE_BEGIN
+
 #define ANY_NUMBER 1
 
 struct InsertionRecord
@@ -44,6 +45,8 @@
     LEGlyphID glyphs[ANY_NUMBER];
 };
 
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEInsertionList)
+
 LEInsertionList::LEInsertionList(le_bool rightToLeft)
 : head(NULL), tail(NULL), growAmount(0), append(rightToLeft)
 {
@@ -106,3 +109,5 @@
 
     return FALSE;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/LEInsertionList.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEInsertionList.h	Wed Jul 05 17:01:52 2017 +0200
@@ -24,7 +24,6 @@
  */
 
 /*
- *
  **********************************************************************
  *   Copyright (C) 1998-2004, International Business Machines
  *   Corporation and others.  All Rights Reserved.
@@ -36,6 +35,8 @@
 
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
 struct InsertionRecord;
 
 /**
@@ -78,7 +79,7 @@
  *
  * @internal
  */
-class LEInsertionList
+class LEInsertionList : public UObject
 {
 public:
     /**
@@ -140,6 +141,20 @@
      */
     void reset();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
 
     /**
@@ -174,4 +189,6 @@
     le_bool  append;
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/LELanguages.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LELanguages.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,10 +25,12 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2005. All Rights Reserved.
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
  * YOU REALLY KNOW WHAT YOU'RE DOING.
+ *
+ * Generated on: 07/19/2005 01:01:08 PM PDT
  */
 
 #ifndef __LELANGUAGES_H
@@ -37,11 +39,18 @@
 #include "LETypes.h"
 
 /**
+ * \file
+ * \brief C++ API: List of language codes for LayoutEngine
+ */
+
+U_NAMESPACE_BEGIN
+
+/**
  * A provisional list of language codes. For now,
  * this is just a list of languages which the LayoutEngine
  * supports.
  *
- * @draft ICU 3.0
+ * @draft ICU 3.4
  */
 
 enum LanguageCodes {
@@ -79,4 +88,5 @@
     languageCodeCount = 30
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LEScripts.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LEScripts.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,17 +25,23 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2005. All Rights Reserved.
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
  * YOU REALLY KNOW WHAT YOU'RE DOING.
- *
  */
 
 #ifndef __LESCRIPTS_H
 #define __LESCRIPTS_H
 
 #include "LETypes.h"
+/**
+ * \file
+ * \brief C++ API: Constants for Unicode script values
+ */
+
+
+U_NAMESPACE_BEGIN
 
 /**
  * Constants for Unicode script values, generated using
@@ -104,4 +110,5 @@
     scriptCodeCount = 55
 };
 
+U_NAMESPACE_END
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/native/sun/font/layout/LEStandalone.h	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,132 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+#ifndef __LESTANDALONE
+#define __LESTANDALONE
+
+/* Definitions to make Layout Engine work away from ICU. */
+#ifndef U_NAMESPACE_BEGIN
+#define U_NAMESPACE_BEGIN
+#endif
+
+#ifndef U_NAMESPACE_END
+#define U_NAMESPACE_END
+#endif
+
+/* RTTI Definition */
+typedef const char *UClassID;
+#ifndef UOBJECT_DEFINE_RTTI_IMPLEMENTATION
+#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(x) UClassID x::getStaticClassID(){static char z=0; return (UClassID)&z; } UClassID x::getDynamicClassID() const{return x::getStaticClassID(); }
+#endif
+
+/* UMemory's functions aren't used by the layout engine. */
+struct UMemory {};
+/* UObject's functions aren't used by the layout engine. */
+struct UObject {};
+
+/* String handling */
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * A convenience macro to test for the success of a LayoutEngine call.
+ *
+ * @stable ICU 2.4
+ */
+#define LE_SUCCESS(code) ((code)<=LE_NO_ERROR)
+
+/**
+ * A convenience macro to test for the failure of a LayoutEngine call.
+ *
+ * @stable ICU 2.4
+ */
+#define LE_FAILURE(code) ((code)>LE_NO_ERROR)
+
+
+#ifndef _LP64
+typedef long le_int32;
+typedef unsigned long le_uint32;
+#else
+typedef int le_int32;
+typedef unsigned int le_uint32;
+#endif
+
+#define HAVE_LE_INT32 1
+#define HAVE_LE_UINT32 1
+
+typedef unsigned short UChar;
+typedef le_uint32 UChar32;
+
+typedef short le_int16;
+#define HAVE_LE_INT16 1
+
+typedef unsigned short le_uint16;
+#define HAVE_LE_UINT16
+
+typedef signed char le_int8;
+#define HAVE_LE_INT8
+
+typedef unsigned char le_uint8;
+#define HAVE_LE_UINT8
+
+typedef char UBool;
+
+/**
+ * Error codes returned by the LayoutEngine.
+ *
+ * @stable ICU 2.4
+ */
+enum LEErrorCode {
+    /* informational */
+    LE_NO_SUBFONT_WARNING           = -127, // U_USING_DEFAULT_WARNING,
+
+    /* success */
+    LE_NO_ERROR                     = 0, // U_ZERO_ERROR,
+
+    /* failures */
+    LE_ILLEGAL_ARGUMENT_ERROR       = 1, // U_ILLEGAL_ARGUMENT_ERROR,
+    LE_MEMORY_ALLOCATION_ERROR      = 7, // U_MEMORY_ALLOCATION_ERROR,
+    LE_INDEX_OUT_OF_BOUNDS_ERROR    = 8, //U_INDEX_OUTOFBOUNDS_ERROR,
+    LE_NO_LAYOUT_ERROR              = 16, // U_UNSUPPORTED_ERROR,
+    LE_INTERNAL_ERROR               = 5, // U_INTERNAL_PROGRAM_ERROR,
+    LE_FONT_FILE_NOT_FOUND_ERROR    = 4, // U_FILE_ACCESS_ERROR,
+    LE_MISSING_FONT_TABLE_ERROR     = 2  // U_MISSING_RESOURCE_ERROR
+};
+#define HAVE_LEERRORCODE
+
+#define U_LAYOUT_API
+
+#define uprv_malloc malloc
+#define uprv_free free
+#define uprv_memcpy memcpy
+#define uprv_realloc realloc
+
+#if !defined(U_IS_BIG_ENDIAN)
+    #ifdef _LITTLE_ENDIAN
+        #define U_IS_BIG_ENDIAN 0
+    #endif
+#endif
+
+#endif
--- a/jdk/src/share/native/sun/font/layout/LESwaps.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LESwaps.h	Wed Jul 05 17:01:52 2017 +0200
@@ -26,7 +26,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
 
@@ -35,11 +35,12 @@
 
 #include "LETypes.h"
 
-#if !defined(U_IS_BIG_ENDIAN)
-    #ifdef _LITTLE_ENDIAN
-        #define U_IS_BIG_ENDIAN 0
-    #endif
-#endif
+/**
+ * \file
+ * \brief C++ API: Endian independent access to data for LayoutEngine
+ */
+
+U_NAMESPACE_BEGIN
 
 /**
  * A convenience macro which invokes the swapWord member function
@@ -47,7 +48,6 @@
  *
  * @stable ICU 2.8
  */
-
 #if defined(U_IS_BIG_ENDIAN)
     #if U_IS_BIG_ENDIAN
         #define SWAPW(value) (value)
@@ -64,7 +64,6 @@
  *
  * @stable ICU 2.8
  */
-
 #if defined(U_IS_BIG_ENDIAN)
     #if U_IS_BIG_ENDIAN
         #define SWAPL(value) (value)
@@ -86,8 +85,7 @@
  *
  * @stable ICU 2.8
  */
-class LESwaps
-{
+class U_LAYOUT_API LESwaps /* not : public UObject because all methods are static */ {
 public:
 
 #if !defined(U_IS_BIG_ENDIAN)
@@ -144,4 +142,5 @@
     LESwaps() {} // private - forbid instantiation
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LETypes.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LETypes.h	Wed Jul 05 17:01:52 2017 +0200
@@ -23,7 +23,6 @@
  *
  */
 
-
 /*
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -33,74 +32,98 @@
 #ifndef __LETYPES_H
 #define __LETYPES_H
 
-#define LE_USE_CMEMORY
-
-#ifdef LE_USE_CMEMORY
-#include <stdlib.h>
-#include <string.h>
+/**
+ * If LE_Standalone is defined, it must exist and contain
+ * definitions for some core ICU defines.
+ */
+#ifdef LE_STANDALONE
+#include "LEStandalone.h"
 #endif
 
-#ifndef _LP64
-typedef long le_int32;
-typedef unsigned long le_uint32;
+#ifdef LE_STANDALONE
+/* Stand-alone Layout Engine- without ICU. */
+#include "LEStandalone.h"
+#define LE_USE_CMEMORY
 #else
-typedef int le_int32;
-typedef unsigned int le_uint32;
+#if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined(U_COMBINED_IMPLEMENTATION))
+#define LE_USE_CMEMORY
 #endif
 
-typedef short le_int16;
-typedef unsigned short le_uint16;
-typedef signed char le_int8;
-typedef unsigned char le_uint8;
-typedef char le_bool;
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#ifdef LE_USE_CMEMORY
+#include "cmemory.h"
+#endif
+#endif /* not standalone */
+
 
-typedef char UClassID;
+U_NAMESPACE_BEGIN
 
-#if 0
+/*!
+ * \file
+ * \brief Basic definitions for the ICU LayoutEngine
+ */
+
 /**
  * A type used for signed, 32-bit integers.
  *
  * @stable ICU 2.4
  */
+#ifndef HAVE_LE_INT32
 typedef int32_t le_int32;
+#endif
 
 /**
  * A type used for unsigned, 32-bit integers.
  *
  * @stable ICU 2.4
  */
+#ifndef HAVE_LE_UINT32
 typedef uint32_t le_uint32;
+#endif
 
 /**
  * A type used for signed, 16-bit integers.
  *
  * @stable ICU 2.4
  */
+#ifndef HAVE_LE_INT16
 typedef int16_t le_int16;
+#endif
 
+#ifndef HAVE_LE_UINT16
 /**
  * A type used for unsigned, 16-bit integers.
  *
  * @stable ICU 2.4
  */
 typedef uint16_t le_uint16;
+#endif
 
+#ifndef HAVE_LE_INT8
 /**
  * A type used for signed, 8-bit integers.
  *
  * @stable ICU 2.4
  */
 typedef int8_t le_int8;
+#endif
 
+#ifndef HAVE_LE_UINT8
 /**
  * A type used for unsigned, 8-bit integers.
  *
  * @stable ICU 2.4
  */
 typedef uint8_t le_uint8;
+#endif
 
-typedef char le_bool;
-#endif
+/**
+* A type used for boolean values.
+*
+* @stable ICU 2.4
+*/
+typedef UBool le_bool;
 
 #ifndef TRUE
 /**
@@ -264,21 +287,21 @@
  *
  * @stable ICU 2.4
  */
-typedef le_uint16 LEUnicode16;
+typedef UChar LEUnicode16;
 
 /**
  * Used to represent 32-bit Unicode code points.
  *
  * @stable ICU 2.4
  */
-typedef le_uint32 LEUnicode32;
+typedef UChar32 LEUnicode32;
 
 /**
  * Used to represent 16-bit Unicode code points.
  *
  * @deprecated since ICU 2.4. Use LEUnicode16 instead
  */
-typedef le_uint16 LEUnicode;
+typedef UChar LEUnicode;
 
 /**
  * Used to hold a pair of (x, y) values which represent a point.
@@ -325,7 +348,7 @@
  *
  * @internal
  */
-#define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
+#define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
 
 /**
  * Allocate an array of basic types. This is used to isolate the rest of
@@ -333,7 +356,7 @@
  *
  * @internal
  */
-#define LE_NEW_ARRAY(type, count) (type *) malloc((count) * sizeof(type))
+#define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type))
 
 /**
  * Re-allocate an array of basic types. This is used to isolate the rest of
@@ -341,7 +364,7 @@
  *
  * @internal
  */
-#define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
+#define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])
 
  /**
  * Free an array of basic types. This is used to isolate the rest of
@@ -349,7 +372,7 @@
  *
  * @internal
  */
-#define LE_DELETE_ARRAY(array) free((void *) (array))
+#define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
 #endif
 
 /**
@@ -567,22 +590,24 @@
  *
  * @stable ICU 2.4
  */
+#ifndef HAVE_LEERRORCODE
 enum LEErrorCode {
     /* informational */
-    LE_NO_SUBFONT_WARNING           = -127, // U_USING_DEFAULT_WARNING,
+    LE_NO_SUBFONT_WARNING          = U_USING_DEFAULT_WARNING, /**< The font does not contain subfonts. */
 
     /* success */
-    LE_NO_ERROR                     = 0, // U_ZERO_ERROR,
+    LE_NO_ERROR                     = U_ZERO_ERROR, /**< No error, no warning. */
 
     /* failures */
-    LE_ILLEGAL_ARGUMENT_ERROR       = 1, // U_ILLEGAL_ARGUMENT_ERROR,
-    LE_MEMORY_ALLOCATION_ERROR      = 7, // U_MEMORY_ALLOCATION_ERROR,
-    LE_INDEX_OUT_OF_BOUNDS_ERROR    = 8, //U_INDEX_OUTOFBOUNDS_ERROR,
-    LE_NO_LAYOUT_ERROR              = 16, // U_UNSUPPORTED_ERROR,
-    LE_INTERNAL_ERROR               = 5, // U_INTERNAL_PROGRAM_ERROR,
-    LE_FONT_FILE_NOT_FOUND_ERROR    = 4, // U_FILE_ACCESS_ERROR,
-    LE_MISSING_FONT_TABLE_ERROR     = 2  // U_MISSING_RESOURCE_ERROR
+    LE_ILLEGAL_ARGUMENT_ERROR       = U_ILLEGAL_ARGUMENT_ERROR,  /**< An illegal argument was detected. */
+    LE_MEMORY_ALLOCATION_ERROR      = U_MEMORY_ALLOCATION_ERROR, /**< Memory allocation error. */
+    LE_INDEX_OUT_OF_BOUNDS_ERROR    = U_INDEX_OUTOFBOUNDS_ERROR, /**< Trying to access an index that is out of bounds. */
+    LE_NO_LAYOUT_ERROR              = U_UNSUPPORTED_ERROR,       /**< You must call layoutChars() first. */
+    LE_INTERNAL_ERROR               = U_INTERNAL_PROGRAM_ERROR,  /**< An internal error was encountered. */
+    LE_FONT_FILE_NOT_FOUND_ERROR    = U_FILE_ACCESS_ERROR,       /**< The requested font file cannot be opened. */
+    LE_MISSING_FONT_TABLE_ERROR     = U_MISSING_RESOURCE_ERROR   /**< The requested font table does not exist. */
 };
+#endif
 
 #ifndef XP_CPLUSPLUS
 /**
@@ -598,14 +623,20 @@
  *
  * @stable ICU 2.4
  */
-#define LE_SUCCESS(code) ((code)<=LE_NO_ERROR)
+#ifndef LE_FAILURE
+#define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code))
+#endif
 
 /**
  * A convenience macro to test for the failure of a LayoutEngine call.
  *
  * @stable ICU 2.4
  */
-#define LE_FAILURE(code) ((code)>LE_NO_ERROR)
+#ifndef LE_FAILURE
+#define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))
+#endif
 
-#define U_LAYOUT_API
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -23,6 +23,7 @@
  *
  */
 
+
 /*
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -40,6 +41,7 @@
 #include "IndicLayoutEngine.h"
 #include "KhmerLayoutEngine.h"
 #include "ThaiLayoutEngine.h"
+//#include "TibetanLayoutEngine.h"
 #include "GXLayoutEngine.h"
 #include "ScriptAndLanguageTags.h"
 #include "CharSubstitutionFilter.h"
@@ -55,6 +57,8 @@
 
 #include "KernTable.h"
 
+U_NAMESPACE_BEGIN
+
 const LEUnicode32 DefaultCharMapper::controlChars[] = {
     0x0009, 0x000A, 0x000D,
     /*0x200C, 0x200D,*/ 0x200E, 0x200F,
@@ -101,9 +105,7 @@
     }
 
     if (fMirror) {
-        le_int32 index = OpenTypeUtilities::search((le_uint32) ch,
-                                                   (le_uint32 *)DefaultCharMapper::mirroredChars,
-                                                   DefaultCharMapper::mirroredCharsCount);
+        le_int32 index = OpenTypeUtilities::search((le_uint32) ch, (le_uint32 *)DefaultCharMapper::mirroredChars, DefaultCharMapper::mirroredCharsCount);
 
         if (mirroredChars[index] == ch) {
             return DefaultCharMapper::srahCderorrim[index];
@@ -132,6 +134,9 @@
     // nothing to do
 }
 
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LayoutEngine)
+
 #define ccmpFeatureTag  LE_CCMP_FEATURE_TAG
 
 #define ccmpFeatureMask 0x80000000UL
@@ -145,10 +150,9 @@
 
 static const le_int32 canonFeatureMapCount = LE_ARRAY_SIZE(canonFeatureMap);
 
-LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-    le_int32 languageCode, le_int32 typoFlags)
-  : fGlyphStorage(NULL), fFontInstance(fontInstance), fScriptCode(scriptCode),
-    fLanguageCode(languageCode), fTypoFlags(typoFlags)
+LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+  : fGlyphStorage(NULL), fFontInstance(fontInstance), fScriptCode(scriptCode), fLanguageCode(languageCode),
+    fTypoFlags(typoFlags)
 {
     fGlyphStorage = new LEGlyphStorage();
 }
@@ -158,8 +162,7 @@
     return fGlyphStorage->getGlyphCount();
 }
 
-void LayoutEngine::getCharIndices(le_int32 charIndices[], le_int32 indexBase,
-    LEErrorCode &success) const
+void LayoutEngine::getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const
 {
     fGlyphStorage->getCharIndices(charIndices, indexBase, success);
 }
@@ -170,8 +173,7 @@
 }
 
 // Copy the glyphs into caller's (32-bit) glyph array, OR in extraBits
-void LayoutEngine::getGlyphs(le_uint32 glyphs[], le_uint32 extraBits,
-    LEErrorCode &success) const
+void LayoutEngine::getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const
 {
     fGlyphStorage->getGlyphs(glyphs, extraBits, success);
 }
@@ -218,15 +220,13 @@
     fGlyphStorage->getGlyphPositions(positions, success);
 }
 
-void LayoutEngine::getGlyphPosition(le_int32 glyphIndex, float &x, float &y,
-    LEErrorCode &success) const
+void LayoutEngine::getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const
 {
     fGlyphStorage->getGlyphPosition(glyphIndex, x, y, success);
 }
 
-le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool rightToLeft, LEUnicode *&outChars,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+                LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -237,12 +237,7 @@
         return 0;
     }
 
-    if ((fTypoFlags & 0x4) == 0) { // no canonical processing
-        return count;
-    }
-
-    const GlyphSubstitutionTableHeader *canonGSUBTable =
-        (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
+    const GlyphSubstitutionTableHeader *canonGSUBTable = (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
     LETag scriptTag  = OpenTypeLayoutEngine::getScriptTag(fScriptCode);
     LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode);
     le_int32 i, dir = 1, out = 0, outCharCount = count;
@@ -256,16 +251,15 @@
                 // We could just do the mark reordering for all scripts, but most
                 // of them probably don't need it...
                 if (fScriptCode == hebrScriptCode) {
-                    reordered = LE_NEW_ARRAY(LEUnicode, count);
+                        reordered = LE_NEW_ARRAY(LEUnicode, count);
 
-                    if (reordered == NULL) {
-                        success = LE_MEMORY_ALLOCATION_ERROR;
-                        return 0;
-                    }
+                        if (reordered == NULL) {
+                                success = LE_MEMORY_ALLOCATION_ERROR;
+                                return 0;
+                        }
 
-                    CanonShaping::reorderMarks(&chars[offset], count, rightToLeft,
-                        reordered, glyphStorage);
-                    inChars = reordered;
+                        CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, glyphStorage);
+                        inChars = reordered;
                 }
 
         glyphStorage.allocateGlyphArray(count, rightToLeft, success);
@@ -289,8 +283,7 @@
                         LE_DELETE_ARRAY(reordered);
                 }
 
-        outCharCount = canonGSUBTable->process(glyphStorage, rightToLeft, scriptTag,
-            langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE);
+        outCharCount = canonGSUBTable->process(glyphStorage, rightToLeft, scriptTag, langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE);
 
         out = (rightToLeft? count - 1 : 0);
 
@@ -305,35 +298,26 @@
     return outCharCount;
 }
 
-
-le_int32 LayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool rightToLeft,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 LayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+                                            LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
     }
 
-    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max ||
-        offset + count > max) {
-
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
         success = LE_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
 
     LEUnicode *outChars = NULL;
-    le_int32 outCharCount = characterProcessing(chars, offset, count, max,
-        rightToLeft, outChars, glyphStorage, success);
+    le_int32 outCharCount = characterProcessing(chars, offset, count, max, rightToLeft, outChars, glyphStorage, success);
 
     if (outChars != NULL) {
-        mapCharsToGlyphs(outChars, 0, outCharCount, rightToLeft, rightToLeft,
-            glyphStorage, success);
-        // FIXME: a subclass may have allocated this, in which case this delete
-        // might not work...
-        LE_DELETE_ARRAY(outChars);
+        mapCharsToGlyphs(outChars, 0, outCharCount, rightToLeft, rightToLeft, glyphStorage, success);
+        LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
     } else {
-        mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft,
-            glyphStorage, success);
+        mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft, glyphStorage, success);
     }
 
     return glyphStorage.getGlyphCount();
@@ -341,8 +325,7 @@
 
 // Input: glyphs
 // Output: positions
-void LayoutEngine::positionGlyphs(LEGlyphStorage &glyphStorage,
-    float x, float y, LEErrorCode &success)
+void LayoutEngine::positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -369,9 +352,8 @@
     glyphStorage.setPosition(glyphCount, x, y, success);
 }
 
-void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_bool reverse,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+                                        LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -398,8 +380,7 @@
     return;
 }
 
-void LayoutEngine::adjustMarkGlyphs(LEGlyphStorage &glyphStorage,
-    LEGlyphFilter *markFilter, LEErrorCode &success)
+void LayoutEngine::adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success)
 {
     float xAdjust = 0;
     le_int32 p, glyphCount = glyphStorage.getGlyphCount();
@@ -435,9 +416,7 @@
     glyphStorage.adjustPosition(glyphCount, xAdjust, 0, success);
 }
 
-void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount,
-    le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter,
-    LEErrorCode &success)
+void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success)
 {
     float xAdjust = 0;
     le_int32 c = 0, direction = 1, p;
@@ -484,9 +463,8 @@
     return fFontInstance->getFontTable(tableTag);
 }
 
-void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_bool reverse, le_bool mirror,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
+                                    LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -496,32 +474,27 @@
 
     DefaultCharMapper charMapper(TRUE, mirror);
 
-    fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse,
-        &charMapper, glyphStorage);
+    fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse, &charMapper, glyphStorage);
 }
 
 // Input: characters, font?
 // Output: glyphs, positions, char indices
 // Returns: number of glyphs
-le_int32 LayoutEngine::layoutChars(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool rightToLeft,
-    float x, float y, LEErrorCode &success)
+le_int32 LayoutEngine::layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+                              float x, float y, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
     }
 
-    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max ||
-        offset + count > max) {
-
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
         success = LE_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
 
     le_int32 glyphCount;
 
-    glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft,
-        *fGlyphStorage, success);
+    glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft, *fGlyphStorage, success);
     positionGlyphs(*fGlyphStorage, x, y, success);
     adjustGlyphPositions(chars, offset, count, rightToLeft, *fGlyphStorage, success);
 
@@ -533,17 +506,13 @@
     fGlyphStorage->reset();
 }
 
-LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
+LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
 {
   // 3 -> kerning and ligatures
-  return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode,
-        languageCode, 3, success);
+  return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, 3, success);
 }
 
-LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
-    LEErrorCode &success)
+LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
 {
     static const le_uint32 gsubTableTag = LE_GSUB_TABLE_TAG;
     static const le_uint32 mortTableTag = LE_MORT_TABLE_TAG;
@@ -552,18 +521,12 @@
         return NULL;
     }
 
-    // code2000 has GPOS kern feature tags for latn script
-
-    const GlyphSubstitutionTableHeader *gsubTable =
-        (const GlyphSubstitutionTableHeader *) fontInstance->getFontTable(gsubTableTag);
+    const GlyphSubstitutionTableHeader *gsubTable = (const GlyphSubstitutionTableHeader *) fontInstance->getFontTable(gsubTableTag);
     LayoutEngine *result = NULL;
     LETag scriptTag   = 0x00000000;
     LETag languageTag = 0x00000000;
 
-    if (gsubTable != NULL &&
-        gsubTable->coversScript(scriptTag =
-            OpenTypeLayoutEngine::getScriptTag(scriptCode))) {
-
+    if (gsubTable != NULL && gsubTable->coversScript(scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode))) {
         switch (scriptCode) {
         case bengScriptCode:
         case devaScriptCode:
@@ -575,13 +538,11 @@
         case tamlScriptCode:
         case teluScriptCode:
         case sinhScriptCode:
-            result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode,
-             languageCode, typoFlags, gsubTable);
+            result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
             break;
 
         case arabScriptCode:
-            result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode,
-             languageCode, typoFlags, gsubTable);
+            result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
             break;
 
         case haniScriptCode:
@@ -593,33 +554,33 @@
             case zhtLanguageCode:
             case zhsLanguageCode:
                 if (gsubTable->coversScriptAndLanguage(scriptTag, languageTag, TRUE)) {
-                    result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode,
-                        languageCode, typoFlags, gsubTable);
+                    result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
                     break;
                 }
 
                 // note: falling through to default case.
             default:
-                result = new OpenTypeLayoutEngine(fontInstance, scriptCode,
-                 languageCode, typoFlags, gsubTable);
+                result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
                 break;
             }
 
             break;
+#if 0
+        case tibtScriptCode:
+             result = new TibetanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
+            break;
+#endif
 
         case khmrScriptCode:
-            result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode,
-                languageCode, typoFlags, gsubTable);
+            result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
             break;
 
         default:
-            result = new OpenTypeLayoutEngine(fontInstance, scriptCode,
-             languageCode, typoFlags, gsubTable);
+            result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
             break;
         }
     } else {
-        const MorphTableHeader *morphTable =
-          (MorphTableHeader *) fontInstance->getFontTable(mortTableTag);
+        const MorphTableHeader *morphTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag);
 
         if (morphTable != NULL) {
             result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, morphTable);
@@ -636,16 +597,18 @@
             case teluScriptCode:
             case sinhScriptCode:
             {
-                result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode,
-                languageCode, typoFlags);
+                result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
                 break;
             }
 
             case arabScriptCode:
-                result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode,
-                    languageCode, typoFlags);
+            //case hebrScriptCode:
+                result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
                 break;
 
+            //case hebrScriptCode:
+            //    return new HebrewOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
+
             case thaiScriptCode:
                 result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
                 break;
@@ -667,3 +630,5 @@
 LayoutEngine::~LayoutEngine() {
     delete fGlyphStorage;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/LayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -23,6 +23,7 @@
  *
  */
 
+
 /*
  *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -34,63 +35,61 @@
 
 #include "LETypes.h"
 
-#include <string.h>
+/**
+ * \file
+ * \brief C++ API: Virtual base class for complex text layout.
+ */
+
+U_NAMESPACE_BEGIN
 
 class LEFontInstance;
 class LEGlyphFilter;
 class LEGlyphStorage;
 
 /**
- * This is a virtual base class used to do complex text layout. The
- * text must all be in a single font, script, and language. An
- * instance of a LayoutEngine can be created by calling the
- * layoutEngineFactory method. Fonts are identified by instances of
- * the LEFontInstance class. Script and language codes are identified
+ * This is a virtual base class used to do complex text layout. The text must all
+ * be in a single font, script, and language. An instance of a LayoutEngine can be
+ * created by calling the layoutEngineFactory method. Fonts are identified by
+ * instances of the LEFontInstance class. Script and language codes are identified
  * by integer codes, which are defined in ScriptAndLanuageTags.h.
  *
- * Note that this class is not public API. It is declared public so
- * that it can be exported from the library that it is a part of.
+ * Note that this class is not public API. It is declared public so that it can be
+ * exported from the library that it is a part of.
  *
- * The input to the layout process is an array of characters in
- * logical order, and a starting X, Y position for the text. The
- * output is an array of glyph indices, an array of character indices
- * for the glyphs, and an array of glyph positions.  These arrays are
- * protected members of LayoutEngine which can be retreived by a
- * public method. The reset method can be called to free these arrays
- * so that the LayoutEngine can be reused.
+ * The input to the layout process is an array of characters in logical order,
+ * and a starting X, Y position for the text. The output is an array of glyph indices,
+ * an array of character indices for the glyphs, and an array of glyph positions.
+ * These arrays are protected members of LayoutEngine which can be retreived by a
+ * public method. The reset method can be called to free these arrays so that the
+ * LayoutEngine can be reused.
  *
- * The layout process is done in three steps. There is a protected
- * virtual method for each step. These methods have a default
- * implementation which only does character to glyph mapping and
- * default positioning using the glyph's advance widths. Subclasses
- * can override these methods for more advanced layout.  There is a
- * public method which invokes the steps in the correct order.
+ * The layout process is done in three steps. There is a protected virtual method
+ * for each step. These methods have a default implementation which only does
+ * character to glyph mapping and default positioning using the glyph's advance
+ * widths. Subclasses can override these methods for more advanced layout.
+ * There is a public method which invokes the steps in the correct order.
  *
  * The steps are:
  *
- * 1) Glyph processing - character to glyph mapping and any other
- *    glyph processing such as ligature substitution and contextual
- *    forms.
+ * 1) Glyph processing - character to glyph mapping and any other glyph processing
+ *    such as ligature substitution and contextual forms.
  *
- * 2) Glyph positioning - position the glyphs based on their advance
- *    widths.
+ * 2) Glyph positioning - position the glyphs based on their advance widths.
  *
- * 3) Glyph position adjustments - adjustment of glyph positions for
- *    kerning, accent placement, etc.
+ * 3) Glyph position adjustments - adjustment of glyph positions for kerning,
+ *    accent placement, etc.
  *
- * NOTE: in all methods below, output parameters are references to
- * pointers so the method can allocate and free the storage as
- * needed. All storage allocated in this way is owned by the object
- * which created it, and will be freed when it is no longer needed, or
- * when the object's destructor is invoked.
+ * NOTE: in all methods below, output parameters are references to pointers so
+ * the method can allocate and free the storage as needed. All storage allocated
+ * in this way is owned by the object which created it, and will be freed when it
+ * is no longer needed, or when the object's destructor is invoked.
  *
  * @see LEFontInstance
  * @see ScriptAndLanguageTags.h
  *
  * @stable ICU 2.8
  */
-class U_LAYOUT_API LayoutEngine
-{
+class U_LAYOUT_API LayoutEngine : public UObject {
 protected:
     /**
      * The object which holds the glyph storage
@@ -134,21 +133,21 @@
     le_int32 fTypoFlags;
 
     /**
-     * This constructs an instance for a given font, script and
-     * language. Subclass constructors
+     * This constructs an instance for a given font, script and language. Subclass constructors
      * must call this constructor.
      *
      * @param fontInstance - the font for the text
      * @param scriptCode - the script for the text
      * @param languageCode - the language for the text
+     * @param typoFlags - the typographic control flags for the text.  Set bit 1 if kerning
+     * is desired, set bit 2 if ligature formation is desired.  Others are reserved.
      *
      * @see LEFontInstance
      * @see ScriptAndLanguageTags.h
      *
      * @internal
      */
-    LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-        le_int32 languageCode, le_int32 typoFlags);
+    LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
 
     /**
      * This overrides the default no argument constructor to make it
@@ -160,11 +159,10 @@
     LayoutEngine();
 
     /**
-     * This method does any required pre-processing to the input
-     * characters. It may generate output characters that differ from
-     * the input charcters due to insertions, deletions, or
-     * reorderings. In such cases, it will also generate an output
-     * character index array reflecting these changes.
+     * This method does any required pre-processing to the input characters. It
+     * may generate output characters that differ from the input charcters due to
+     * insertions, deletions, or reorderings. In such cases, it will also generate an
+     * output character index array reflecting these changes.
      *
      * Subclasses must override this method.
      *
@@ -173,44 +171,36 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - TRUE if the characters are in a right to
-     *     left directional run
-     * @param outChars - the output character array, if different from
-     *     the input
-     * @param glyphStorage - the object that holds the per-glyph
-     *     storage. The character index array may be set.
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
+     * @param outChars - the output character array, if different from the input
+     * @param glyphStorage - the object that holds the per-glyph storage. The character index array may be set.
      * @param success - set to an error code if the operation fails
-     * @return the output character count (input character count if no
-     *     change)
+     *
+     * @return the output character count (input character count if no change)
      *
      * @internal
      */
-    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
-     * This method does the glyph processing. It converts an array of
-     * characters into an array of glyph indices and character
-     * indices. The characters to be processed are passed in a
-     * surrounding context. The context is specified as a starting
-     * address and a maximum character count. An offset and a count
-     * are used to specify the characters to be processed.
+     * This method does the glyph processing. It converts an array of characters
+     * into an array of glyph indices and character indices. The characters to be
+     * processed are passed in a surrounding context. The context is specified as
+     * a starting address and a maximum character count. An offset and a count are
+     * used to specify the characters to be processed.
      *
-     * The default implementation of this method only does character
-     * to glyph mapping.  Subclasses needing more elaborate glyph
-     * processing must override this method.
+     * The default implementation of this method only does character to glyph mapping.
+     * Subclasses needing more elaborate glyph processing must override this method.
      *
      * Input parameters:
      * @param chars - the character context
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the context.
-     * @param rightToLeft - TRUE if the text is in a right to left
-     *            directional run
-     * @param glyphStorage - the object which holds the per-glyph
-     *            storage. The glyph and char indices arrays will be
-     *            set.
+     * @param rightToLeft - TRUE if the text is in a right to left directional run
+     * @param glyphStorage - the object which holds the per-glyph storage. The glyph and char indices arrays
+     *                       will be set.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
@@ -219,60 +209,50 @@
      *
      * @internal
      */
-    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
-     * This method does basic glyph positioning. The default
-     * implementation positions the glyphs based on their advance
-     * widths. This is sufficient for most uses. It is not expected
-     * that many subclasses will override this method.
+     * This method does basic glyph positioning. The default implementation positions
+     * the glyphs based on their advance widths. This is sufficient for most uses. It
+     * is not expected that many subclasses will override this method.
      *
      * Input parameters:
-     * @param glyphStorage - the object which holds the per-glyph storage.
-     *            The glyph position array will be set.
+     * @param glyphStorage - the object which holds the per-glyph storage. The glyph position array will be set.
      * @param x - the starting X position
      * @param y - the starting Y position
      * @param success - set to an error code if the operation fails
      *
      * @internal
      */
-    virtual void positionGlyphs(LEGlyphStorage &glyphStorage,
-                     float x, float y, LEErrorCode &success);
+    virtual void positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y, LEErrorCode &success);
 
     /**
-     * This method does positioning adjustments like accent
-     * positioning and kerning. The default implementation does
-     * nothing. Subclasses needing position adjustments must override
-     * this method.
+     * This method does positioning adjustments like accent positioning and
+     * kerning. The default implementation does nothing. Subclasses needing
+     * position adjustments must override this method.
      *
-     * Note that this method has both characters and glyphs as input
-     * so that it can use the character codes to determine glyph types
-     * if that information isn't directly available. (e.g. Some Arabic
-     * OpenType fonts don't have a GDEF table)
+     * Note that this method has both characters and glyphs as input so that
+     * it can use the character codes to determine glyph types if that information
+     * isn't directly available. (e.g. Some Arabic OpenType fonts don't have a GDEF
+     * table)
      *
      * @param chars - the input character context
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
-     * @param reverse - <code>TRUE</code> if the glyphs in the glyph
-     *     array have been reordered
-     * @param glyphStorage - the object which holds the per-glyph
-     *     storage. The glyph positions will be adjusted as needed.
-     * @param success - output parameter set to an error code if the
-     *     operation fails
+     * @param reverse - <code>TRUE</code> if the glyphs in the glyph array have been reordered
+     * @param glyphStorage - the object which holds the per-glyph storage. The glyph positions will be
+     *                       adjusted as needed.
+     * @param success - output parameter set to an error code if the operation fails
      *
      * @internal
      */
-    virtual void adjustGlyphPositions(const LEUnicode chars[],
-        le_int32 offset, le_int32 count, le_bool reverse,
-        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
-     * This method gets a table from the font associated with the
-     * text. The default implementation gets the table from the font
-     * instance. Subclasses which need to get the tables some other
-     * way must override this method.
+     * This method gets a table from the font associated with
+     * the text. The default implementation gets the table from
+     * the font instance. Subclasses which need to get the tables
+     * some other way must override this method.
      *
      * @param tableTag - the four byte table tag.
      *
@@ -283,127 +263,106 @@
     virtual const void *getFontTable(LETag tableTag) const;
 
     /**
-     * This method does character to glyph mapping. The default
-     * implementation uses the font instance to do the mapping. It
-     * will allocate the glyph and character index arrays if they're
-     * not already allocated. If it allocates the character index
-     * array, it will fill it it.
+     * This method does character to glyph mapping. The default implementation
+     * uses the font instance to do the mapping. It will allocate the glyph and
+     * character index arrays if they're not already allocated. If it allocates the
+     * character index array, it will fill it it.
      *
-     * This method supports right to left text with the ability to
-     * store the glyphs in reverse order, and by supporting character
-     * mirroring, which will replace a character which has a left and
-     * right form, such as parens, with the opposite form before
-     * mapping it to a glyph index.
+     * This method supports right to left
+     * text with the ability to store the glyphs in reverse order, and by supporting
+     * character mirroring, which will replace a character which has a left and right
+     * form, such as parens, with the opposite form before mapping it to a glyph index.
      *
      * Input parameters:
      * @param chars - the input character context
      * @param offset - the offset of the first character to be mapped
      * @param count - the number of characters to be mapped
-     * @param reverse - if <code>TRUE</code>, the output will be in
-     *            reverse order
+     * @param reverse - if <code>TRUE</code>, the output will be in reverse order
      * @param mirror - if <code>TRUE</code>, do character mirroring
-     * @param glyphStorage - the object which holds the per-glyph
-     *            storage. The glyph and char indices arrays will be
-     *            filled in.
+     * @param glyphStorage - the object which holds the per-glyph storage. The glyph and char
+     *                       indices arrays will be filled in.
      * @param success - set to an error code if the operation fails
      *
      * @see LEFontInstance
      *
      * @internal
      */
-    virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_bool reverse, le_bool mirror,
-        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
-     * This is a convenience method that forces the advance width of
-     * mark glyphs to be zero, which is required for proper selection
-     * and highlighting.
+     * This is a convenience method that forces the advance width of mark
+     * glyphs to be zero, which is required for proper selection and highlighting.
      *
-     * @param glyphStorage - the object containing the per-glyph
-     *     storage. The positions array will be modified.
+     * @param glyphStorage - the object containing the per-glyph storage. The positions array will be modified.
      * @param markFilter - used to identify mark glyphs
-     * @param success - output parameter set to an error code if the
-     *     operation fails
+     * @param success - output parameter set to an error code if the operation fails
      *
      * @see LEGlyphFilter
      *
      * @internal
      */
-    static void adjustMarkGlyphs(LEGlyphStorage &glyphStorage,
-        LEGlyphFilter *markFilter, LEErrorCode &success);
+    static void adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
 
 
     /**
-     * This is a convenience method that forces the advance width of
-     * mark glyphs to be zero, which is required for proper selection
-     * and highlighting.  This method uses the input characters to
-     * identify marks. This is required in cases where the font does
-     * not contain enough information to identify them based on the
-     * glyph IDs.
+     * This is a convenience method that forces the advance width of mark
+     * glyphs to be zero, which is required for proper selection and highlighting.
+     * This method uses the input characters to identify marks. This is required in
+     * cases where the font does not contain enough information to identify them based
+     * on the glyph IDs.
      *
      * @param chars - the array of input characters
      * @param charCount - the number of input characers
-     * @param glyphStorage - the object containing the per-glyph
-     *     storage. The positions array will be modified.
-     * @param reverse - <code>TRUE</code> if the glyph array has been
-     *     reordered
+     * @param glyphStorage - the object containing the per-glyph storage. The positions array will be modified.
+     * @param reverse - <code>TRUE</code> if the glyph array has been reordered
      * @param markFilter - used to identify mark glyphs
-     * @param success - output parameter set to an error code if the
-     *     operation fails
+     * @param success - output parameter set to an error code if the operation fails
      *
      * @see LEGlyphFilter
      *
      * @internal
      */
-    static void adjustMarkGlyphs(const LEUnicode chars[],
-        le_int32 charCount, le_bool reverse,
-        LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter,
-        LEErrorCode &success);
+    static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
+
 
 public:
     /**
      * The destructor. It will free any storage allocated for the
      * glyph, character index and position arrays by calling the reset
-     * method. It is declared virtual so that it will be invoked by
-     * the subclass destructors.
+     * method. It is declared virtual so that it will be invoked by the
+     * subclass destructors.
      *
      * @stable ICU 2.8
      */
     virtual ~LayoutEngine();
 
     /**
-     * This method will invoke the layout steps in their correct order
-     * by calling the 32 bit versions of the computeGlyphs and
-     * positionGlyphs methods.(It doesn't * call the
-     * adjustGlyphPositions method because that doesn't apply for
-     * default * processing.) It will compute the glyph, character
-     * index and position arrays.
+     * This method will invoke the layout steps in their correct order by calling
+     * the computeGlyphs, positionGlyphs and adjustGlyphPosition methods.. It will
+     * compute the glyph, character index and position arrays.
      *
      * @param chars - the input character context
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characers are in a right to
-     *            left directional run
+     * @param rightToLeft - TRUE if the characers are in a right to left directional run
      * @param x - the initial X position
      * @param y - the initial Y position
-     * @param success - output parameter set to an error code if the
-     *            operation fails
+     * @param success - output parameter set to an error code if the operation fails
+     *
      * @return the number of glyphs in the glyph array
      *
-     * Note: the glyph, character index and position array can be
-     * accessed using the getter method below.
+     * Note; the glyph, character index and position array can be accessed
+     * using the getter method below.
+     *
+     * @stable ICU 2.8
      */
-    le_int32 layoutChars(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft, float x,
-        float y, LEErrorCode &success);
+    virtual le_int32 layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, float x, float y, LEErrorCode &success);
 
     /**
-     * This method returns the number of glyphs in the glyph
-     * array. Note that the number of glyphs will be greater than or
-     * equal to the number of characters used to create the
-     * LayoutEngine.
+     * This method returns the number of glyphs in the glyph array. Note
+     * that the number of glyphs will be greater than or equal to the number
+     * of characters used to create the LayoutEngine.
      *
      * @return the number of glyphs in the glyph array
      *
@@ -412,9 +371,9 @@
     le_int32 getGlyphCount() const;
 
     /**
-     * This method copies the glyph array into a caller supplied
-     * array.  The caller must ensure that the array is large enough
-     * to hold all the glyphs.
+     * This method copies the glyph array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold all
+     * the glyphs.
      *
      * @param glyphs - the destiniation glyph array
      * @param success - set to an error code if the operation fails
@@ -424,10 +383,10 @@
     void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
 
     /**
-     * This method copies the glyph array into a caller supplied
-     * array, ORing in extra bits. (This functionality is needed by
-     * the JDK, which uses 32 bits pre glyph idex, with the high 16
-     * bits encoding the composite font slot number)
+     * This method copies the glyph array into a caller supplied array,
+     * ORing in extra bits. (This functionality is needed by the JDK,
+     * which uses 32 bits pre glyph idex, with the high 16 bits encoding
+     * the composite font slot number)
      *
      * @param glyphs - the destination (32 bit) glyph array
      * @param extraBits - this value will be ORed with each glyph index
@@ -435,13 +394,12 @@
      *
      * @stable ICU 2.8
      */
-    virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits,
-        LEErrorCode &success) const;
+    virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
 
     /**
-     * This method copies the character index array into a caller
-     * supplied array.  The caller must ensure that the array is large
-     * enough to hold a character index for each glyph.
+     * This method copies the character index array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold a
+     * character index for each glyph.
      *
      * @param charIndices - the destiniation character index array
      * @param success - set to an error code if the operation fails
@@ -451,9 +409,9 @@
     void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
 
     /**
-     * This method copies the character index array into a caller
-     * supplied array.  The caller must ensure that the array is large
-     * enough to hold a character index for each glyph.
+     * This method copies the character index array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold a
+     * character index for each glyph.
      *
      * @param charIndices - the destiniation character index array
      * @param indexBase - an offset which will be added to each index
@@ -461,14 +419,13 @@
      *
      * @stable ICU 2.8
      */
-    void getCharIndices(le_int32 charIndices[], le_int32 indexBase,
-        LEErrorCode &success) const;
+    void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
 
     /**
-     * This method copies the position array into a caller supplied
-     * array.  The caller must ensure that the array is large enough
-     * to hold an X and Y position for each glyph, plus an extra X and
-     * Y for the advance of the last glyph.
+     * This method copies the position array into a caller supplied array.
+     * The caller must ensure that the array is large enough to hold an
+     * X and Y position for each glyph, plus an extra X and Y for the
+     * advance of the last glyph.
      *
      * @param positions - the destiniation position array
      * @param success - set to an error code if the operation fails
@@ -491,8 +448,7 @@
      *
      * @stable ICU 2.8
      */
-    void getGlyphPosition(le_int32 glyphIndex, float &x, float &y,
-        LEErrorCode &success) const;
+    void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
 
     /**
      * This method frees the glyph, character index and position arrays
@@ -511,8 +467,7 @@
      * @param fontInstance - the font of the text
      * @param scriptCode - the script of the text
      * @param languageCode - the language of the text
-     * @param success - output parameter set to an error code if the
-     *     operation fails
+     * @param success - output parameter set to an error code if the operation fails
      *
      * @return a LayoutEngine which can layout text in the given font.
      *
@@ -520,17 +475,30 @@
      *
      * @stable ICU 2.8
      */
-    static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success);
+    static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success);
 
     /**
      * Override of existing call that provides flags to control typography.
      * @draft ICU 3.4
      */
-    static LayoutEngine *layoutEngineFactory(
-        const LEFontInstance *fontInstance,
-        le_int32 scriptCode, le_int32 languageCode,
-        le_int32 typo_flags, LEErrorCode &success);
+    static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typo_flags, LEErrorCode &success);
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/LayoutTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LayoutTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,20 @@
 #ifndef __LAYOUTTABLES_H
 #define __LAYOUTTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
 #define ANY_NUMBER 1
 
 typedef le_int16 ByteOffset;
 typedef le_int16 WordOffset;
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,10 +39,14 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 #define ExtendedComplement(m) ((le_int32) (~((le_uint32) (m))))
 #define SignBit(m) ((ExtendedComplement(m) >> 1) & (le_int32)(m))
 #define SignExtend(v,m) (((v) & SignBit(m))? ((v) | ExtendedComplement(m)): (v))
 
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor)
+
 LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
   : StateTableProcessor(morphSubtableHeader)
 {
@@ -63,8 +67,7 @@
     m = -1;
 }
 
-ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage,
-    le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
 {
     const LigatureSubstitutionStateEntry *entry = &entryTable[index];
     ByteOffset newState = SWAPW(entry->newStateOffset);
@@ -135,3 +138,5 @@
 void LigatureSubstitutionProcessor::endStateTable()
 {
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __LIGATURESUBSTITUTIONPROCESSOR_H
 #define __LIGATURESUBSTITUTIONPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "StateTableProcessor.h"
 #include "LigatureSubstitution.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 #define nComponents 16
@@ -54,6 +61,20 @@
     LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
     virtual ~LigatureSubstitutionProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     LigatureSubstitutionProcessor();
 
@@ -68,6 +89,8 @@
     le_int16 m;
 
     const LigatureSubstitutionHeader *ligatureSubstitutionHeader;
+
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
@@ -37,6 +38,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 LigatureSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
@@ -92,3 +95,5 @@
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __LIGATURESUBSTITUTIONSUBTABLES_H
 #define __LIGATURESUBSTITUTIONSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "OpenTypeTables.h"
 #include "GlyphSubstitutionTables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct LigatureSetTable
 {
     le_uint16 ligatureCount;
@@ -59,4 +66,5 @@
     le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LigatureSubstitution.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LigatureSubstitution.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __LIGATURESUBSTITUTION_H
 #define __LIGATURESUBSTITUTION_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "StateTables.h"
 #include "MorphTables.h"
 #include "MorphStateTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct LigatureSubstitutionHeader : MorphStateTableHeader
 {
     ByteOffset ligatureActionTableOffset;
@@ -65,4 +72,5 @@
     lafComponentOffsetMask  = 0x3FFFFFFF
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -42,6 +42,8 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator,
                                          const LEFontInstance *fontInstance) const
 {
@@ -65,10 +67,9 @@
     return 1;
 }
 
-le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage,
-    GlyphPositionAdjustments *glyphPositionAdjustments,
-    le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
-    const LEFontInstance *fontInstance) const
+le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
+                              le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+                              const LEFontInstance *fontInstance) const
 {
     le_int32 glyphCount = glyphStorage.getGlyphCount();
 
@@ -133,8 +134,7 @@
 
 LookupProcessor::LookupProcessor(const char *baseAddress,
         Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
-        LETag scriptTag, LETag languageTag, const FeatureMap *featureMap,
-        le_int32 featureMapCount, le_bool orderFeatures)
+        LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures)
     : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL),
       lookupOrderArray(NULL), lookupOrderCount(0)
 {
@@ -296,3 +296,5 @@
     LE_DELETE_ARRAY(lookupOrderArray);
     LE_DELETE_ARRAY(lookupSelectArray);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/LookupProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -32,9 +33,18 @@
 #ifndef __LOOKUPPROCESSOR_H
 #define __LOOKUPPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
+//#include "Lookups.h"
+//#include "Features.h"
+
+U_NAMESPACE_BEGIN
 
 class  LEFontInstance;
 class  LEGlyphStorage;
@@ -46,13 +56,10 @@
 struct LookupSubtable;
 struct LookupTable;
 
-class LookupProcessor
-{
+class LookupProcessor : public UMemory {
 public:
-    le_int32 process(LEGlyphStorage &glyphStorage,
-        GlyphPositionAdjustments *glyphPositionAdjustments,
-        le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
-        const LEFontInstance *fontInstance) const;
+    le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
+                 le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance) const;
 
     le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
 
@@ -64,19 +71,18 @@
     virtual ~LookupProcessor();
 
 protected:
-    LookupProcessor(const char *baseAddress,
+     LookupProcessor(const char *baseAddress,
         Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
-        LETag scriptTag, LETag languageTag, const FeatureMap *featureMap,
-        le_int32 featureMapCount, le_bool orderFeatures);
+        LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures);
 
-    LookupProcessor();
+   LookupProcessor();
 
     le_int32 selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order);
 
     const LookupListTable   *lookupListTable;
     const FeatureListTable  *featureListTable;
 
-    FeatureMask             *lookupSelectArray;
+    FeatureMask            *lookupSelectArray;
 
     le_uint16               *lookupOrderArray;
     le_uint32               lookupOrderCount;
@@ -87,4 +93,5 @@
     LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/LookupTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LookupTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,8 @@
 #include "LookupTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 /*
     These are the rolled-up versions of the uniform binary search.
     Someday, if we need more performance, we can un-roll them.
@@ -104,3 +106,5 @@
 
     return NULL;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/LookupTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/LookupTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __LOOKUPTABLES_H
 #define __LOOKUPTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 
+U_NAMESPACE_BEGIN
+
 enum LookupTableFormat
 {
     ltfSimpleArray      = 0,
@@ -104,4 +111,5 @@
     LookupValue valueArray[ANY_NUMBER];
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/Lookups.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/Lookups.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "CoverageTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 const LookupTable *LookupListTable::getLookupTable(le_uint16 lookupTableIndex) const
 {
     if (lookupTableIndex >= SWAPW(lookupCount)) {
@@ -63,3 +65,5 @@
 
     return coverageTable->getGlyphCoverage(glyphID);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/Lookups.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/Lookups.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __LOOKUPS_H
 #define __LOOKUPS_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 enum LookupFlags
 {
     lfBaselineIsLogicalEnd  = 0x0001,  // The MS spec. calls this flag "RightToLeft" but this name is more accurate
@@ -79,6 +86,5 @@
     return getGlyphCoverage(coverageTableOffset, glyphID);
 }
 
-
-
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/MPreFixups.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MPreFixups.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -33,6 +33,8 @@
 #include "LEGlyphStorage.h"
 #include "MPreFixups.h"
 
+U_NAMESPACE_BEGIN
+
 struct FixupData
 {
     le_int32 fBaseIndex;
@@ -92,7 +94,7 @@
 
         for (i = 0; i < mpreCount; i += 1) {
             mpreSave[i]  = glyphStorage[mpreIndex + i];
-            indexSave[i] = glyphStorage.getCharIndex(mpreIndex + i, success);
+            indexSave[i] = glyphStorage.getCharIndex(mpreIndex + i, success); //charIndices[mpreIndex + i];
         }
 
         for (i = 0; i < moveCount; i += 1) {
@@ -112,3 +114,5 @@
         LE_DELETE_ARRAY(mpreSave);
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MPreFixups.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MPreFixups.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,14 +32,22 @@
 #ifndef __MPREFIXUPS_H
 #define __MPREFIXUPS_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 // Might want to make this a private member...
 struct FixupData;
 
-class MPreFixups {
+class MPreFixups : public UMemory
+{
 public:
     MPreFixups(le_int32 charCount);
    ~MPreFixups();
@@ -53,4 +61,7 @@
     le_int32   fFixupCount;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/MarkArrays.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkArrays.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,8 @@
 #include "MarkArrays.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance,
                               LEPoint &anchor) const
 {
@@ -58,3 +60,5 @@
 
     return markClass;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MarkArrays.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkArrays.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,10 +32,17 @@
 #ifndef __MARKARRAYS_H
 #define __MARKARRAYS_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct MarkRecord
 {
     le_uint16   markClass;
@@ -51,4 +58,7 @@
         LEPoint &anchor) const;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -40,6 +40,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 LEGlyphID MarkToBasePositioningSubtable::findBaseGlyph(GlyphIterator *glyphIterator) const
 {
     if (glyphIterator->prev()) {
@@ -106,7 +108,6 @@
     glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
 
     if (glyphIterator->isRightToLeft()) {
-        // dlf flip advance to local coordinate system
         glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY);
     } else {
         LEPoint baseAdvance;
@@ -114,9 +115,10 @@
         fontInstance->getGlyphAdvance(baseGlyph, pixels);
         fontInstance->pixelsToUnits(pixels, baseAdvance);
 
-        // flip advances to local coordinate system
         glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY);
     }
 
     return 1;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __MARKTOBASEPOSITIONINGSUBTABLES_H
 #define __MARKTOBASEPOSITIONINGSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "AttachmentPosnSubtables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct MarkToBasePositioningSubtable : AttachmentPositioningSubtable
 {
     le_int32   process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -56,4 +63,6 @@
     BaseRecord baseRecordArray[ANY_NUMBER];
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,6 +39,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 LEGlyphID MarkToLigaturePositioningSubtable::findLigatureGlyph(GlyphIterator *glyphIterator) const
 {
     if (glyphIterator->prev()) {
@@ -117,9 +119,10 @@
         fontInstance->getGlyphAdvance(ligatureGlyph, pixels);
         fontInstance->pixelsToUnits(pixels, ligatureAdvance);
 
-        glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX,
-            anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY);
+        glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX, anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY);
     }
 
     return 1;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __MARKTOLIGATUREPOSITIONINGSUBTABLES_H
 #define __MARKTOLIGATUREPOSITIONINGSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "AttachmentPosnSubtables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct MarkToLigaturePositioningSubtable : AttachmentPositioningSubtable
 {
     le_int32   process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -62,4 +69,6 @@
     Offset ligatureAttachTableOffsetArray[ANY_NUMBER];
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -40,6 +40,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 LEGlyphID MarkToMarkPositioningSubtable::findMark2Glyph(GlyphIterator *glyphIterator) const
 {
     if (glyphIterator->findMark2Glyph()) {
@@ -88,7 +90,7 @@
     const AnchorTable *anchorTable = (const AnchorTable *) ((char *) mark2Array + anchorTableOffset);
     LEPoint mark2Anchor, markAdvance, pixels;
 
-    if (anchorTableOffset == 0) { // jb4729
+    if (anchorTableOffset == 0) {
         // this seems to mean that the marks don't attach...
         return 0;
     }
@@ -111,9 +113,10 @@
         fontInstance->getGlyphAdvance(mark2Glyph, pixels);
         fontInstance->pixelsToUnits(pixels, mark2Advance);
 
-        glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX,
-            anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY);
+        glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX, anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY);
     }
 
     return 1;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __MARKTOMARKPOSITIONINGSUBTABLES_H
 #define __MARKTOMARKPOSITIONINGSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "AttachmentPosnSubtables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct MarkToMarkPositioningSubtable : AttachmentPositioningSubtable
 {
     le_int32   process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -56,4 +63,6 @@
     Mark2Record mark2RecordArray[ANY_NUMBER];
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/MirroredCharData.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MirroredCharData.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,8 @@
 #include "LETypes.h"
 #include "DefaultCharMapper.h"
 
+U_NAMESPACE_BEGIN
+
 const LEUnicode32 DefaultCharMapper::mirroredChars[] = {
     0x0028, 0x0029, 0x003C, 0x003E, 0x005B, 0x005D, 0x007B, 0x007D,
     0x00AB, 0x00BB, 0x2039, 0x203A, 0x2045, 0x2046, 0x207D, 0x207E,
@@ -127,3 +129,5 @@
 };
 
 const le_int32 DefaultCharMapper::mirroredCharsCount = 332;
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MorphStateTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MorphStateTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,14 +32,22 @@
 #ifndef __MORPHSTATETABLES_H
 #define __MORPHSTATETABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "MorphTables.h"
 #include "StateTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct MorphStateTableHeader : MorphSubtableHeader
 {
     StateTableHeader stHeader;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/MorphTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MorphTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -42,6 +42,8 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 void MorphTableHeader::process(LEGlyphStorage &glyphStorage) const
 {
     const ChainHeader *chainHeader = chains;
@@ -114,3 +116,5 @@
         delete processor;
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MorphTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MorphTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __MORPHTABLES_H
 #define __MORPHTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 typedef le_uint32 FeatureFlags;
@@ -98,4 +105,6 @@
     void process(LEGlyphStorage &glyphStorage) const;
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -37,6 +37,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
@@ -106,3 +108,5 @@
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __MULTIPLESUBSTITUTIONSUBTABLES_H
 #define __MULTIPLESUBSTITUTIONSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "OpenTypeTables.h"
 #include "GlyphSubstitutionTables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct SequenceTable
 {
     le_uint16 glyphCount;
@@ -52,4 +59,5 @@
     le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubst.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubst.h	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
@@ -32,14 +33,23 @@
 #ifndef __NONCONTEXTUALGLYPHSUBSTITUTION_H
 #define __NONCONTEXTUALGLYPHSUBSTITUTION_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "LookupTables.h"
 #include "MorphTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct NonContextualGlyphSubstitutionHeader : MorphSubtableHeader
 {
     LookupTable table;
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -41,6 +41,8 @@
 #include "TrimmedArrayProcessor.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor()
 {
 }
@@ -79,3 +81,5 @@
         return NULL;
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,18 @@
 #ifndef __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
 #define __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "NonContextualGlyphSubst.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class NonContextualGlyphSubstitutionProcessor : public SubtableProcessor
@@ -57,4 +64,5 @@
     NonContextualGlyphSubstitutionProcessor &operator=(const NonContextualGlyphSubstitutionProcessor &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -47,6 +47,10 @@
 
 #include "GDEFMarkFilter.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OpenTypeLayoutEngine)
+
 #define ccmpFeatureTag LE_CCMP_FEATURE_TAG
 #define ligaFeatureTag LE_LIGA_FEATURE_TAG
 #define cligFeatureTag LE_CLIG_FEATURE_TAG
@@ -78,7 +82,7 @@
     {ccmpFeatureTag, ccmpFeatureMask},
     {ligaFeatureTag, ligaFeatureMask},
     {cligFeatureTag, cligFeatureMask},
-    {kernFeatureTag, kernFeatureMask},
+        {kernFeatureTag, kernFeatureMask},
     {paltFeatureTag, paltFeatureMask},
     {markFeatureTag, markFeatureMask},
     {mkmkFeatureTag, mkmkFeatureMask}
@@ -86,19 +90,15 @@
 
 static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap);
 
-OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
-    const GlyphSubstitutionTableHeader *gsubTable)
-    : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags),
-    fFeatureMask(minimalFeatures), fFeatureMap(featureMap),
-    fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
-    fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL),
-    fSubstitutionFilter(NULL)
+OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+    : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fFeatureMask(minimalFeatures),
+      fFeatureMap(featureMap), fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
+      fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
 {
     static const le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG;
     static const le_uint32 gposTableTag = LE_GPOS_TABLE_TAG;
-    const GlyphPositioningTableHeader *gposTable =
-        (const GlyphPositioningTableHeader *) getFontTable(gposTableTag);
+    const GlyphPositioningTableHeader *gposTable = (const GlyphPositioningTableHeader *) getFontTable(gposTableTag);
 
     // todo: switch to more flags and bitfield rather than list of feature tags?
     switch (typoFlags) {
@@ -127,11 +127,10 @@
     LayoutEngine::reset();
 }
 
-OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
-    : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags),
-    fFeatureOrder(FALSE), fGSUBTable(NULL), fGDEFTable(NULL),
-    fGPOSTable(NULL), fSubstitutionFilter(NULL)
+OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                                           le_int32 typoFlags)
+    : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fFeatureOrder(FALSE),
+      fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
 {
     setScriptAndLanguageTags();
 }
@@ -165,9 +164,8 @@
     fLangSysTag = getLangSysTag(fLanguageCode);
 }
 
-le_int32 OpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
-    le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+                LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -178,8 +176,7 @@
         return 0;
     }
 
-    le_int32 outCharCount = LayoutEngine::characterProcessing(chars, offset, count,
-         max, rightToLeft, outChars, glyphStorage, success);
+    le_int32 outCharCount = LayoutEngine::characterProcessing(chars, offset, count, max, rightToLeft, outChars, glyphStorage, success);
 
     if (LE_FAILURE(success)) {
         return 0;
@@ -197,16 +194,14 @@
 
 // Input: characters, tags
 // Output: glyphs, char indices
-le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool rightToLeft,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+                                               LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
     }
 
-    if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
-         offset >= max || offset + count > max) {
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
         success = LE_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
@@ -218,16 +213,14 @@
     }
 
     if (fGSUBTable != NULL) {
-        count = fGSUBTable->process(glyphStorage, rightToLeft,
-            fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
-            fFeatureMap, fFeatureMapCount, fFeatureOrder);
+        count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
+                                    fFeatureMap, fFeatureMapCount, fFeatureOrder);
     }
 
     return count;
 }
 
-le_int32 OpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -241,9 +234,7 @@
     return glyphStorage.getGlyphCount();
 }
 
-le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
-    LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     LEUnicode *outChars = NULL;
     LEGlyphStorage fakeGlyphStorage;
@@ -253,25 +244,19 @@
         return 0;
     }
 
-    if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
-         offset >= max || offset + count > max) {
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
         success = LE_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
 
-    outCharCount = characterProcessing(chars, offset, count, max, rightToLeft,
-        outChars, fakeGlyphStorage, success);
+    outCharCount = characterProcessing(chars, offset, count, max, rightToLeft, outChars, fakeGlyphStorage, success);
 
     if (outChars != NULL) {
-        fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount,
-            rightToLeft, fakeGlyphStorage, success);
-        // FIXME: a subclass may have allocated this, in which case
-        // this delete might not work...
-        LE_DELETE_ARRAY(outChars);
+        fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
+        LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
         //adjustGlyphs(outChars, 0, outCharCount, rightToLeft, fakeGlyphs, fakeGlyphCount);
     } else {
-        fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft,
-            fakeGlyphStorage, success);
+        fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
         //adjustGlyphs(chars, offset, count, rightToLeft, fakeGlyphs, fakeGlyphCount);
     }
 
@@ -281,8 +266,8 @@
 }
 
 // apply GPOS table, if any
-void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_bool reverse,  LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+                                                LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return;
@@ -318,8 +303,8 @@
         }
 #endif
 
-        fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag,
-            fGDEFTable, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder);
+        fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, fGDEFTable, fFontInstance,
+                            fFeatureMap, fFeatureMapCount, fFeatureOrder);
 
         float xAdjust = 0, yAdjust = 0;
 
@@ -354,4 +339,12 @@
 
         delete adjustments;
     }
+
+#if 0
+    // Don't know why this is here...
+    LE_DELETE_ARRAY(fFeatureTags);
+    fFeatureTags = NULL;
+#endif
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -23,9 +23,7 @@
  *
  */
 
-
 /*
- *
  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
  *
  */
@@ -42,6 +40,8 @@
 #include "GlyphDefinitionTables.h"
 #include "GlyphPositioningTables.h"
 
+U_NAMESPACE_BEGIN
+
 /**
  * OpenTypeLayoutEngine implements complex text layout for OpenType fonts - that is
  * fonts which have GSUB and GPOS tables associated with them. In order to do this,
@@ -87,7 +87,7 @@
      * @internal
      */
     OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                         le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -95,11 +95,12 @@
      *
      * @param fontInstance - the font
      * @param scriptCode - the script
-     * @param languageCode - the language
+     * @param langaugeCode - the language
      *
      * @internal
      */
-    OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+    OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+                         le_int32 typoFlags);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -132,6 +133,20 @@
      */
     static LETag getLangSysTag(le_int32 languageCode);
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
 
     /**
@@ -254,9 +269,8 @@
      *
      * @internal
      */
-    virtual le_int32 characterProcessing(const LEUnicode /*chars*/[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
-        LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 characterProcessing(const LEUnicode /*chars*/[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
+            LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method does character to glyph mapping, and applies the GSUB table. The
@@ -287,9 +301,8 @@
      *
      * @internal
      */
-    virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+            LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method does any processing necessary to convert "fake"
@@ -316,8 +329,7 @@
      *
      * @internal
      */
-    virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
-        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method applies the characterProcessing, glyphProcessing and glyphPostProcessing
@@ -341,8 +353,7 @@
      *
      * @internal
      */
-    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
-        le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method uses the GPOS table, if there is one, to adjust the glyph positions.
@@ -359,8 +370,7 @@
      *
      * @internal
      */
-    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count,
-        le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     /**
      * This method frees the feature tag array so that the
@@ -372,4 +382,6 @@
     virtual void reset();
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/OpenTypeTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/OpenTypeTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,8 +32,15 @@
 #ifndef __OPENTYPETABLES_H
 #define __OPENTYPETABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
 #define ANY_NUMBER 1
 
 typedef le_uint16 Offset;
@@ -62,4 +69,5 @@
     FeatureMask mask;
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,8 @@
 #include "OpenTypeUtilities.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 //
 // Finds the high bit by binary searching
 // through the bits in n.
@@ -192,3 +194,7 @@
         array[i + 1] = v;
     }
 }
+
+
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,10 +32,17 @@
 #ifndef __OPENTYPEUTILITIES_H
 #define __OPENTYPEUTILITIES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
-class OpenTypeUtilities {
+U_NAMESPACE_BEGIN
+
+class OpenTypeUtilities /* not : public UObject because all methods are static */ {
 public:
     static le_int8 highBit(le_int32 value);
     static Offset getTagOffset(LETag tag, const TagAndOffsetRecord *records, le_int32 recordCount);
@@ -48,4 +55,5 @@
     OpenTypeUtilities() {} // private - forbid instantiation
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,6 +39,8 @@
 #include "OpenTypeUtilities.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 PairPositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
 {
     switch(SWAPW(subtableFormat))
@@ -82,8 +84,7 @@
         const PairValueRecord *pairValueRecord = NULL;
 
         if (pairValueCount != 0) {
-            pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph),
-                pairSetTable->pairValueRecordArray, pairValueCount, recordSize);
+            pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph), pairSetTable->pairValueRecordArray, pairValueCount, recordSize);
         }
 
         if (pairValueRecord == NULL) {
@@ -91,8 +92,7 @@
         }
 
         if (valueFormat1 != 0) {
-            pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this,
-                tempIterator, fontInstance);
+            pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance);
         }
 
         if (valueFormat2 != 0) {
@@ -171,3 +171,5 @@
 
     return NULL;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __PAIRPOSITIONINGSUBTABLES_H
 #define __PAIRPOSITIONINGSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "ValueRecords.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 // NOTE: ValueRecord has a variable size
 struct PairValueRecord
 {
@@ -96,4 +103,7 @@
     le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
@@ -35,6 +36,8 @@
 #include "ScriptAndLanguage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 const LangSysTable *ScriptTable::findLanguage(LETag languageTag, le_bool exactMatch) const
 {
     le_uint16 count = SWAPW(langSysCount);
@@ -79,3 +82,5 @@
 
     return scriptTable->findLanguage(languageTag, exactMatch);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __SCRIPTANDLANGUAGE_H
 #define __SCRIPTANDLANGUAGE_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 typedef TagAndOffsetRecord LangSysRecord;
 
 struct LangSysTable
@@ -65,4 +72,6 @@
     const LangSysTable  *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "ScriptAndLanguageTags.h"
 #include "OpenTypeLayoutEngine.h"
 
+U_NAMESPACE_BEGIN
+
 const LETag OpenTypeLayoutEngine::scriptTags[] = {
     zyyyScriptTag, /* 'zyyy' (COMMON) */
     qaaiScriptTag, /* 'qaai' (INHERITED) */
@@ -125,3 +127,5 @@
     zhsLanguageTag, /* 'ZHS' (Chinese (Simplified)) */
     zhtLanguageTag  /* 'ZHT' (Chinese (Traditional)) */
 };
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,13 @@
 
 #include "LETypes.h"
 
+U_NAMESPACE_BEGIN
+
+/**
+ * \file
+ * \internal
+ */
+
 const LETag zyyyScriptTag = 0x7A797979; /* 'zyyy' (COMMON) */
 const LETag qaaiScriptTag = 0x71616169; /* 'qaai' (INHERITED) */
 const LETag arabScriptTag = 0x61726162; /* 'arab' (ARABIC) */
@@ -126,4 +133,6 @@
 const LETag zhsLanguageTag = 0x5A485320; /* 'ZHS' (Chinese (Simplified)) */
 const LETag zhtLanguageTag = 0x5A485420; /* 'ZHT' (Chinese (Traditional)) */
 
+
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentArrayProcessor)
+
 SegmentArrayProcessor::SegmentArrayProcessor()
 {
 }
@@ -77,3 +81,5 @@
         }
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __SEGMENTARRAYPROCESSOR_H
 #define __SEGMENTARRAYPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "NonContextualGlyphSubst.h"
 #include "NonContextualGlyphSubstProc.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class SegmentArrayProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,28 @@
 
     virtual ~SegmentArrayProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     SegmentArrayProcessor();
 
 protected:
     const SegmentArrayLookupTable *segmentArrayLookupTable;
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentSingleProcessor)
+
 SegmentSingleProcessor::SegmentSingleProcessor()
 {
 }
@@ -71,3 +75,5 @@
         }
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __SEGMENTSINGLEPROCESSOR_H
 #define __SEGMENTSINGLEPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "NonContextualGlyphSubst.h"
 #include "NonContextualGlyphSubstProc.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class SegmentSingleProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,28 @@
 
     virtual ~SegmentSingleProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     SegmentSingleProcessor();
 
 protected:
     const SegmentSingleLookupTable *segmentSingleLookupTable;
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/ShapingTypeData.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ShapingTypeData.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -36,6 +36,8 @@
 #include "LETypes.h"
 #include "ArabicShaping.h"
 
+U_NAMESPACE_BEGIN
+
 const le_uint8 ArabicShaping::shapingTypeTable[] = {
     0x00, 0x02, 0x00, 0xAD, 0x00, 0xAD, 0x00, 0xAD, 0x00, 0x05, 0x03, 0x00, 0x03, 0x6F, 0x00, 0x05,
     0x04, 0x83, 0x04, 0x86, 0x00, 0x05, 0x04, 0x88, 0x04, 0x89, 0x00, 0x05, 0x05, 0x91, 0x05, 0xB9,
@@ -104,3 +106,5 @@
     0xFE, 0x20, 0xFE, 0x23, 0x00, 0x05, 0xFE, 0xFF, 0xFE, 0xFF, 0x00, 0x05, 0xFF, 0xF9, 0xFF, 0xFB,
     0x00, 0x05
 };
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleArrayProcessor)
+
 SimpleArrayProcessor::SimpleArrayProcessor()
 {
 }
@@ -68,3 +72,5 @@
         }
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __SIMPLEARRAYPROCESSOR_H
 #define __SIMPLEARRAYPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "NonContextualGlyphSubst.h"
 #include "NonContextualGlyphSubstProc.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class SimpleArrayProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,28 @@
 
     virtual ~SimpleArrayProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     SimpleArrayProcessor();
 
 protected:
     const SimpleArrayLookupTable *simpleArrayLookupTable;
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 SinglePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
 {
     switch(SWAPW(subtableFormat))
@@ -84,11 +86,12 @@
     le_int16 coverageIndex = (le_int16) getGlyphCoverage(glyph);
 
     if (coverageIndex >= 0) {
-        valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this,
-            *glyphIterator, fontInstance);
+        valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance);
 
         return 1;
     }
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __SINGLEPOSITIONINGSUBTABLES_H
 #define __SINGLEPOSITIONINGSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "ValueRecords.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct SinglePositioningSubtable : GlyphPositioningSubtable
 {
     le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -61,4 +68,7 @@
     le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -37,6 +37,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
 {
     switch(SWAPW(subtableFormat))
@@ -98,3 +100,5 @@
 
     return 0;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __SINGLESUBSTITUTIONSUBTABLES_H
 #define __SINGLESUBSTITUTIONSUBTABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "OpenTypeTables.h"
 #include "GlyphSubstitutionTables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 struct SingleSubstitutionSubtable : GlyphSubstitutionSubtable
 {
     le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
@@ -58,4 +65,7 @@
     le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
 };
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/SingleTableProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SingleTableProcessor)
+
 SingleTableProcessor::SingleTableProcessor()
 {
 }
@@ -68,3 +72,5 @@
         }
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SingleTableProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __SINGLETABLEPROCESSOR_H
 #define __SINGLETABLEPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "NonContextualGlyphSubst.h"
 #include "NonContextualGlyphSubstProc.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class SingleTableProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,27 @@
 
     virtual ~SingleTableProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     SingleTableProcessor();
 
 protected:
     const SingleTableLookupTable *singleTableLookupTable;
+
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,8 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 StateTableProcessor::StateTableProcessor()
 {
 }
@@ -96,3 +98,5 @@
 
     endStateTable();
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/StateTableProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,18 @@
 #ifndef __STATETABLEPROCESSOR_H
 #define __STATETABLEPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "MorphStateTables.h"
 #include "SubtableProcessor.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class StateTableProcessor : public SubtableProcessor
@@ -72,4 +79,5 @@
     StateTableProcessor &operator=(const StateTableProcessor &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
--- a/jdk/src/share/native/sun/font/layout/StateTables.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/StateTables.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,9 +32,16 @@
 #ifndef __STATETABLES_H
 #define __STATETABLES_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LayoutTables.h"
 
+U_NAMESPACE_BEGIN
+
 struct StateTableHeader
 {
     le_int16 stateSize;
@@ -78,4 +85,6 @@
     le_int16    flags;
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/SubstitutionLookups.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SubstitutionLookups.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -39,6 +39,8 @@
 #include "CoverageTables.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 /*
     NOTE: This could be optimized somewhat by keeping track
     of the previous sequenceIndex in the loop and doing next()
@@ -65,3 +67,5 @@
         lookupProcessor->applySingleLookup(lookupListIndex, &tempIterator, fontInstance);
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SubstitutionLookups.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SubstitutionLookups.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,6 +32,11 @@
 #ifndef __SUBSTITUTIONLOOKUPS_H
 #define __SUBSTITUTIONLOOKUPS_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
 #include "GlyphIterator.h"
 #include "LookupProcessor.h"
 
+U_NAMESPACE_BEGIN
+
 struct SubstitutionLookupRecord
 {
     le_uint16  sequenceIndex;
@@ -56,4 +63,6 @@
         le_int32 position);
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/SubtableProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -34,6 +34,8 @@
 #include "SubtableProcessor.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 SubtableProcessor::SubtableProcessor()
 {
 }
@@ -50,3 +52,5 @@
 SubtableProcessor::~SubtableProcessor()
 {
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/SubtableProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,13 +32,19 @@
 #ifndef __SUBTABLEPROCESSOR_H
 #define __SUBTABLEPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
-class SubtableProcessor
-{
+class SubtableProcessor : public UMemory {
 public:
     virtual void process(LEGlyphStorage &glyphStorage) = 0;
     virtual ~SubtableProcessor();
@@ -60,4 +66,6 @@
     SubtableProcessor &operator=(const SubtableProcessor &other); // forbid copying of this class
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,8 +38,11 @@
 
 #include "ThaiShaping.h"
 
-ThaiLayoutEngine::ThaiLayoutEngine(const LEFontInstance *fontInstance,
-    le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ThaiLayoutEngine)
+
+ThaiLayoutEngine::ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
     : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
 {
     fErrorChar = 0x25CC;
@@ -73,16 +76,13 @@
 // Output: glyphs, char indices
 // Returns: the glyph count
 // NOTE: this assumes that ThaiShaping::compose will allocate the outChars array...
-le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
-    le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
-    LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
     }
 
-    if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
-        offset >= max || offset + count > max) {
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
         success = LE_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
@@ -107,8 +107,7 @@
         return 0;
     }
 
-    glyphCount = ThaiShaping::compose(chars, offset, count, fGlyphSet, fErrorChar,
-        outChars, glyphStorage);
+    glyphCount = ThaiShaping::compose(chars, offset, count, fGlyphSet, fErrorChar, outChars, glyphStorage);
     mapCharsToGlyphs(outChars, 0, glyphCount, FALSE, FALSE, glyphStorage, success);
 
     LE_DELETE_ARRAY(outChars);
@@ -116,3 +115,5 @@
     glyphStorage.adoptGlyphCount(glyphCount);
     return glyphCount;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.h	Wed Jul 05 17:01:52 2017 +0200
@@ -39,6 +39,8 @@
 
 #include "ThaiShaping.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 /**
@@ -66,8 +68,7 @@
      *
      * @internal
      */
-    ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
-        le_int32 languageCode, le_int32 typoFlags);
+    ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -76,6 +77,20 @@
      */
     virtual ~ThaiLayoutEngine();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 protected:
     /**
      * A small integer indicating which Thai encoding
@@ -109,10 +124,8 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - <code>TRUE</code> if the text is in a
-     *    right to left directional run
-     * @param glyphStorage - the glyph storage object. The glyph and
-     *    char index arrays will be set.
+     * @param rightToLeft - <code>TRUE</code> if the text is in a right to left directional run
+     * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
      *
      * Output parameters:
      * @param success - set to an error code if the operation fails
@@ -123,10 +136,11 @@
      *
      * @internal
      */
-    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset,
-        le_int32 count, le_int32 max, le_bool rightToLeft,
+    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
         LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/ThaiShaping.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ThaiShaping.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -35,6 +35,8 @@
 #include "LEGlyphStorage.h"
 #include "ThaiShaping.h"
 
+U_NAMESPACE_BEGIN
+
 enum {
     CH_SPACE        = 0x0020,
     CH_YAMAKKAN     = 0x0E4E,
@@ -248,9 +250,8 @@
      return transition.nextState;
 }
 
-le_uint8 ThaiShaping::getNextState(LEUnicode ch, le_uint8 prevState, le_int32 inputIndex,
-    le_uint8 glyphSet, LEUnicode errorChar,
-    le_uint8 &charClass, LEUnicode *output, LEGlyphStorage &glyphStorage, le_int32 &outputIndex)
+le_uint8 ThaiShaping::getNextState(LEUnicode ch, le_uint8 prevState, le_int32 inputIndex, le_uint8 glyphSet, LEUnicode errorChar,
+                              le_uint8 &charClass, LEUnicode *output, LEGlyphStorage &glyphStorage, le_int32 &outputIndex)
 {
     StateTransition transition;
 
@@ -327,3 +328,5 @@
 
     return outputIndex;
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ThaiShaping.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ThaiShaping.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,13 +32,20 @@
 #ifndef __THAISHAPING_H
 #define __THAISHAPING_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEGlyphFilter.h"
 #include "OpenTypeTables.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
-class ThaiShaping {
+class ThaiShaping /* not : public UObject because all methods are static */ {
 public:
 
     enum {
@@ -120,4 +127,7 @@
     return thaiStateTable[state][currClass];
 }
 
+U_NAMESPACE_END
 #endif
+
+
--- a/jdk/src/share/native/sun/font/layout/ThaiStateTables.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ThaiStateTables.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 /*
  *
+ *
  * (C) Copyright IBM Corp. 1999-2003 - All Rights Reserved
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
@@ -35,6 +36,8 @@
 #include "LETypes.h"
 #include "ThaiShaping.h"
 
+U_NAMESPACE_BEGIN
+
 const le_uint8 ThaiShaping::classTable[] = {
     //       0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F
     //       -------------------------------------------------------------------------------
@@ -105,3 +108,5 @@
     /*50*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {51, tC}, { 0, tR}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
     /*51*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}}
 };
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -38,6 +38,10 @@
 #include "LEGlyphStorage.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TrimmedArrayProcessor)
+
 TrimmedArrayProcessor::TrimmedArrayProcessor()
 {
 }
@@ -72,3 +76,5 @@
         }
     }
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,12 +32,19 @@
 #ifndef __TRIMMEDARRAYPROCESSOR_H
 #define __TRIMMEDARRAYPROCESSOR_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "MorphTables.h"
 #include "SubtableProcessor.h"
 #include "NonContextualGlyphSubst.h"
 #include "NonContextualGlyphSubstProc.h"
 
+U_NAMESPACE_BEGIN
+
 class LEGlyphStorage;
 
 class TrimmedArrayProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,6 +56,20 @@
 
     virtual ~TrimmedArrayProcessor();
 
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
 private:
     TrimmedArrayProcessor();
 
@@ -56,6 +77,9 @@
     TTGlyphID firstGlyph;
     TTGlyphID lastGlyph;
     const TrimmedArrayLookupTable *trimmedArrayLookupTable;
+
 };
 
+U_NAMESPACE_END
 #endif
+
--- a/jdk/src/share/native/sun/font/layout/ValueRecords.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ValueRecords.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -37,6 +37,8 @@
 #include "GlyphIterator.h"
 #include "LESwaps.h"
 
+U_NAMESPACE_BEGIN
+
 #define Nibble(value, nibble) ((value >> (nibble * 4)) & 0xF)
 #define NibbleBits(value, nibble) (bitsInNibble[Nibble(value, nibble)])
 
@@ -161,8 +163,8 @@
         xPlacementAdjustment, yPlacementAdjustment, xAdvanceAdjustment, yAdvanceAdjustment);
 }
 
-void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base,
-    GlyphIterator &glyphIterator, const LEFontInstance *fontInstance) const
+void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator,
+                                 const LEFontInstance *fontInstance) const
 {
     float xPlacementAdjustment = 0;
     float yPlacementAdjustment = 0;
@@ -323,3 +325,5 @@
 
     return getFieldCount(valueFormat & beforeMasks[field]);
 }
+
+U_NAMESPACE_END
--- a/jdk/src/share/native/sun/font/layout/ValueRecords.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/layout/ValueRecords.h	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,18 @@
 #ifndef __VALUERECORDS_H
 #define __VALUERECORDS_H
 
+/**
+ * \file
+ * \internal
+ */
+
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
 #include "GlyphIterator.h"
 
+U_NAMESPACE_BEGIN
+
 typedef le_uint16 ValueFormat;
 typedef le_int16 ValueRecordField;
 
@@ -84,5 +91,7 @@
     vfbAnyDevice    = vfbXPlaDevice + vfbYPlaDevice + vfbXAdvDevice + vfbYAdvDevice
 };
 
+U_NAMESPACE_END
+#endif
 
-#endif
+
--- a/jdk/src/share/native/sun/font/sunFont.c	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/sunFont.c	Wed Jul 05 17:01:52 2017 +0200
@@ -71,41 +71,14 @@
 
 void initLCDGammaTables();
 
-/*
- * Class:     sun_font_FontManager
- * Method:    getPlatformFontVar
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL
-Java_sun_font_FontManager_getPlatformFontVar(JNIEnv *env, jclass cl) {
-    char *c = getenv("JAVA2D_USEPLATFORMFONT");
-    if (c) {
-        return JNI_TRUE;
-    } else {
-        return JNI_FALSE;
-    }
-}
-
 /* placeholder for extern variable */
 FontManagerNativeIDs sunFontIDs;
 
 JNIEXPORT void JNICALL
-Java_sun_font_FontManager_initIDs
+Java_sun_font_SunFontManager_initIDs
     (JNIEnv *env, jclass cls) {
 
-     jclass tmpClass = (*env)->FindClass(env, "java/awt/Font");
-
-     sunFontIDs.getFont2DMID =
-         (*env)->GetMethodID(env, tmpClass, "getFont2D",
-                             "()Lsun/font/Font2D;");
-     sunFontIDs.font2DHandle =
-       (*env)->GetFieldID(env, tmpClass,
-                          "font2DHandle", "Lsun/font/Font2DHandle;");
-
-     sunFontIDs.createdFont =
-       (*env)->GetFieldID(env, tmpClass, "createdFont", "Z");
-
-     tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont");
+     jclass tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont");
      sunFontIDs.ttReadBlockMID =
          (*env)->GetMethodID(env, tmpClass, "readBlock",
                              "(Ljava/nio/ByteBuffer;II)I");
@@ -207,40 +180,6 @@
     return sunFontIDs;
 }
 
-JNIEXPORT jobject JNICALL
-Java_sun_font_FontManager_getFont2D(
-  JNIEnv *env,
-  jclass clsFM,
-  jobject javaFont) {
-
-    return (*env)->CallObjectMethod(env, javaFont, sunFontIDs.getFont2DMID);
-}
-
-JNIEXPORT void JNICALL
-Java_sun_font_FontManager_setFont2D(
-  JNIEnv *env,
-  jclass clsFM,
-  jobject javaFont,
-  jobject fontHandle) {
-    (*env)->SetObjectField(env, javaFont, sunFontIDs.font2DHandle, fontHandle);
-}
-
-JNIEXPORT void JNICALL
-Java_sun_font_FontManager_setCreatedFont(
-  JNIEnv *env,
-  jclass clsFM,
-  jobject javaFont) {
-    (*env)->SetBooleanField(env, javaFont, sunFontIDs.createdFont, JNI_TRUE);
-}
-
-JNIEXPORT jboolean JNICALL
-Java_sun_font_FontManager_isCreatedFont(
-  JNIEnv *env,
-  jclass clsFM,
-  jobject javaFont) {
-    return (*env)->GetBooleanField(env, javaFont, sunFontIDs.createdFont);
-}
-
 /*
  * Class:     sun_font_StrikeCache
  * Method:    freeIntPointer
--- a/jdk/src/share/native/sun/font/sunfontids.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/font/sunfontids.h	Wed Jul 05 17:01:52 2017 +0200
@@ -34,11 +34,6 @@
 
 typedef struct FontManagerNativeIDs {
 
-    /* java/awt/Font methods & fields */
-    jmethodID getFont2DMID;
-    jfieldID font2DHandle;
-    jfieldID createdFont;
-
     /* sun/font/Font2D methods */
     jmethodID getMapperMID;
     jmethodID getTableBytesMID;
--- a/jdk/src/share/native/sun/misc/VM.c	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/share/native/sun/misc/VM.c	Wed Jul 05 17:01:52 2017 +0200
@@ -131,17 +131,6 @@
 
         /* obtain the JVM version info */
         (*func_p)(env, &info, sizeof(info));
-
-        if (info.is_kernel_jvm == 1) {
-            /* set the static field VM.kernelVM to true for kernel VM */
-            fid = (*env)->GetStaticFieldID(env, cls, "kernelVM", "Z");
-            if (fid != 0) {
-                (*env)->SetStaticBooleanField(env, cls, fid, info.is_kernel_jvm);
-            } else {
-                sprintf(errmsg, "Static kernelVM boolean field not found");
-                JNU_ThrowInternalError(env, errmsg);
-            }
-        }
     }
 }
 
--- a/jdk/src/share/native/sun/security/ec/ec.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Elliptic Curve Cryptography library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef __ec_h_
-#define __ec_h_
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#define EC_DEBUG                          0
-#define EC_POINT_FORM_COMPRESSED_Y0    0x02
-#define EC_POINT_FORM_COMPRESSED_Y1    0x03
-#define EC_POINT_FORM_UNCOMPRESSED     0x04
-#define EC_POINT_FORM_HYBRID_Y0        0x06
-#define EC_POINT_FORM_HYBRID_Y1        0x07
-
-#define ANSI_X962_CURVE_OID_TOTAL_LEN    10
-#define SECG_CURVE_OID_TOTAL_LEN          7
-
-#endif /* __ec_h_ */
--- a/jdk/src/share/native/sun/security/ec/ec2.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _EC2_H
-#define _EC2_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecl-priv.h"
-
-/* Checks if point P(px, py) is at infinity.  Uses affine coordinates. */
-mp_err ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py);
-
-/* Sets P(px, py) to be the point at infinity.  Uses affine coordinates. */
-mp_err ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py);
-
-/* Computes R = P + Q where R is (rx, ry), P is (px, py) and Q is (qx,
- * qy). Uses affine coordinates. */
-mp_err ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py,
-                                                  const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                                  mp_int *ry, const ECGroup *group);
-
-/* Computes R = P - Q.  Uses affine coordinates. */
-mp_err ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py,
-                                                  const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                                  mp_int *ry, const ECGroup *group);
-
-/* Computes R = 2P.  Uses affine coordinates. */
-mp_err ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
-                                                  mp_int *ry, const ECGroup *group);
-
-/* Validates a point on a GF2m curve. */
-mp_err ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group);
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GF2M_PT_MUL_AFF
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the irreducible that
- * determines the field GF2m.  Uses affine coordinates. */
-mp_err ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px,
-                                                  const mp_int *py, mp_int *rx, mp_int *ry,
-                                                  const ECGroup *group);
-#endif
-
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the irreducible that
- * determines the field GF2m.  Uses Montgomery projective coordinates. */
-mp_err ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px,
-                                                   const mp_int *py, mp_int *rx, mp_int *ry,
-                                                   const ECGroup *group);
-
-#ifdef ECL_ENABLE_GF2M_PROJ
-/* Converts a point P(px, py) from affine coordinates to projective
- * coordinates R(rx, ry, rz). */
-mp_err ec_GF2m_pt_aff2proj(const mp_int *px, const mp_int *py, mp_int *rx,
-                                                   mp_int *ry, mp_int *rz, const ECGroup *group);
-
-/* Converts a point P(px, py, pz) from projective coordinates to affine
- * coordinates R(rx, ry). */
-mp_err ec_GF2m_pt_proj2aff(const mp_int *px, const mp_int *py,
-                                                   const mp_int *pz, mp_int *rx, mp_int *ry,
-                                                   const ECGroup *group);
-
-/* Checks if point P(px, py, pz) is at infinity.  Uses projective
- * coordinates. */
-mp_err ec_GF2m_pt_is_inf_proj(const mp_int *px, const mp_int *py,
-                                                          const mp_int *pz);
-
-/* Sets P(px, py, pz) to be the point at infinity.  Uses projective
- * coordinates. */
-mp_err ec_GF2m_pt_set_inf_proj(mp_int *px, mp_int *py, mp_int *pz);
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, qz).  Uses projective coordinates. */
-mp_err ec_GF2m_pt_add_proj(const mp_int *px, const mp_int *py,
-                                                   const mp_int *pz, const mp_int *qx,
-                                                   const mp_int *qy, mp_int *rx, mp_int *ry,
-                                                   mp_int *rz, const ECGroup *group);
-
-/* Computes R = 2P.  Uses projective coordinates. */
-mp_err ec_GF2m_pt_dbl_proj(const mp_int *px, const mp_int *py,
-                                                   const mp_int *pz, mp_int *rx, mp_int *ry,
-                                                   mp_int *rz, const ECGroup *group);
-
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GF2m.  Uses projective coordinates. */
-mp_err ec_GF2m_pt_mul_proj(const mp_int *n, const mp_int *px,
-                                                   const mp_int *py, mp_int *rx, mp_int *ry,
-                                                   const ECGroup *group);
-#endif
-
-#endif /* _EC2_H */
--- a/jdk/src/share/native/sun/security/ec/ec2_163.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <fungstep@hotmail.com>, and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ec2.h"
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mpi.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast reduction for polynomials over a 163-bit curve. Assumes reduction
- * polynomial with terms {163, 7, 6, 3, 0}. */
-mp_err
-ec_GF2m_163_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit *u, z;
-
-        if (a != r) {
-                MP_CHECKOK(mp_copy(a, r));
-        }
-#ifdef ECL_SIXTY_FOUR_BIT
-        if (MP_USED(r) < 6) {
-                MP_CHECKOK(s_mp_pad(r, 6));
-        }
-        u = MP_DIGITS(r);
-        MP_USED(r) = 6;
-
-        /* u[5] only has 6 significant bits */
-        z = u[5];
-        u[2] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29);
-        z = u[4];
-        u[2] ^= (z >> 28) ^ (z >> 29) ^ (z >> 32) ^ (z >> 35);
-        u[1] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29);
-        z = u[3];
-        u[1] ^= (z >> 28) ^ (z >> 29) ^ (z >> 32) ^ (z >> 35);
-        u[0] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29);
-        z = u[2] >> 35;                         /* z only has 29 significant bits */
-        u[0] ^= (z << 7) ^ (z << 6) ^ (z << 3) ^ z;
-        /* clear bits above 163 */
-        u[5] = u[4] = u[3] = 0;
-        u[2] ^= z << 35;
-#else
-        if (MP_USED(r) < 11) {
-                MP_CHECKOK(s_mp_pad(r, 11));
-        }
-        u = MP_DIGITS(r);
-        MP_USED(r) = 11;
-
-        /* u[11] only has 6 significant bits */
-        z = u[10];
-        u[5] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
-        u[4] ^= (z << 29);
-        z = u[9];
-        u[5] ^= (z >> 28) ^ (z >> 29);
-        u[4] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
-        u[3] ^= (z << 29);
-        z = u[8];
-        u[4] ^= (z >> 28) ^ (z >> 29);
-        u[3] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
-        u[2] ^= (z << 29);
-        z = u[7];
-        u[3] ^= (z >> 28) ^ (z >> 29);
-        u[2] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
-        u[1] ^= (z << 29);
-        z = u[6];
-        u[2] ^= (z >> 28) ^ (z >> 29);
-        u[1] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
-        u[0] ^= (z << 29);
-        z = u[5] >> 3;                          /* z only has 29 significant bits */
-        u[1] ^= (z >> 25) ^ (z >> 26);
-        u[0] ^= (z << 7) ^ (z << 6) ^ (z << 3) ^ z;
-        /* clear bits above 163 */
-        u[11] = u[10] = u[9] = u[8] = u[7] = u[6] = 0;
-        u[5] ^= z << 3;
-#endif
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* Fast squaring for polynomials over a 163-bit curve. Assumes reduction
- * polynomial with terms {163, 7, 6, 3, 0}. */
-mp_err
-ec_GF2m_163_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit *u, *v;
-
-        v = MP_DIGITS(a);
-
-#ifdef ECL_SIXTY_FOUR_BIT
-        if (MP_USED(a) < 3) {
-                return mp_bsqrmod(a, meth->irr_arr, r);
-        }
-        if (MP_USED(r) < 6) {
-                MP_CHECKOK(s_mp_pad(r, 6));
-        }
-        MP_USED(r) = 6;
-#else
-        if (MP_USED(a) < 6) {
-                return mp_bsqrmod(a, meth->irr_arr, r);
-        }
-        if (MP_USED(r) < 12) {
-                MP_CHECKOK(s_mp_pad(r, 12));
-        }
-        MP_USED(r) = 12;
-#endif
-        u = MP_DIGITS(r);
-
-#ifdef ECL_THIRTY_TWO_BIT
-        u[11] = gf2m_SQR1(v[5]);
-        u[10] = gf2m_SQR0(v[5]);
-        u[9] = gf2m_SQR1(v[4]);
-        u[8] = gf2m_SQR0(v[4]);
-        u[7] = gf2m_SQR1(v[3]);
-        u[6] = gf2m_SQR0(v[3]);
-#endif
-        u[5] = gf2m_SQR1(v[2]);
-        u[4] = gf2m_SQR0(v[2]);
-        u[3] = gf2m_SQR1(v[1]);
-        u[2] = gf2m_SQR0(v[1]);
-        u[1] = gf2m_SQR1(v[0]);
-        u[0] = gf2m_SQR0(v[0]);
-        return ec_GF2m_163_mod(r, r, meth);
-
-  CLEANUP:
-        return res;
-}
-
-/* Fast multiplication for polynomials over a 163-bit curve. Assumes
- * reduction polynomial with terms {163, 7, 6, 3, 0}. */
-mp_err
-ec_GF2m_163_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a2 = 0, a1 = 0, a0, b2 = 0, b1 = 0, b0;
-
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit a5 = 0, a4 = 0, a3 = 0, b5 = 0, b4 = 0, b3 = 0;
-        mp_digit rm[6];
-#endif
-
-        if (a == b) {
-                return ec_GF2m_163_sqr(a, r, meth);
-        } else {
-                switch (MP_USED(a)) {
-#ifdef ECL_THIRTY_TWO_BIT
-                case 6:
-                        a5 = MP_DIGIT(a, 5);
-                case 5:
-                        a4 = MP_DIGIT(a, 4);
-                case 4:
-                        a3 = MP_DIGIT(a, 3);
-#endif
-                case 3:
-                        a2 = MP_DIGIT(a, 2);
-                case 2:
-                        a1 = MP_DIGIT(a, 1);
-                default:
-                        a0 = MP_DIGIT(a, 0);
-                }
-                switch (MP_USED(b)) {
-#ifdef ECL_THIRTY_TWO_BIT
-                case 6:
-                        b5 = MP_DIGIT(b, 5);
-                case 5:
-                        b4 = MP_DIGIT(b, 4);
-                case 4:
-                        b3 = MP_DIGIT(b, 3);
-#endif
-                case 3:
-                        b2 = MP_DIGIT(b, 2);
-                case 2:
-                        b1 = MP_DIGIT(b, 1);
-                default:
-                        b0 = MP_DIGIT(b, 0);
-                }
-#ifdef ECL_SIXTY_FOUR_BIT
-                MP_CHECKOK(s_mp_pad(r, 6));
-                s_bmul_3x3(MP_DIGITS(r), a2, a1, a0, b2, b1, b0);
-                MP_USED(r) = 6;
-                s_mp_clamp(r);
-#else
-                MP_CHECKOK(s_mp_pad(r, 12));
-                s_bmul_3x3(MP_DIGITS(r) + 6, a5, a4, a3, b5, b4, b3);
-                s_bmul_3x3(MP_DIGITS(r), a2, a1, a0, b2, b1, b0);
-                s_bmul_3x3(rm, a5 ^ a2, a4 ^ a1, a3 ^ a0, b5 ^ b2, b4 ^ b1,
-                                   b3 ^ b0);
-                rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 11);
-                rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 10);
-                rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 9);
-                rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 8);
-                rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 7);
-                rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 6);
-                MP_DIGIT(r, 8) ^= rm[5];
-                MP_DIGIT(r, 7) ^= rm[4];
-                MP_DIGIT(r, 6) ^= rm[3];
-                MP_DIGIT(r, 5) ^= rm[2];
-                MP_DIGIT(r, 4) ^= rm[1];
-                MP_DIGIT(r, 3) ^= rm[0];
-                MP_USED(r) = 12;
-                s_mp_clamp(r);
-#endif
-                return ec_GF2m_163_mod(r, r, meth);
-        }
-
-  CLEANUP:
-        return res;
-}
-
-/* Wire in fast field arithmetic for 163-bit curves. */
-mp_err
-ec_group_set_gf2m163(ECGroup *group, ECCurveName name)
-{
-        group->meth->field_mod = &ec_GF2m_163_mod;
-        group->meth->field_mul = &ec_GF2m_163_mul;
-        group->meth->field_sqr = &ec_GF2m_163_sqr;
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ec2_193.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <fungstep@hotmail.com>, and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ec2.h"
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mpi.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast reduction for polynomials over a 193-bit curve. Assumes reduction
- * polynomial with terms {193, 15, 0}. */
-mp_err
-ec_GF2m_193_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit *u, z;
-
-        if (a != r) {
-                MP_CHECKOK(mp_copy(a, r));
-        }
-#ifdef ECL_SIXTY_FOUR_BIT
-        if (MP_USED(r) < 7) {
-                MP_CHECKOK(s_mp_pad(r, 7));
-        }
-        u = MP_DIGITS(r);
-        MP_USED(r) = 7;
-
-        /* u[6] only has 2 significant bits */
-        z = u[6];
-        u[3] ^= (z << 14) ^ (z >> 1);
-        u[2] ^= (z << 63);
-        z = u[5];
-        u[3] ^= (z >> 50);
-        u[2] ^= (z << 14) ^ (z >> 1);
-        u[1] ^= (z << 63);
-        z = u[4];
-        u[2] ^= (z >> 50);
-        u[1] ^= (z << 14) ^ (z >> 1);
-        u[0] ^= (z << 63);
-        z = u[3] >> 1;                          /* z only has 63 significant bits */
-        u[1] ^= (z >> 49);
-        u[0] ^= (z << 15) ^ z;
-        /* clear bits above 193 */
-        u[6] = u[5] = u[4] = 0;
-        u[3] ^= z << 1;
-#else
-        if (MP_USED(r) < 13) {
-                MP_CHECKOK(s_mp_pad(r, 13));
-        }
-        u = MP_DIGITS(r);
-        MP_USED(r) = 13;
-
-        /* u[12] only has 2 significant bits */
-        z = u[12];
-        u[6] ^= (z << 14) ^ (z >> 1);
-        u[5] ^= (z << 31);
-        z = u[11];
-        u[6] ^= (z >> 18);
-        u[5] ^= (z << 14) ^ (z >> 1);
-        u[4] ^= (z << 31);
-        z = u[10];
-        u[5] ^= (z >> 18);
-        u[4] ^= (z << 14) ^ (z >> 1);
-        u[3] ^= (z << 31);
-        z = u[9];
-        u[4] ^= (z >> 18);
-        u[3] ^= (z << 14) ^ (z >> 1);
-        u[2] ^= (z << 31);
-        z = u[8];
-        u[3] ^= (z >> 18);
-        u[2] ^= (z << 14) ^ (z >> 1);
-        u[1] ^= (z << 31);
-        z = u[7];
-        u[2] ^= (z >> 18);
-        u[1] ^= (z << 14) ^ (z >> 1);
-        u[0] ^= (z << 31);
-        z = u[6] >> 1;                          /* z only has 31 significant bits */
-        u[1] ^= (z >> 17);
-        u[0] ^= (z << 15) ^ z;
-        /* clear bits above 193 */
-        u[12] = u[11] = u[10] = u[9] = u[8] = u[7] = 0;
-        u[6] ^= z << 1;
-#endif
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* Fast squaring for polynomials over a 193-bit curve. Assumes reduction
- * polynomial with terms {193, 15, 0}. */
-mp_err
-ec_GF2m_193_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit *u, *v;
-
-        v = MP_DIGITS(a);
-
-#ifdef ECL_SIXTY_FOUR_BIT
-        if (MP_USED(a) < 4) {
-                return mp_bsqrmod(a, meth->irr_arr, r);
-        }
-        if (MP_USED(r) < 7) {
-                MP_CHECKOK(s_mp_pad(r, 7));
-        }
-        MP_USED(r) = 7;
-#else
-        if (MP_USED(a) < 7) {
-                return mp_bsqrmod(a, meth->irr_arr, r);
-        }
-        if (MP_USED(r) < 13) {
-                MP_CHECKOK(s_mp_pad(r, 13));
-        }
-        MP_USED(r) = 13;
-#endif
-        u = MP_DIGITS(r);
-
-#ifdef ECL_THIRTY_TWO_BIT
-        u[12] = gf2m_SQR0(v[6]);
-        u[11] = gf2m_SQR1(v[5]);
-        u[10] = gf2m_SQR0(v[5]);
-        u[9] = gf2m_SQR1(v[4]);
-        u[8] = gf2m_SQR0(v[4]);
-        u[7] = gf2m_SQR1(v[3]);
-#endif
-        u[6] = gf2m_SQR0(v[3]);
-        u[5] = gf2m_SQR1(v[2]);
-        u[4] = gf2m_SQR0(v[2]);
-        u[3] = gf2m_SQR1(v[1]);
-        u[2] = gf2m_SQR0(v[1]);
-        u[1] = gf2m_SQR1(v[0]);
-        u[0] = gf2m_SQR0(v[0]);
-        return ec_GF2m_193_mod(r, r, meth);
-
-  CLEANUP:
-        return res;
-}
-
-/* Fast multiplication for polynomials over a 193-bit curve. Assumes
- * reduction polynomial with terms {193, 15, 0}. */
-mp_err
-ec_GF2m_193_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0;
-
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit a6 = 0, a5 = 0, a4 = 0, b6 = 0, b5 = 0, b4 = 0;
-        mp_digit rm[8];
-#endif
-
-        if (a == b) {
-                return ec_GF2m_193_sqr(a, r, meth);
-        } else {
-                switch (MP_USED(a)) {
-#ifdef ECL_THIRTY_TWO_BIT
-                case 7:
-                        a6 = MP_DIGIT(a, 6);
-                case 6:
-                        a5 = MP_DIGIT(a, 5);
-                case 5:
-                        a4 = MP_DIGIT(a, 4);
-#endif
-                case 4:
-                        a3 = MP_DIGIT(a, 3);
-                case 3:
-                        a2 = MP_DIGIT(a, 2);
-                case 2:
-                        a1 = MP_DIGIT(a, 1);
-                default:
-                        a0 = MP_DIGIT(a, 0);
-                }
-                switch (MP_USED(b)) {
-#ifdef ECL_THIRTY_TWO_BIT
-                case 7:
-                        b6 = MP_DIGIT(b, 6);
-                case 6:
-                        b5 = MP_DIGIT(b, 5);
-                case 5:
-                        b4 = MP_DIGIT(b, 4);
-#endif
-                case 4:
-                        b3 = MP_DIGIT(b, 3);
-                case 3:
-                        b2 = MP_DIGIT(b, 2);
-                case 2:
-                        b1 = MP_DIGIT(b, 1);
-                default:
-                        b0 = MP_DIGIT(b, 0);
-                }
-#ifdef ECL_SIXTY_FOUR_BIT
-                MP_CHECKOK(s_mp_pad(r, 8));
-                s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
-                MP_USED(r) = 8;
-                s_mp_clamp(r);
-#else
-                MP_CHECKOK(s_mp_pad(r, 14));
-                s_bmul_3x3(MP_DIGITS(r) + 8, a6, a5, a4, b6, b5, b4);
-                s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
-                s_bmul_4x4(rm, a3, a6 ^ a2, a5 ^ a1, a4 ^ a0, b3, b6 ^ b2, b5 ^ b1,
-                                   b4 ^ b0);
-                rm[7] ^= MP_DIGIT(r, 7);
-                rm[6] ^= MP_DIGIT(r, 6);
-                rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 13);
-                rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 12);
-                rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 11);
-                rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 10);
-                rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 9);
-                rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 8);
-                MP_DIGIT(r, 11) ^= rm[7];
-                MP_DIGIT(r, 10) ^= rm[6];
-                MP_DIGIT(r, 9) ^= rm[5];
-                MP_DIGIT(r, 8) ^= rm[4];
-                MP_DIGIT(r, 7) ^= rm[3];
-                MP_DIGIT(r, 6) ^= rm[2];
-                MP_DIGIT(r, 5) ^= rm[1];
-                MP_DIGIT(r, 4) ^= rm[0];
-                MP_USED(r) = 14;
-                s_mp_clamp(r);
-#endif
-                return ec_GF2m_193_mod(r, r, meth);
-        }
-
-  CLEANUP:
-        return res;
-}
-
-/* Wire in fast field arithmetic for 193-bit curves. */
-mp_err
-ec_group_set_gf2m193(ECGroup *group, ECCurveName name)
-{
-        group->meth->field_mod = &ec_GF2m_193_mod;
-        group->meth->field_mul = &ec_GF2m_193_mul;
-        group->meth->field_sqr = &ec_GF2m_193_sqr;
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ec2_233.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <fungstep@hotmail.com>, and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ec2.h"
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mpi.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast reduction for polynomials over a 233-bit curve. Assumes reduction
- * polynomial with terms {233, 74, 0}. */
-mp_err
-ec_GF2m_233_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit *u, z;
-
-        if (a != r) {
-                MP_CHECKOK(mp_copy(a, r));
-        }
-#ifdef ECL_SIXTY_FOUR_BIT
-        if (MP_USED(r) < 8) {
-                MP_CHECKOK(s_mp_pad(r, 8));
-        }
-        u = MP_DIGITS(r);
-        MP_USED(r) = 8;
-
-        /* u[7] only has 18 significant bits */
-        z = u[7];
-        u[4] ^= (z << 33) ^ (z >> 41);
-        u[3] ^= (z << 23);
-        z = u[6];
-        u[4] ^= (z >> 31);
-        u[3] ^= (z << 33) ^ (z >> 41);
-        u[2] ^= (z << 23);
-        z = u[5];
-        u[3] ^= (z >> 31);
-        u[2] ^= (z << 33) ^ (z >> 41);
-        u[1] ^= (z << 23);
-        z = u[4];
-        u[2] ^= (z >> 31);
-        u[1] ^= (z << 33) ^ (z >> 41);
-        u[0] ^= (z << 23);
-        z = u[3] >> 41;                         /* z only has 23 significant bits */
-        u[1] ^= (z << 10);
-        u[0] ^= z;
-        /* clear bits above 233 */
-        u[7] = u[6] = u[5] = u[4] = 0;
-        u[3] ^= z << 41;
-#else
-        if (MP_USED(r) < 15) {
-                MP_CHECKOK(s_mp_pad(r, 15));
-        }
-        u = MP_DIGITS(r);
-        MP_USED(r) = 15;
-
-        /* u[14] only has 18 significant bits */
-        z = u[14];
-        u[9] ^= (z << 1);
-        u[7] ^= (z >> 9);
-        u[6] ^= (z << 23);
-        z = u[13];
-        u[9] ^= (z >> 31);
-        u[8] ^= (z << 1);
-        u[6] ^= (z >> 9);
-        u[5] ^= (z << 23);
-        z = u[12];
-        u[8] ^= (z >> 31);
-        u[7] ^= (z << 1);
-        u[5] ^= (z >> 9);
-        u[4] ^= (z << 23);
-        z = u[11];
-        u[7] ^= (z >> 31);
-        u[6] ^= (z << 1);
-        u[4] ^= (z >> 9);
-        u[3] ^= (z << 23);
-        z = u[10];
-        u[6] ^= (z >> 31);
-        u[5] ^= (z << 1);
-        u[3] ^= (z >> 9);
-        u[2] ^= (z << 23);
-        z = u[9];
-        u[5] ^= (z >> 31);
-        u[4] ^= (z << 1);
-        u[2] ^= (z >> 9);
-        u[1] ^= (z << 23);
-        z = u[8];
-        u[4] ^= (z >> 31);
-        u[3] ^= (z << 1);
-        u[1] ^= (z >> 9);
-        u[0] ^= (z << 23);
-        z = u[7] >> 9;                          /* z only has 23 significant bits */
-        u[3] ^= (z >> 22);
-        u[2] ^= (z << 10);
-        u[0] ^= z;
-        /* clear bits above 233 */
-        u[14] = u[13] = u[12] = u[11] = u[10] = u[9] = u[8] = 0;
-        u[7] ^= z << 9;
-#endif
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* Fast squaring for polynomials over a 233-bit curve. Assumes reduction
- * polynomial with terms {233, 74, 0}. */
-mp_err
-ec_GF2m_233_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit *u, *v;
-
-        v = MP_DIGITS(a);
-
-#ifdef ECL_SIXTY_FOUR_BIT
-        if (MP_USED(a) < 4) {
-                return mp_bsqrmod(a, meth->irr_arr, r);
-        }
-        if (MP_USED(r) < 8) {
-                MP_CHECKOK(s_mp_pad(r, 8));
-        }
-        MP_USED(r) = 8;
-#else
-        if (MP_USED(a) < 8) {
-                return mp_bsqrmod(a, meth->irr_arr, r);
-        }
-        if (MP_USED(r) < 15) {
-                MP_CHECKOK(s_mp_pad(r, 15));
-        }
-        MP_USED(r) = 15;
-#endif
-        u = MP_DIGITS(r);
-
-#ifdef ECL_THIRTY_TWO_BIT
-        u[14] = gf2m_SQR0(v[7]);
-        u[13] = gf2m_SQR1(v[6]);
-        u[12] = gf2m_SQR0(v[6]);
-        u[11] = gf2m_SQR1(v[5]);
-        u[10] = gf2m_SQR0(v[5]);
-        u[9] = gf2m_SQR1(v[4]);
-        u[8] = gf2m_SQR0(v[4]);
-#endif
-        u[7] = gf2m_SQR1(v[3]);
-        u[6] = gf2m_SQR0(v[3]);
-        u[5] = gf2m_SQR1(v[2]);
-        u[4] = gf2m_SQR0(v[2]);
-        u[3] = gf2m_SQR1(v[1]);
-        u[2] = gf2m_SQR0(v[1]);
-        u[1] = gf2m_SQR1(v[0]);
-        u[0] = gf2m_SQR0(v[0]);
-        return ec_GF2m_233_mod(r, r, meth);
-
-  CLEANUP:
-        return res;
-}
-
-/* Fast multiplication for polynomials over a 233-bit curve. Assumes
- * reduction polynomial with terms {233, 74, 0}. */
-mp_err
-ec_GF2m_233_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0;
-
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit a7 = 0, a6 = 0, a5 = 0, a4 = 0, b7 = 0, b6 = 0, b5 = 0, b4 =
-                0;
-        mp_digit rm[8];
-#endif
-
-        if (a == b) {
-                return ec_GF2m_233_sqr(a, r, meth);
-        } else {
-                switch (MP_USED(a)) {
-#ifdef ECL_THIRTY_TWO_BIT
-                case 8:
-                        a7 = MP_DIGIT(a, 7);
-                case 7:
-                        a6 = MP_DIGIT(a, 6);
-                case 6:
-                        a5 = MP_DIGIT(a, 5);
-                case 5:
-                        a4 = MP_DIGIT(a, 4);
-#endif
-                case 4:
-                        a3 = MP_DIGIT(a, 3);
-                case 3:
-                        a2 = MP_DIGIT(a, 2);
-                case 2:
-                        a1 = MP_DIGIT(a, 1);
-                default:
-                        a0 = MP_DIGIT(a, 0);
-                }
-                switch (MP_USED(b)) {
-#ifdef ECL_THIRTY_TWO_BIT
-                case 8:
-                        b7 = MP_DIGIT(b, 7);
-                case 7:
-                        b6 = MP_DIGIT(b, 6);
-                case 6:
-                        b5 = MP_DIGIT(b, 5);
-                case 5:
-                        b4 = MP_DIGIT(b, 4);
-#endif
-                case 4:
-                        b3 = MP_DIGIT(b, 3);
-                case 3:
-                        b2 = MP_DIGIT(b, 2);
-                case 2:
-                        b1 = MP_DIGIT(b, 1);
-                default:
-                        b0 = MP_DIGIT(b, 0);
-                }
-#ifdef ECL_SIXTY_FOUR_BIT
-                MP_CHECKOK(s_mp_pad(r, 8));
-                s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
-                MP_USED(r) = 8;
-                s_mp_clamp(r);
-#else
-                MP_CHECKOK(s_mp_pad(r, 16));
-                s_bmul_4x4(MP_DIGITS(r) + 8, a7, a6, a5, a4, b7, b6, b5, b4);
-                s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
-                s_bmul_4x4(rm, a7 ^ a3, a6 ^ a2, a5 ^ a1, a4 ^ a0, b7 ^ b3,
-                                   b6 ^ b2, b5 ^ b1, b4 ^ b0);
-                rm[7] ^= MP_DIGIT(r, 7) ^ MP_DIGIT(r, 15);
-                rm[6] ^= MP_DIGIT(r, 6) ^ MP_DIGIT(r, 14);
-                rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 13);
-                rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 12);
-                rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 11);
-                rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 10);
-                rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 9);
-                rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 8);
-                MP_DIGIT(r, 11) ^= rm[7];
-                MP_DIGIT(r, 10) ^= rm[6];
-                MP_DIGIT(r, 9) ^= rm[5];
-                MP_DIGIT(r, 8) ^= rm[4];
-                MP_DIGIT(r, 7) ^= rm[3];
-                MP_DIGIT(r, 6) ^= rm[2];
-                MP_DIGIT(r, 5) ^= rm[1];
-                MP_DIGIT(r, 4) ^= rm[0];
-                MP_USED(r) = 16;
-                s_mp_clamp(r);
-#endif
-                return ec_GF2m_233_mod(r, r, meth);
-        }
-
-  CLEANUP:
-        return res;
-}
-
-/* Wire in fast field arithmetic for 233-bit curves. */
-mp_err
-ec_group_set_gf2m233(ECGroup *group, ECCurveName name)
-{
-        group->meth->field_mod = &ec_GF2m_233_mod;
-        group->meth->field_mul = &ec_GF2m_233_mul;
-        group->meth->field_sqr = &ec_GF2m_233_sqr;
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ec2_aff.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,368 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ec2.h"
-#include "mplogic.h"
-#include "mp_gf2m.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Checks if point P(px, py) is at infinity.  Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py)
-{
-
-        if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
-                return MP_YES;
-        } else {
-                return MP_NO;
-        }
-
-}
-
-/* Sets P(px, py) to be the point at infinity.  Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py)
-{
-        mp_zero(px);
-        mp_zero(py);
-        return MP_OKAY;
-}
-
-/* Computes R = P + Q based on IEEE P1363 A.10.2. Elliptic curve points P,
- * Q, and R can all be identical. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
-                                   const mp_int *qy, mp_int *rx, mp_int *ry,
-                                   const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int lambda, tempx, tempy;
-
-        MP_DIGITS(&lambda) = 0;
-        MP_DIGITS(&tempx) = 0;
-        MP_DIGITS(&tempy) = 0;
-        MP_CHECKOK(mp_init(&lambda, FLAG(px)));
-        MP_CHECKOK(mp_init(&tempx, FLAG(px)));
-        MP_CHECKOK(mp_init(&tempy, FLAG(px)));
-        /* if P = inf, then R = Q */
-        if (ec_GF2m_pt_is_inf_aff(px, py) == 0) {
-                MP_CHECKOK(mp_copy(qx, rx));
-                MP_CHECKOK(mp_copy(qy, ry));
-                res = MP_OKAY;
-                goto CLEANUP;
-        }
-        /* if Q = inf, then R = P */
-        if (ec_GF2m_pt_is_inf_aff(qx, qy) == 0) {
-                MP_CHECKOK(mp_copy(px, rx));
-                MP_CHECKOK(mp_copy(py, ry));
-                res = MP_OKAY;
-                goto CLEANUP;
-        }
-        /* if px != qx, then lambda = (py+qy) / (px+qx), tempx = a + lambda^2
-         * + lambda + px + qx */
-        if (mp_cmp(px, qx) != 0) {
-                MP_CHECKOK(group->meth->field_add(py, qy, &tempy, group->meth));
-                MP_CHECKOK(group->meth->field_add(px, qx, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_div(&tempy, &tempx, &lambda, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, &lambda, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, &group->curvea, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, px, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, qx, &tempx, group->meth));
-        } else {
-                /* if py != qy or qx = 0, then R = inf */
-                if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qx) == 0)) {
-                        mp_zero(rx);
-                        mp_zero(ry);
-                        res = MP_OKAY;
-                        goto CLEANUP;
-                }
-                /* lambda = qx + qy / qx */
-                MP_CHECKOK(group->meth->field_div(qy, qx, &lambda, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&lambda, qx, &lambda, group->meth));
-                /* tempx = a + lambda^2 + lambda */
-                MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, &lambda, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, &group->curvea, &tempx, group->meth));
-        }
-        /* ry = (qx + tempx) * lambda + tempx + qy */
-        MP_CHECKOK(group->meth->field_add(qx, &tempx, &tempy, group->meth));
-        MP_CHECKOK(group->meth->
-                           field_mul(&tempy, &lambda, &tempy, group->meth));
-        MP_CHECKOK(group->meth->
-                           field_add(&tempy, &tempx, &tempy, group->meth));
-        MP_CHECKOK(group->meth->field_add(&tempy, qy, ry, group->meth));
-        /* rx = tempx */
-        MP_CHECKOK(mp_copy(&tempx, rx));
-
-  CLEANUP:
-        mp_clear(&lambda);
-        mp_clear(&tempx);
-        mp_clear(&tempy);
-        return res;
-}
-
-/* Computes R = P - Q. Elliptic curve points P, Q, and R can all be
- * identical. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
-                                   const mp_int *qy, mp_int *rx, mp_int *ry,
-                                   const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int nqy;
-
-        MP_DIGITS(&nqy) = 0;
-        MP_CHECKOK(mp_init(&nqy, FLAG(px)));
-        /* nqy = qx+qy */
-        MP_CHECKOK(group->meth->field_add(qx, qy, &nqy, group->meth));
-        MP_CHECKOK(group->point_add(px, py, qx, &nqy, rx, ry, group));
-  CLEANUP:
-        mp_clear(&nqy);
-        return res;
-}
-
-/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses
- * affine coordinates. */
-mp_err
-ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
-                                   mp_int *ry, const ECGroup *group)
-{
-        return group->point_add(px, py, px, py, rx, ry, group);
-}
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GF2M_PT_MUL_AFF
-/* Computes R = nP based on IEEE P1363 A.10.3. Elliptic curve points P and
- * R can be identical. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
-                                   mp_int *rx, mp_int *ry, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int k, k3, qx, qy, sx, sy;
-        int b1, b3, i, l;
-
-        MP_DIGITS(&k) = 0;
-        MP_DIGITS(&k3) = 0;
-        MP_DIGITS(&qx) = 0;
-        MP_DIGITS(&qy) = 0;
-        MP_DIGITS(&sx) = 0;
-        MP_DIGITS(&sy) = 0;
-        MP_CHECKOK(mp_init(&k));
-        MP_CHECKOK(mp_init(&k3));
-        MP_CHECKOK(mp_init(&qx));
-        MP_CHECKOK(mp_init(&qy));
-        MP_CHECKOK(mp_init(&sx));
-        MP_CHECKOK(mp_init(&sy));
-
-        /* if n = 0 then r = inf */
-        if (mp_cmp_z(n) == 0) {
-                mp_zero(rx);
-                mp_zero(ry);
-                res = MP_OKAY;
-                goto CLEANUP;
-        }
-        /* Q = P, k = n */
-        MP_CHECKOK(mp_copy(px, &qx));
-        MP_CHECKOK(mp_copy(py, &qy));
-        MP_CHECKOK(mp_copy(n, &k));
-        /* if n < 0 then Q = -Q, k = -k */
-        if (mp_cmp_z(n) < 0) {
-                MP_CHECKOK(group->meth->field_add(&qx, &qy, &qy, group->meth));
-                MP_CHECKOK(mp_neg(&k, &k));
-        }
-#ifdef ECL_DEBUG                                /* basic double and add method */
-        l = mpl_significant_bits(&k) - 1;
-        MP_CHECKOK(mp_copy(&qx, &sx));
-        MP_CHECKOK(mp_copy(&qy, &sy));
-        for (i = l - 1; i >= 0; i--) {
-                /* S = 2S */
-                MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
-                /* if k_i = 1, then S = S + Q */
-                if (mpl_get_bit(&k, i) != 0) {
-                        MP_CHECKOK(group->
-                                           point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
-                }
-        }
-#else                                                   /* double and add/subtract method from
-                                                                 * standard */
-        /* k3 = 3 * k */
-        MP_CHECKOK(mp_set_int(&k3, 3));
-        MP_CHECKOK(mp_mul(&k, &k3, &k3));
-        /* S = Q */
-        MP_CHECKOK(mp_copy(&qx, &sx));
-        MP_CHECKOK(mp_copy(&qy, &sy));
-        /* l = index of high order bit in binary representation of 3*k */
-        l = mpl_significant_bits(&k3) - 1;
-        /* for i = l-1 downto 1 */
-        for (i = l - 1; i >= 1; i--) {
-                /* S = 2S */
-                MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
-                b3 = MP_GET_BIT(&k3, i);
-                b1 = MP_GET_BIT(&k, i);
-                /* if k3_i = 1 and k_i = 0, then S = S + Q */
-                if ((b3 == 1) && (b1 == 0)) {
-                        MP_CHECKOK(group->
-                                           point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
-                        /* if k3_i = 0 and k_i = 1, then S = S - Q */
-                } else if ((b3 == 0) && (b1 == 1)) {
-                        MP_CHECKOK(group->
-                                           point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group));
-                }
-        }
-#endif
-        /* output S */
-        MP_CHECKOK(mp_copy(&sx, rx));
-        MP_CHECKOK(mp_copy(&sy, ry));
-
-  CLEANUP:
-        mp_clear(&k);
-        mp_clear(&k3);
-        mp_clear(&qx);
-        mp_clear(&qy);
-        mp_clear(&sx);
-        mp_clear(&sy);
-        return res;
-}
-#endif
-
-/* Validates a point on a GF2m curve. */
-mp_err
-ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
-{
-        mp_err res = MP_NO;
-        mp_int accl, accr, tmp, pxt, pyt;
-
-        MP_DIGITS(&accl) = 0;
-        MP_DIGITS(&accr) = 0;
-        MP_DIGITS(&tmp) = 0;
-        MP_DIGITS(&pxt) = 0;
-        MP_DIGITS(&pyt) = 0;
-        MP_CHECKOK(mp_init(&accl, FLAG(px)));
-        MP_CHECKOK(mp_init(&accr, FLAG(px)));
-        MP_CHECKOK(mp_init(&tmp, FLAG(px)));
-        MP_CHECKOK(mp_init(&pxt, FLAG(px)));
-        MP_CHECKOK(mp_init(&pyt, FLAG(px)));
-
-    /* 1: Verify that publicValue is not the point at infinity */
-        if (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-    /* 2: Verify that the coordinates of publicValue are elements
-     *    of the field.
-     */
-        if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) ||
-                (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-    /* 3: Verify that publicValue is on the curve. */
-        if (group->meth->field_enc) {
-                group->meth->field_enc(px, &pxt, group->meth);
-                group->meth->field_enc(py, &pyt, group->meth);
-        } else {
-                mp_copy(px, &pxt);
-                mp_copy(py, &pyt);
-        }
-        /* left-hand side: y^2 + x*y  */
-        MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) );
-        MP_CHECKOK( group->meth->field_mul(&pxt, &pyt, &tmp, group->meth) );
-        MP_CHECKOK( group->meth->field_add(&accl, &tmp, &accl, group->meth) );
-        /* right-hand side: x^3 + a*x^2 + b */
-        MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) );
-        MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) );
-        MP_CHECKOK( group->meth->field_mul(&group->curvea, &tmp, &tmp, group->meth) );
-        MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) );
-        MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) );
-        /* check LHS - RHS == 0 */
-        MP_CHECKOK( group->meth->field_add(&accl, &accr, &accr, group->meth) );
-        if (mp_cmp_z(&accr) != 0) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-    /* 4: Verify that the order of the curve times the publicValue
-     *    is the point at infinity.
-     */
-        MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );
-        if (ec_GF2m_pt_is_inf_aff(&pxt, &pyt) != MP_YES) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-
-        res = MP_YES;
-
-CLEANUP:
-        mp_clear(&accl);
-        mp_clear(&accr);
-        mp_clear(&tmp);
-        mp_clear(&pxt);
-        mp_clear(&pyt);
-        return res;
-}
--- a/jdk/src/share/native/sun/security/ec/ec2_mont.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,296 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <fungstep@hotmail.com>, and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ec2.h"
-#include "mplogic.h"
-#include "mp_gf2m.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery
- * projective coordinates. Uses algorithm Mdouble in appendix of Lopez, J.
- * and Dahab, R.  "Fast multiplication on elliptic curves over GF(2^m)
- * without precomputation". modified to not require precomputation of
- * c=b^{2^{m-1}}. */
-static mp_err
-gf2m_Mdouble(mp_int *x, mp_int *z, const ECGroup *group, int kmflag)
-{
-        mp_err res = MP_OKAY;
-        mp_int t1;
-
-        MP_DIGITS(&t1) = 0;
-        MP_CHECKOK(mp_init(&t1, kmflag));
-
-        MP_CHECKOK(group->meth->field_sqr(x, x, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(z, &t1, group->meth));
-        MP_CHECKOK(group->meth->field_mul(x, &t1, z, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(x, x, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(&t1, &t1, group->meth));
-        MP_CHECKOK(group->meth->
-                           field_mul(&group->curveb, &t1, &t1, group->meth));
-        MP_CHECKOK(group->meth->field_add(x, &t1, x, group->meth));
-
-  CLEANUP:
-        mp_clear(&t1);
-        return res;
-}
-
-/* Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in
- * Montgomery projective coordinates. Uses algorithm Madd in appendix of
- * Lopex, J. and Dahab, R.  "Fast multiplication on elliptic curves over
- * GF(2^m) without precomputation". */
-static mp_err
-gf2m_Madd(const mp_int *x, mp_int *x1, mp_int *z1, mp_int *x2, mp_int *z2,
-                  const ECGroup *group, int kmflag)
-{
-        mp_err res = MP_OKAY;
-        mp_int t1, t2;
-
-        MP_DIGITS(&t1) = 0;
-        MP_DIGITS(&t2) = 0;
-        MP_CHECKOK(mp_init(&t1, kmflag));
-        MP_CHECKOK(mp_init(&t2, kmflag));
-
-        MP_CHECKOK(mp_copy(x, &t1));
-        MP_CHECKOK(group->meth->field_mul(x1, z2, x1, group->meth));
-        MP_CHECKOK(group->meth->field_mul(z1, x2, z1, group->meth));
-        MP_CHECKOK(group->meth->field_mul(x1, z1, &t2, group->meth));
-        MP_CHECKOK(group->meth->field_add(z1, x1, z1, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(z1, z1, group->meth));
-        MP_CHECKOK(group->meth->field_mul(z1, &t1, x1, group->meth));
-        MP_CHECKOK(group->meth->field_add(x1, &t2, x1, group->meth));
-
-  CLEANUP:
-        mp_clear(&t1);
-        mp_clear(&t2);
-        return res;
-}
-
-/* Compute the x, y affine coordinates from the point (x1, z1) (x2, z2)
- * using Montgomery point multiplication algorithm Mxy() in appendix of
- * Lopex, J. and Dahab, R.  "Fast multiplication on elliptic curves over
- * GF(2^m) without precomputation". Returns: 0 on error 1 if return value
- * should be the point at infinity 2 otherwise */
-static int
-gf2m_Mxy(const mp_int *x, const mp_int *y, mp_int *x1, mp_int *z1,
-                 mp_int *x2, mp_int *z2, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        int ret = 0;
-        mp_int t3, t4, t5;
-
-        MP_DIGITS(&t3) = 0;
-        MP_DIGITS(&t4) = 0;
-        MP_DIGITS(&t5) = 0;
-        MP_CHECKOK(mp_init(&t3, FLAG(x2)));
-        MP_CHECKOK(mp_init(&t4, FLAG(x2)));
-        MP_CHECKOK(mp_init(&t5, FLAG(x2)));
-
-        if (mp_cmp_z(z1) == 0) {
-                mp_zero(x2);
-                mp_zero(z2);
-                ret = 1;
-                goto CLEANUP;
-        }
-
-        if (mp_cmp_z(z2) == 0) {
-                MP_CHECKOK(mp_copy(x, x2));
-                MP_CHECKOK(group->meth->field_add(x, y, z2, group->meth));
-                ret = 2;
-                goto CLEANUP;
-        }
-
-        MP_CHECKOK(mp_set_int(&t5, 1));
-        if (group->meth->field_enc) {
-                MP_CHECKOK(group->meth->field_enc(&t5, &t5, group->meth));
-        }
-
-        MP_CHECKOK(group->meth->field_mul(z1, z2, &t3, group->meth));
-
-        MP_CHECKOK(group->meth->field_mul(z1, x, z1, group->meth));
-        MP_CHECKOK(group->meth->field_add(z1, x1, z1, group->meth));
-        MP_CHECKOK(group->meth->field_mul(z2, x, z2, group->meth));
-        MP_CHECKOK(group->meth->field_mul(z2, x1, x1, group->meth));
-        MP_CHECKOK(group->meth->field_add(z2, x2, z2, group->meth));
-
-        MP_CHECKOK(group->meth->field_mul(z2, z1, z2, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(x, &t4, group->meth));
-        MP_CHECKOK(group->meth->field_add(&t4, y, &t4, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&t4, &t3, &t4, group->meth));
-        MP_CHECKOK(group->meth->field_add(&t4, z2, &t4, group->meth));
-
-        MP_CHECKOK(group->meth->field_mul(&t3, x, &t3, group->meth));
-        MP_CHECKOK(group->meth->field_div(&t5, &t3, &t3, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&t3, &t4, &t4, group->meth));
-        MP_CHECKOK(group->meth->field_mul(x1, &t3, x2, group->meth));
-        MP_CHECKOK(group->meth->field_add(x2, x, z2, group->meth));
-
-        MP_CHECKOK(group->meth->field_mul(z2, &t4, z2, group->meth));
-        MP_CHECKOK(group->meth->field_add(z2, y, z2, group->meth));
-
-        ret = 2;
-
-  CLEANUP:
-        mp_clear(&t3);
-        mp_clear(&t4);
-        mp_clear(&t5);
-        if (res == MP_OKAY) {
-                return ret;
-        } else {
-                return 0;
-        }
-}
-
-/* Computes R = nP based on algorithm 2P of Lopex, J. and Dahab, R.  "Fast
- * multiplication on elliptic curves over GF(2^m) without
- * precomputation". Elliptic curve points P and R can be identical. Uses
- * Montgomery projective coordinates. */
-mp_err
-ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px, const mp_int *py,
-                                        mp_int *rx, mp_int *ry, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int x1, x2, z1, z2;
-        int i, j;
-        mp_digit top_bit, mask;
-
-        MP_DIGITS(&x1) = 0;
-        MP_DIGITS(&x2) = 0;
-        MP_DIGITS(&z1) = 0;
-        MP_DIGITS(&z2) = 0;
-        MP_CHECKOK(mp_init(&x1, FLAG(n)));
-        MP_CHECKOK(mp_init(&x2, FLAG(n)));
-        MP_CHECKOK(mp_init(&z1, FLAG(n)));
-        MP_CHECKOK(mp_init(&z2, FLAG(n)));
-
-        /* if result should be point at infinity */
-        if ((mp_cmp_z(n) == 0) || (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES)) {
-                MP_CHECKOK(ec_GF2m_pt_set_inf_aff(rx, ry));
-                goto CLEANUP;
-        }
-
-        MP_CHECKOK(mp_copy(px, &x1));   /* x1 = px */
-        MP_CHECKOK(mp_set_int(&z1, 1)); /* z1 = 1 */
-        MP_CHECKOK(group->meth->field_sqr(&x1, &z2, group->meth));      /* z2 =
-                                                                                                                                 * x1^2 =
-                                                                                                                                 * px^2 */
-        MP_CHECKOK(group->meth->field_sqr(&z2, &x2, group->meth));
-        MP_CHECKOK(group->meth->field_add(&x2, &group->curveb, &x2, group->meth));      /* x2
-                                                                                                                                                                 * =
-                                                                                                                                                                 * px^4
-                                                                                                                                                                 * +
-                                                                                                                                                                 * b
-                                                                                                                                                                 */
-
-        /* find top-most bit and go one past it */
-        i = MP_USED(n) - 1;
-        j = MP_DIGIT_BIT - 1;
-        top_bit = 1;
-        top_bit <<= MP_DIGIT_BIT - 1;
-        mask = top_bit;
-        while (!(MP_DIGITS(n)[i] & mask)) {
-                mask >>= 1;
-                j--;
-        }
-        mask >>= 1;
-        j--;
-
-        /* if top most bit was at word break, go to next word */
-        if (!mask) {
-                i--;
-                j = MP_DIGIT_BIT - 1;
-                mask = top_bit;
-        }
-
-        for (; i >= 0; i--) {
-                for (; j >= 0; j--) {
-                        if (MP_DIGITS(n)[i] & mask) {
-                                MP_CHECKOK(gf2m_Madd(px, &x1, &z1, &x2, &z2, group, FLAG(n)));
-                                MP_CHECKOK(gf2m_Mdouble(&x2, &z2, group, FLAG(n)));
-                        } else {
-                                MP_CHECKOK(gf2m_Madd(px, &x2, &z2, &x1, &z1, group, FLAG(n)));
-                                MP_CHECKOK(gf2m_Mdouble(&x1, &z1, group, FLAG(n)));
-                        }
-                        mask >>= 1;
-                }
-                j = MP_DIGIT_BIT - 1;
-                mask = top_bit;
-        }
-
-        /* convert out of "projective" coordinates */
-        i = gf2m_Mxy(px, py, &x1, &z1, &x2, &z2, group);
-        if (i == 0) {
-                res = MP_BADARG;
-                goto CLEANUP;
-        } else if (i == 1) {
-                MP_CHECKOK(ec_GF2m_pt_set_inf_aff(rx, ry));
-        } else {
-                MP_CHECKOK(mp_copy(&x2, rx));
-                MP_CHECKOK(mp_copy(&z2, ry));
-        }
-
-  CLEANUP:
-        mp_clear(&x1);
-        mp_clear(&x2);
-        mp_clear(&z1);
-        mp_clear(&z2);
-        return res;
-}
--- a/jdk/src/share/native/sun/security/ec/ec_naf.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stephen Fung <fungstep@hotmail.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecl-priv.h"
-
-/* Returns 2^e as an integer. This is meant to be used for small powers of
- * two. */
-int
-ec_twoTo(int e)
-{
-        int a = 1;
-        int i;
-
-        for (i = 0; i < e; i++) {
-                a *= 2;
-        }
-        return a;
-}
-
-/* Computes the windowed non-adjacent-form (NAF) of a scalar. Out should
- * be an array of signed char's to output to, bitsize should be the number
- * of bits of out, in is the original scalar, and w is the window size.
- * NAF is discussed in the paper: D. Hankerson, J. Hernandez and A.
- * Menezes, "Software implementation of elliptic curve cryptography over
- * binary fields", Proc. CHES 2000. */
-mp_err
-ec_compute_wNAF(signed char *out, int bitsize, const mp_int *in, int w)
-{
-        mp_int k;
-        mp_err res = MP_OKAY;
-        int i, twowm1, mask;
-
-        twowm1 = ec_twoTo(w - 1);
-        mask = 2 * twowm1 - 1;
-
-        MP_DIGITS(&k) = 0;
-        MP_CHECKOK(mp_init_copy(&k, in));
-
-        i = 0;
-        /* Compute wNAF form */
-        while (mp_cmp_z(&k) > 0) {
-                if (mp_isodd(&k)) {
-                        out[i] = MP_DIGIT(&k, 0) & mask;
-                        if (out[i] >= twowm1)
-                                out[i] -= 2 * twowm1;
-
-                        /* Subtract off out[i].  Note mp_sub_d only works with
-                         * unsigned digits */
-                        if (out[i] >= 0) {
-                                mp_sub_d(&k, out[i], &k);
-                        } else {
-                                mp_add_d(&k, -(out[i]), &k);
-                        }
-                } else {
-                        out[i] = 0;
-                }
-                mp_div_2(&k, &k);
-                i++;
-        }
-        /* Zero out the remaining elements of the out array. */
-        for (; i < bitsize + 1; i++) {
-                out[i] = 0;
-        }
-  CLEANUP:
-        mp_clear(&k);
-        return res;
-
-}
--- a/jdk/src/share/native/sun/security/ec/ecc_impl.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Dr Vipul Gupta <vipul.gupta@sun.com> and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECC_IMPL_H
-#define _ECC_IMPL_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include "ecl-exp.h"
-
-/*
- * Multi-platform definitions
- */
-#ifdef __linux__
-#define B_FALSE FALSE
-#define B_TRUE TRUE
-typedef unsigned char uint8_t;
-typedef unsigned long ulong_t;
-typedef enum { B_FALSE, B_TRUE } boolean_t;
-#endif /* __linux__ */
-
-#ifdef _WIN32
-typedef unsigned char uint8_t;
-typedef unsigned long ulong_t;
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-#endif /* _WIN32 */
-
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif  /* _KERNEL */
-
-#define EC_MAX_DIGEST_LEN 1024  /* max digest that can be signed */
-#define EC_MAX_POINT_LEN 145    /* max len of DER encoded Q */
-#define EC_MAX_VALUE_LEN 72     /* max len of ANSI X9.62 private value d */
-#define EC_MAX_SIG_LEN 144      /* max signature len for supported curves */
-#define EC_MIN_KEY_LEN  112     /* min key length in bits */
-#define EC_MAX_KEY_LEN  571     /* max key length in bits */
-#define EC_MAX_OID_LEN 10       /* max length of OID buffer */
-
-/*
- * Various structures and definitions from NSS are here.
- */
-
-#ifdef _KERNEL
-#define PORT_ArenaAlloc(a, n, f)        kmem_alloc((n), (f))
-#define PORT_ArenaZAlloc(a, n, f)       kmem_zalloc((n), (f))
-#define PORT_ArenaGrow(a, b, c, d)      NULL
-#define PORT_ZAlloc(n, f)               kmem_zalloc((n), (f))
-#define PORT_Alloc(n, f)                kmem_alloc((n), (f))
-#else
-#define PORT_ArenaAlloc(a, n, f)        malloc((n))
-#define PORT_ArenaZAlloc(a, n, f)       calloc(1, (n))
-#define PORT_ArenaGrow(a, b, c, d)      NULL
-#define PORT_ZAlloc(n, f)               calloc(1, (n))
-#define PORT_Alloc(n, f)                malloc((n))
-#endif
-
-#define PORT_NewArena(b)                (char *)12345
-#define PORT_ArenaMark(a)               NULL
-#define PORT_ArenaUnmark(a, b)
-#define PORT_ArenaRelease(a, m)
-#define PORT_FreeArena(a, b)
-#define PORT_Strlen(s)                  strlen((s))
-#define PORT_SetError(e)
-
-#define PRBool                          boolean_t
-#define PR_TRUE                         B_TRUE
-#define PR_FALSE                        B_FALSE
-
-#ifdef _KERNEL
-#define PORT_Assert                     ASSERT
-#define PORT_Memcpy(t, f, l)            bcopy((f), (t), (l))
-#else
-#define PORT_Assert                     assert
-#define PORT_Memcpy(t, f, l)            memcpy((t), (f), (l))
-#endif
-
-#define CHECK_OK(func) if (func == NULL) goto cleanup
-#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup
-
-typedef enum {
-        siBuffer = 0,
-        siClearDataBuffer = 1,
-        siCipherDataBuffer = 2,
-        siDERCertBuffer = 3,
-        siEncodedCertBuffer = 4,
-        siDERNameBuffer = 5,
-        siEncodedNameBuffer = 6,
-        siAsciiNameString = 7,
-        siAsciiString = 8,
-        siDEROID = 9,
-        siUnsignedInteger = 10,
-        siUTCTime = 11,
-        siGeneralizedTime = 12
-} SECItemType;
-
-typedef struct SECItemStr SECItem;
-
-struct SECItemStr {
-        SECItemType type;
-        unsigned char *data;
-        unsigned int len;
-};
-
-typedef SECItem SECKEYECParams;
-
-typedef enum { ec_params_explicit,
-               ec_params_named
-} ECParamsType;
-
-typedef enum { ec_field_GFp = 1,
-               ec_field_GF2m
-} ECFieldType;
-
-struct ECFieldIDStr {
-    int         size;   /* field size in bits */
-    ECFieldType type;
-    union {
-        SECItem  prime; /* prime p for (GFp) */
-        SECItem  poly;  /* irreducible binary polynomial for (GF2m) */
-    } u;
-    int         k1;     /* first coefficient of pentanomial or
-                         * the only coefficient of trinomial
-                         */
-    int         k2;     /* two remaining coefficients of pentanomial */
-    int         k3;
-};
-typedef struct ECFieldIDStr ECFieldID;
-
-struct ECCurveStr {
-        SECItem a;      /* contains octet stream encoding of
-                         * field element (X9.62 section 4.3.3)
-                         */
-        SECItem b;
-        SECItem seed;
-};
-typedef struct ECCurveStr ECCurve;
-
-typedef void PRArenaPool;
-
-struct ECParamsStr {
-    PRArenaPool * arena;
-    ECParamsType  type;
-    ECFieldID     fieldID;
-    ECCurve       curve;
-    SECItem       base;
-    SECItem       order;
-    int           cofactor;
-    SECItem       DEREncoding;
-    ECCurveName   name;
-    SECItem       curveOID;
-};
-typedef struct ECParamsStr ECParams;
-
-struct ECPublicKeyStr {
-    ECParams ecParams;
-    SECItem publicValue;   /* elliptic curve point encoded as
-                            * octet stream.
-                            */
-};
-typedef struct ECPublicKeyStr ECPublicKey;
-
-struct ECPrivateKeyStr {
-    ECParams ecParams;
-    SECItem publicValue;   /* encoded ec point */
-    SECItem privateValue;  /* private big integer */
-    SECItem version;       /* As per SEC 1, Appendix C, Section C.4 */
-};
-typedef struct ECPrivateKeyStr ECPrivateKey;
-
-typedef enum _SECStatus {
-        SECBufferTooSmall = -3,
-        SECWouldBlock = -2,
-        SECFailure = -1,
-        SECSuccess = 0
-} SECStatus;
-
-#ifdef _KERNEL
-#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l))
-#else
-/*
- This function is no longer required because the random bytes are now
- supplied by the caller. Force a failure.
-VR
-#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure
-*/
-#define RNG_GenerateGlobalRandomBytes(p,l) SECSuccess
-#endif
-#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup
-#define MP_TO_SEC_ERROR(err)
-
-#define SECITEM_TO_MPINT(it, mp)                                        \
-        CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
-
-extern int ecc_knzero_random_generator(uint8_t *, size_t);
-extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t);
-
-extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int);
-extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int);
-extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *,
-    int);
-extern void SECITEM_FreeItem(SECItem *, boolean_t);
-extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey, const unsigned char* random, int randomlen, int);
-extern SECStatus EC_NewKeyFromSeed(ECParams *ecParams, ECPrivateKey **privKey,
-    const unsigned char *seed, int seedlen, int kmflag);
-extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *,
-    const unsigned char* randon, int randomlen, int);
-extern SECStatus ECDSA_SignDigestWithSeed(ECPrivateKey *, SECItem *,
-    const SECItem *, const unsigned char *seed, int seedlen, int kmflag);
-extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *,
-    const SECItem *, int);
-extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t,
-    SECItem *, int);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* _ECC_IMPL_H */
--- a/jdk/src/share/native/sun/security/ec/ecdecode.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,632 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Elliptic Curve Cryptography library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Dr Vipul Gupta <vipul.gupta@sun.com> and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#ifndef __linux__
-#include <sys/systm.h>
-#endif /* __linux__ */
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/kmem.h>
-#else
-#include <string.h>
-#endif
-#include "ec.h"
-#include "ecl-curve.h"
-#include "ecc_impl.h"
-
-#define MAX_ECKEY_LEN           72
-#define SEC_ASN1_OBJECT_ID      0x06
-
-/*
- * Initializes a SECItem from a hexadecimal string
- *
- * Warning: This function ignores leading 00's, so any leading 00's
- * in the hexadecimal string must be optional.
- */
-static SECItem *
-hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str,
-    int kmflag)
-{
-    int i = 0;
-    int byteval = 0;
-    int tmp = strlen(str);
-
-    if ((tmp % 2) != 0) return NULL;
-
-    /* skip leading 00's unless the hex string is "00" */
-    while ((tmp > 2) && (str[0] == '0') && (str[1] == '0')) {
-        str += 2;
-        tmp -= 2;
-    }
-
-    item->data = (unsigned char *) PORT_ArenaAlloc(arena, tmp/2, kmflag);
-    if (item->data == NULL) return NULL;
-    item->len = tmp/2;
-
-    while (str[i]) {
-        if ((str[i] >= '0') && (str[i] <= '9'))
-            tmp = str[i] - '0';
-        else if ((str[i] >= 'a') && (str[i] <= 'f'))
-            tmp = str[i] - 'a' + 10;
-        else if ((str[i] >= 'A') && (str[i] <= 'F'))
-            tmp = str[i] - 'A' + 10;
-        else
-            return NULL;
-
-        byteval = byteval * 16 + tmp;
-        if ((i % 2) != 0) {
-            item->data[i/2] = byteval;
-            byteval = 0;
-        }
-        i++;
-    }
-
-    return item;
-}
-
-static SECStatus
-gf_populate_params(ECCurveName name, ECFieldType field_type, ECParams *params,
-    int kmflag)
-{
-    SECStatus rv = SECFailure;
-    const ECCurveParams *curveParams;
-    /* 2 ['0'+'4'] + MAX_ECKEY_LEN * 2 [x,y] * 2 [hex string] + 1 ['\0'] */
-    char genenc[3 + 2 * 2 * MAX_ECKEY_LEN];
-
-    if ((name < ECCurve_noName) || (name > ECCurve_pastLastCurve)) goto cleanup;
-    params->name = name;
-    curveParams = ecCurve_map[params->name];
-    CHECK_OK(curveParams);
-    params->fieldID.size = curveParams->size;
-    params->fieldID.type = field_type;
-    if (field_type == ec_field_GFp) {
-        CHECK_OK(hexString2SECItem(NULL, &params->fieldID.u.prime,
-            curveParams->irr, kmflag));
-    } else {
-        CHECK_OK(hexString2SECItem(NULL, &params->fieldID.u.poly,
-            curveParams->irr, kmflag));
-    }
-    CHECK_OK(hexString2SECItem(NULL, &params->curve.a,
-        curveParams->curvea, kmflag));
-    CHECK_OK(hexString2SECItem(NULL, &params->curve.b,
-        curveParams->curveb, kmflag));
-    genenc[0] = '0';
-    genenc[1] = '4';
-    genenc[2] = '\0';
-    strcat(genenc, curveParams->genx);
-    strcat(genenc, curveParams->geny);
-    CHECK_OK(hexString2SECItem(NULL, &params->base, genenc, kmflag));
-    CHECK_OK(hexString2SECItem(NULL, &params->order,
-        curveParams->order, kmflag));
-    params->cofactor = curveParams->cofactor;
-
-    rv = SECSuccess;
-
-cleanup:
-    return rv;
-}
-
-ECCurveName SECOID_FindOIDTag(const SECItem *);
-
-SECStatus
-EC_FillParams(PRArenaPool *arena, const SECItem *encodedParams,
-    ECParams *params, int kmflag)
-{
-    SECStatus rv = SECFailure;
-    ECCurveName tag;
-    SECItem oid = { siBuffer, NULL, 0};
-
-#if EC_DEBUG
-    int i;
-
-    printf("Encoded params in EC_DecodeParams: ");
-    for (i = 0; i < encodedParams->len; i++) {
-            printf("%02x:", encodedParams->data[i]);
-    }
-    printf("\n");
-#endif
-
-    if ((encodedParams->len != ANSI_X962_CURVE_OID_TOTAL_LEN) &&
-        (encodedParams->len != SECG_CURVE_OID_TOTAL_LEN)) {
-            PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
-            return SECFailure;
-    };
-
-    oid.len = encodedParams->len - 2;
-    oid.data = encodedParams->data + 2;
-    if ((encodedParams->data[0] != SEC_ASN1_OBJECT_ID) ||
-        ((tag = SECOID_FindOIDTag(&oid)) == ECCurve_noName)) {
-            PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
-            return SECFailure;
-    }
-
-    params->arena = arena;
-    params->cofactor = 0;
-    params->type = ec_params_named;
-    params->name = ECCurve_noName;
-
-    /* For named curves, fill out curveOID */
-    params->curveOID.len = oid.len;
-    params->curveOID.data = (unsigned char *) PORT_ArenaAlloc(NULL, oid.len,
-        kmflag);
-    if (params->curveOID.data == NULL) goto cleanup;
-    memcpy(params->curveOID.data, oid.data, oid.len);
-
-#if EC_DEBUG
-#ifndef SECOID_FindOIDTagDescription
-    printf("Curve: %s\n", ecCurve_map[tag]->text);
-#else
-    printf("Curve: %s\n", SECOID_FindOIDTagDescription(tag));
-#endif
-#endif
-
-    switch (tag) {
-
-    /* Binary curves */
-
-    case ECCurve_X9_62_CHAR2_PNB163V1:
-        /* Populate params for c2pnb163v1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB163V2:
-        /* Populate params for c2pnb163v2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB163V3:
-        /* Populate params for c2pnb163v3 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V3, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB176V1:
-        /* Populate params for c2pnb176v1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB176V1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB191V1:
-        /* Populate params for c2tnb191v1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB191V2:
-        /* Populate params for c2tnb191v2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB191V3:
-        /* Populate params for c2tnb191v3 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V3, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB208W1:
-        /* Populate params for c2pnb208w1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB208W1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB239V1:
-        /* Populate params for c2tnb239v1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB239V2:
-        /* Populate params for c2tnb239v2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB239V3:
-        /* Populate params for c2tnb239v3 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V3, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB272W1:
-        /* Populate params for c2pnb272w1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB272W1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB304W1:
-        /* Populate params for c2pnb304w1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB304W1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB359V1:
-        /* Populate params for c2tnb359v1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB359V1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_PNB368W1:
-        /* Populate params for c2pnb368w1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB368W1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_CHAR2_TNB431R1:
-        /* Populate params for c2tnb431r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB431R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_113R1:
-        /* Populate params for sect113r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_113R2:
-        /* Populate params for sect113r2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_131R1:
-        /* Populate params for sect131r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_131R2:
-        /* Populate params for sect131r2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_163K1:
-        /* Populate params for sect163k1
-         * (the NIST K-163 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163K1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_163R1:
-        /* Populate params for sect163r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_163R2:
-        /* Populate params for sect163r2
-         * (the NIST B-163 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_193R1:
-        /* Populate params for sect193r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_193R2:
-        /* Populate params for sect193r2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R2, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_233K1:
-        /* Populate params for sect233k1
-         * (the NIST K-233 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233K1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_233R1:
-        /* Populate params for sect233r1
-         * (the NIST B-233 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_239K1:
-        /* Populate params for sect239k1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_239K1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_283K1:
-        /* Populate params for sect283k1
-         * (the NIST K-283 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283K1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_283R1:
-        /* Populate params for sect283r1
-         * (the NIST B-283 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_409K1:
-        /* Populate params for sect409k1
-         * (the NIST K-409 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409K1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_409R1:
-        /* Populate params for sect409r1
-         * (the NIST B-409 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_571K1:
-        /* Populate params for sect571k1
-         * (the NIST K-571 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571K1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_CHAR2_571R1:
-        /* Populate params for sect571r1
-         * (the NIST B-571 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571R1, ec_field_GF2m,
-            params, kmflag) );
-        break;
-
-    /* Prime curves */
-
-    case ECCurve_X9_62_PRIME_192V1:
-        /* Populate params for prime192v1 aka secp192r1
-         * (the NIST P-192 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_PRIME_192V2:
-        /* Populate params for prime192v2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V2, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_PRIME_192V3:
-        /* Populate params for prime192v3 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V3, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_PRIME_239V1:
-        /* Populate params for prime239v1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_PRIME_239V2:
-        /* Populate params for prime239v2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V2, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_PRIME_239V3:
-        /* Populate params for prime239v3 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V3, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_X9_62_PRIME_256V1:
-        /* Populate params for prime256v1 aka secp256r1
-         * (the NIST P-256 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_256V1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_112R1:
-        /* Populate params for secp112r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_112R2:
-        /* Populate params for secp112r2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R2, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_128R1:
-        /* Populate params for secp128r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_128R2:
-        /* Populate params for secp128r2 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R2, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_160K1:
-        /* Populate params for secp160k1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160K1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_160R1:
-        /* Populate params for secp160r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_160R2:
-        /* Populate params for secp160r1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R2, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_192K1:
-        /* Populate params for secp192k1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_192K1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_224K1:
-        /* Populate params for secp224k1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224K1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_224R1:
-        /* Populate params for secp224r1
-         * (the NIST P-224 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224R1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_256K1:
-        /* Populate params for secp256k1 */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_256K1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_384R1:
-        /* Populate params for secp384r1
-         * (the NIST P-384 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_384R1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    case ECCurve_SECG_PRIME_521R1:
-        /* Populate params for secp521r1
-         * (the NIST P-521 curve)
-         */
-        CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_521R1, ec_field_GFp,
-            params, kmflag) );
-        break;
-
-    default:
-        break;
-    };
-
-cleanup:
-    if (!params->cofactor) {
-        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
-#if EC_DEBUG
-        printf("Unrecognized curve, returning NULL params\n");
-#endif
-    }
-
-    return rv;
-}
-
-SECStatus
-EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams, int kmflag)
-{
-    PRArenaPool *arena;
-    ECParams *params;
-    SECStatus rv = SECFailure;
-
-    /* Initialize an arena for the ECParams structure */
-    if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
-        return SECFailure;
-
-    params = (ECParams *)PORT_ArenaZAlloc(NULL, sizeof(ECParams), kmflag);
-    if (!params) {
-        PORT_FreeArena(NULL, B_TRUE);
-        return SECFailure;
-    }
-
-    /* Copy the encoded params */
-    SECITEM_AllocItem(arena, &(params->DEREncoding), encodedParams->len,
-        kmflag);
-    memcpy(params->DEREncoding.data, encodedParams->data, encodedParams->len);
-
-    /* Fill out the rest of the ECParams structure based on
-     * the encoded params
-     */
-    rv = EC_FillParams(NULL, encodedParams, params, kmflag);
-    if (rv == SECFailure) {
-        PORT_FreeArena(NULL, B_TRUE);
-        return SECFailure;
-    } else {
-        *ecparams = params;;
-        return SECSuccess;
-    }
-}
--- a/jdk/src/share/native/sun/security/ec/ecl-curve.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,710 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_CURVE_H
-#define _ECL_CURVE_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecl-exp.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* NIST prime curves */
-static const ECCurveParams ecCurve_NIST_P192 = {
-        "NIST-P192", ECField_GFp, 192,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
-        "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1",
-        "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
-        "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",
-        "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", 1
-};
-
-static const ECCurveParams ecCurve_NIST_P224 = {
-        "NIST-P224", ECField_GFp, 224,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
-        "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
-        "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
-        "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1
-};
-
-static const ECCurveParams ecCurve_NIST_P256 = {
-        "NIST-P256", ECField_GFp, 256,
-        "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
-        "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
-        "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
-        "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
-        "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
-        "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 1
-};
-
-static const ECCurveParams ecCurve_NIST_P384 = {
-        "NIST-P384", ECField_GFp, 384,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
-        "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
-        "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
-        "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
-        1
-};
-
-static const ECCurveParams ecCurve_NIST_P521 = {
-        "NIST-P521", ECField_GFp, 521,
-        "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
-        "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
-        "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
-        "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
-        "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
-        "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
-        1
-};
-
-/* NIST binary curves */
-static const ECCurveParams ecCurve_NIST_K163 = {
-        "NIST-K163", ECField_GF2m, 163,
-        "0800000000000000000000000000000000000000C9",
-        "000000000000000000000000000000000000000001",
-        "000000000000000000000000000000000000000001",
-        "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8",
-        "0289070FB05D38FF58321F2E800536D538CCDAA3D9",
-        "04000000000000000000020108A2E0CC0D99F8A5EF", 2
-};
-
-static const ECCurveParams ecCurve_NIST_B163 = {
-        "NIST-B163", ECField_GF2m, 163,
-        "0800000000000000000000000000000000000000C9",
-        "000000000000000000000000000000000000000001",
-        "020A601907B8C953CA1481EB10512F78744A3205FD",
-        "03F0EBA16286A2D57EA0991168D4994637E8343E36",
-        "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1",
-        "040000000000000000000292FE77E70C12A4234C33", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K233 = {
-        "NIST-K233", ECField_GF2m, 233,
-        "020000000000000000000000000000000000000004000000000000000001",
-        "000000000000000000000000000000000000000000000000000000000000",
-        "000000000000000000000000000000000000000000000000000000000001",
-        "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126",
-        "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3",
-        "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B233 = {
-        "NIST-B233", ECField_GF2m, 233,
-        "020000000000000000000000000000000000000004000000000000000001",
-        "000000000000000000000000000000000000000000000000000000000001",
-        "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD",
-        "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B",
-        "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052",
-        "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K283 = {
-        "NIST-K283", ECField_GF2m, 283,
-        "0800000000000000000000000000000000000000000000000000000000000000000010A1",
-        "000000000000000000000000000000000000000000000000000000000000000000000000",
-        "000000000000000000000000000000000000000000000000000000000000000000000001",
-        "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836",
-        "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259",
-        "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B283 = {
-        "NIST-B283", ECField_GF2m, 283,
-        "0800000000000000000000000000000000000000000000000000000000000000000010A1",
-        "000000000000000000000000000000000000000000000000000000000000000000000001",
-        "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5",
-        "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053",
-        "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4",
-        "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K409 = {
-        "NIST-K409", ECField_GF2m, 409,
-        "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
-        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
-        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-        "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746",
-        "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B",
-        "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B409 = {
-        "NIST-B409", ECField_GF2m, 409,
-        "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
-        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-        "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F",
-        "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7",
-        "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706",
-        "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K571 = {
-        "NIST-K571", ECField_GF2m, 571,
-        "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
-        "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
-        "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-        "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972",
-        "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3",
-        "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B571 = {
-        "NIST-B571", ECField_GF2m, 571,
-        "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
-        "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
-        "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A",
-        "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19",
-        "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B",
-        "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", 2
-};
-
-/* ANSI X9.62 prime curves */
-static const ECCurveParams ecCurve_X9_62_PRIME_192V2 = {
-        "X9.62 P-192V2", ECField_GFp, 192,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
-        "CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953",
-        "EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A",
-        "6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15",
-        "FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_192V3 = {
-        "X9.62 P-192V3", ECField_GFp, 192,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
-        "22123DC2395A05CAA7423DAECCC94760A7D462256BD56916",
-        "7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896",
-        "38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0",
-        "FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_239V1 = {
-        "X9.62 P-239V1", ECField_GFp, 239,
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
-        "6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A",
-        "0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF",
-        "7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE",
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_239V2 = {
-        "X9.62 P-239V2", ECField_GFp, 239,
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
-        "617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C",
-        "38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7",
-        "5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA",
-        "7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_239V3 = {
-        "X9.62 P-239V3", ECField_GFp, 239,
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
-        "255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E",
-        "6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A",
-        "1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3",
-        "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551", 1
-};
-
-/* ANSI X9.62 binary curves */
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V1 = {
-        "X9.62 C2-PNB163V1", ECField_GF2m, 163,
-        "080000000000000000000000000000000000000107",
-        "072546B5435234A422E0789675F432C89435DE5242",
-        "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9",
-        "07AF69989546103D79329FCC3D74880F33BBE803CB",
-        "01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F",
-        "0400000000000000000001E60FC8821CC74DAEAFC1", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V2 = {
-        "X9.62 C2-PNB163V2", ECField_GF2m, 163,
-        "080000000000000000000000000000000000000107",
-        "0108B39E77C4B108BED981ED0E890E117C511CF072",
-        "0667ACEB38AF4E488C407433FFAE4F1C811638DF20",
-        "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5",
-        "079F684DDF6684C5CD258B3890021B2386DFD19FC5",
-        "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V3 = {
-        "X9.62 C2-PNB163V3", ECField_GF2m, 163,
-        "080000000000000000000000000000000000000107",
-        "07A526C63D3E25A256A007699F5447E32AE456B50E",
-        "03F7061798EB99E238FD6F1BF95B48FEEB4854252B",
-        "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB",
-        "05B935590C155E17EA48EB3FF3718B893DF59A05D0",
-        "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB176V1 = {
-        "X9.62 C2-PNB176V1", ECField_GF2m, 176,
-        "0100000000000000000000000000000000080000000007",
-        "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B",
-        "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2",
-        "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798",
-        "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C",
-        "00010092537397ECA4F6145799D62B0A19CE06FE26AD", 0xFF6E
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V1 = {
-        "X9.62 C2-TNB191V1", ECField_GF2m, 191,
-        "800000000000000000000000000000000000000000000201",
-        "2866537B676752636A68F56554E12640276B649EF7526267",
-        "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC",
-        "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D",
-        "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB",
-        "40000000000000000000000004A20E90C39067C893BBB9A5", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V2 = {
-        "X9.62 C2-TNB191V2", ECField_GF2m, 191,
-        "800000000000000000000000000000000000000000000201",
-        "401028774D7777C7B7666D1366EA432071274F89FF01E718",
-        "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01",
-        "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10",
-        "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A",
-        "20000000000000000000000050508CB89F652824E06B8173", 4
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V3 = {
-        "X9.62 C2-TNB191V3", ECField_GF2m, 191,
-        "800000000000000000000000000000000000000000000201",
-        "6C01074756099122221056911C77D77E77A777E7E7E77FCB",
-        "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8",
-        "375D4CE24FDE434489DE8746E71786015009E66E38A926DD",
-        "545A39176196575D985999366E6AD34CE0A77CD7127B06BE",
-        "155555555555555555555555610C0B196812BFB6288A3EA3", 6
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB208W1 = {
-        "X9.62 C2-PNB208W1", ECField_GF2m, 208,
-        "010000000000000000000000000000000800000000000000000007",
-        "0000000000000000000000000000000000000000000000000000",
-        "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E",
-        "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A",
-        "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3",
-        "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D", 0xFE48
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V1 = {
-        "X9.62 C2-TNB239V1", ECField_GF2m, 239,
-        "800000000000000000000000000000000000000000000000001000000001",
-        "32010857077C5431123A46B808906756F543423E8D27877578125778AC76",
-        "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16",
-        "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D",
-        "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305",
-        "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447", 4
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V2 = {
-        "X9.62 C2-TNB239V2", ECField_GF2m, 239,
-        "800000000000000000000000000000000000000000000000001000000001",
-        "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F",
-        "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B",
-        "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205",
-        "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833",
-        "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D", 6
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V3 = {
-        "X9.62 C2-TNB239V3", ECField_GF2m, 239,
-        "800000000000000000000000000000000000000000000000001000000001",
-        "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F",
-        "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40",
-        "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92",
-        "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461",
-        "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF", 0xA
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB272W1 = {
-        "X9.62 C2-PNB272W1", ECField_GF2m, 272,
-        "010000000000000000000000000000000000000000000000000000010000000000000B",
-        "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20",
-        "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7",
-        "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D",
-        "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23",
-        "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521",
-        0xFF06
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB304W1 = {
-        "X9.62 C2-PNB304W1", ECField_GF2m, 304,
-        "010000000000000000000000000000000000000000000000000000000000000000000000000807",
-        "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681",
-        "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE",
-        "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614",
-        "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B",
-        "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D", 0xFE2E
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB359V1 = {
-        "X9.62 C2-TNB359V1", ECField_GF2m, 359,
-        "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001",
-        "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557",
-        "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988",
-        "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097",
-        "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD",
-        "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B", 0x4C
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB368W1 = {
-        "X9.62 C2-PNB368W1", ECField_GF2m, 368,
-        "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007",
-        "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D",
-        "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A",
-        "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F",
-        "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310",
-        "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967", 0xFF70
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB431R1 = {
-        "X9.62 C2-TNB431R1", ECField_GF2m, 431,
-        "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001",
-        "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F",
-        "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618",
-        "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7",
-        "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760",
-        "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91", 0x2760
-};
-
-/* SEC2 prime curves */
-static const ECCurveParams ecCurve_SECG_PRIME_112R1 = {
-        "SECP-112R1", ECField_GFp, 112,
-        "DB7C2ABF62E35E668076BEAD208B",
-        "DB7C2ABF62E35E668076BEAD2088",
-        "659EF8BA043916EEDE8911702B22",
-        "09487239995A5EE76B55F9C2F098",
-        "A89CE5AF8724C0A23E0E0FF77500",
-        "DB7C2ABF62E35E7628DFAC6561C5", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_112R2 = {
-        "SECP-112R2", ECField_GFp, 112,
-        "DB7C2ABF62E35E668076BEAD208B",
-        "6127C24C05F38A0AAAF65C0EF02C",
-        "51DEF1815DB5ED74FCC34C85D709",
-        "4BA30AB5E892B4E1649DD0928643",
-        "adcd46f5882e3747def36e956e97",
-        "36DF0AAFD8B8D7597CA10520D04B", 4
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_128R1 = {
-        "SECP-128R1", ECField_GFp, 128,
-        "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
-        "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC",
-        "E87579C11079F43DD824993C2CEE5ED3",
-        "161FF7528B899B2D0C28607CA52C5B86",
-        "CF5AC8395BAFEB13C02DA292DDED7A83",
-        "FFFFFFFE0000000075A30D1B9038A115", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_128R2 = {
-        "SECP-128R2", ECField_GFp, 128,
-        "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
-        "D6031998D1B3BBFEBF59CC9BBFF9AEE1",
-        "5EEEFCA380D02919DC2C6558BB6D8A5D",
-        "7B6AA5D85E572983E6FB32A7CDEBC140",
-        "27B6916A894D3AEE7106FE805FC34B44",
-        "3FFFFFFF7FFFFFFFBE0024720613B5A3", 4
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_160K1 = {
-        "SECP-160K1", ECField_GFp, 160,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
-        "0000000000000000000000000000000000000000",
-        "0000000000000000000000000000000000000007",
-        "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
-        "938CF935318FDCED6BC28286531733C3F03C4FEE",
-        "0100000000000000000001B8FA16DFAB9ACA16B6B3", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_160R1 = {
-        "SECP-160R1", ECField_GFp, 160,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
-        "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
-        "4A96B5688EF573284664698968C38BB913CBFC82",
-        "23A628553168947D59DCC912042351377AC5FB32",
-        "0100000000000000000001F4C8F927AED3CA752257", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_160R2 = {
-        "SECP-160R2", ECField_GFp, 160,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
-        "B4E134D3FB59EB8BAB57274904664D5AF50388BA",
-        "52DCB034293A117E1F4FF11B30F7199D3144CE6D",
-        "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
-        "0100000000000000000000351EE786A818F3A1A16B", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_192K1 = {
-        "SECP-192K1", ECField_GFp, 192,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
-        "000000000000000000000000000000000000000000000000",
-        "000000000000000000000000000000000000000000000003",
-        "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
-        "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
-        "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_224K1 = {
-        "SECP-224K1", ECField_GFp, 224,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
-        "00000000000000000000000000000000000000000000000000000000",
-        "00000000000000000000000000000000000000000000000000000005",
-        "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
-        "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
-        "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_256K1 = {
-        "SECP-256K1", ECField_GFp, 256,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
-        "0000000000000000000000000000000000000000000000000000000000000000",
-        "0000000000000000000000000000000000000000000000000000000000000007",
-        "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
-        "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 1
-};
-
-/* SEC2 binary curves */
-static const ECCurveParams ecCurve_SECG_CHAR2_113R1 = {
-        "SECT-113R1", ECField_GF2m, 113,
-        "020000000000000000000000000201",
-        "003088250CA6E7C7FE649CE85820F7",
-        "00E8BEE4D3E2260744188BE0E9C723",
-        "009D73616F35F4AB1407D73562C10F",
-        "00A52830277958EE84D1315ED31886",
-        "0100000000000000D9CCEC8A39E56F", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_113R2 = {
-        "SECT-113R2", ECField_GF2m, 113,
-        "020000000000000000000000000201",
-        "00689918DBEC7E5A0DD6DFC0AA55C7",
-        "0095E9A9EC9B297BD4BF36E059184F",
-        "01A57A6A7B26CA5EF52FCDB8164797",
-        "00B3ADC94ED1FE674C06E695BABA1D",
-        "010000000000000108789B2496AF93", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_131R1 = {
-        "SECT-131R1", ECField_GF2m, 131,
-        "080000000000000000000000000000010D",
-        "07A11B09A76B562144418FF3FF8C2570B8",
-        "0217C05610884B63B9C6C7291678F9D341",
-        "0081BAF91FDF9833C40F9C181343638399",
-        "078C6E7EA38C001F73C8134B1B4EF9E150",
-        "0400000000000000023123953A9464B54D", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_131R2 = {
-        "SECT-131R2", ECField_GF2m, 131,
-        "080000000000000000000000000000010D",
-        "03E5A88919D7CAFCBF415F07C2176573B2",
-        "04B8266A46C55657AC734CE38F018F2192",
-        "0356DCD8F2F95031AD652D23951BB366A8",
-        "0648F06D867940A5366D9E265DE9EB240F",
-        "0400000000000000016954A233049BA98F", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_163R1 = {
-        "SECT-163R1", ECField_GF2m, 163,
-        "0800000000000000000000000000000000000000C9",
-        "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2",
-        "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9",
-        "0369979697AB43897789566789567F787A7876A654",
-        "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883",
-        "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_193R1 = {
-        "SECT-193R1", ECField_GF2m, 193,
-        "02000000000000000000000000000000000000000000008001",
-        "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01",
-        "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814",
-        "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1",
-        "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05",
-        "01000000000000000000000000C7F34A778F443ACC920EBA49", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_193R2 = {
-        "SECT-193R2", ECField_GF2m, 193,
-        "02000000000000000000000000000000000000000000008001",
-        "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B",
-        "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE",
-        "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F",
-        "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C",
-        "010000000000000000000000015AAB561B005413CCD4EE99D5", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_239K1 = {
-        "SECT-239K1", ECField_GF2m, 239,
-        "800000000000000000004000000000000000000000000000000000000001",
-        "000000000000000000000000000000000000000000000000000000000000",
-        "000000000000000000000000000000000000000000000000000000000001",
-        "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC",
-        "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA",
-        "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4
-};
-
-/* WTLS curves */
-static const ECCurveParams ecCurve_WTLS_1 = {
-        "WTLS-1", ECField_GF2m, 113,
-        "020000000000000000000000000201",
-        "000000000000000000000000000001",
-        "000000000000000000000000000001",
-        "01667979A40BA497E5D5C270780617",
-        "00F44B4AF1ECC2630E08785CEBCC15",
-        "00FFFFFFFFFFFFFFFDBF91AF6DEA73", 2
-};
-
-static const ECCurveParams ecCurve_WTLS_8 = {
-        "WTLS-8", ECField_GFp, 112,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFDE7",
-        "0000000000000000000000000000",
-        "0000000000000000000000000003",
-        "0000000000000000000000000001",
-        "0000000000000000000000000002",
-        "0100000000000001ECEA551AD837E9", 1
-};
-
-static const ECCurveParams ecCurve_WTLS_9 = {
-        "WTLS-9", ECField_GFp, 160,
-        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC808F",
-        "0000000000000000000000000000000000000000",
-        "0000000000000000000000000000000000000003",
-        "0000000000000000000000000000000000000001",
-        "0000000000000000000000000000000000000002",
-        "0100000000000000000001CDC98AE0E2DE574ABF33", 1
-};
-
-/* mapping between ECCurveName enum and pointers to ECCurveParams */
-static const ECCurveParams *ecCurve_map[] = {
-    NULL,                               /* ECCurve_noName */
-    &ecCurve_NIST_P192,                 /* ECCurve_NIST_P192 */
-    &ecCurve_NIST_P224,                 /* ECCurve_NIST_P224 */
-    &ecCurve_NIST_P256,                 /* ECCurve_NIST_P256 */
-    &ecCurve_NIST_P384,                 /* ECCurve_NIST_P384 */
-    &ecCurve_NIST_P521,                 /* ECCurve_NIST_P521 */
-    &ecCurve_NIST_K163,                 /* ECCurve_NIST_K163 */
-    &ecCurve_NIST_B163,                 /* ECCurve_NIST_B163 */
-    &ecCurve_NIST_K233,                 /* ECCurve_NIST_K233 */
-    &ecCurve_NIST_B233,                 /* ECCurve_NIST_B233 */
-    &ecCurve_NIST_K283,                 /* ECCurve_NIST_K283 */
-    &ecCurve_NIST_B283,                 /* ECCurve_NIST_B283 */
-    &ecCurve_NIST_K409,                 /* ECCurve_NIST_K409 */
-    &ecCurve_NIST_B409,                 /* ECCurve_NIST_B409 */
-    &ecCurve_NIST_K571,                 /* ECCurve_NIST_K571 */
-    &ecCurve_NIST_B571,                 /* ECCurve_NIST_B571 */
-    &ecCurve_X9_62_PRIME_192V2,         /* ECCurve_X9_62_PRIME_192V2 */
-    &ecCurve_X9_62_PRIME_192V3,         /* ECCurve_X9_62_PRIME_192V3 */
-    &ecCurve_X9_62_PRIME_239V1,         /* ECCurve_X9_62_PRIME_239V1 */
-    &ecCurve_X9_62_PRIME_239V2,         /* ECCurve_X9_62_PRIME_239V2 */
-    &ecCurve_X9_62_PRIME_239V3,         /* ECCurve_X9_62_PRIME_239V3 */
-    &ecCurve_X9_62_CHAR2_PNB163V1,      /* ECCurve_X9_62_CHAR2_PNB163V1 */
-    &ecCurve_X9_62_CHAR2_PNB163V2,      /* ECCurve_X9_62_CHAR2_PNB163V2 */
-    &ecCurve_X9_62_CHAR2_PNB163V3,      /* ECCurve_X9_62_CHAR2_PNB163V3 */
-    &ecCurve_X9_62_CHAR2_PNB176V1,      /* ECCurve_X9_62_CHAR2_PNB176V1 */
-    &ecCurve_X9_62_CHAR2_TNB191V1,      /* ECCurve_X9_62_CHAR2_TNB191V1 */
-    &ecCurve_X9_62_CHAR2_TNB191V2,      /* ECCurve_X9_62_CHAR2_TNB191V2 */
-    &ecCurve_X9_62_CHAR2_TNB191V3,      /* ECCurve_X9_62_CHAR2_TNB191V3 */
-    &ecCurve_X9_62_CHAR2_PNB208W1,      /* ECCurve_X9_62_CHAR2_PNB208W1 */
-    &ecCurve_X9_62_CHAR2_TNB239V1,      /* ECCurve_X9_62_CHAR2_TNB239V1 */
-    &ecCurve_X9_62_CHAR2_TNB239V2,      /* ECCurve_X9_62_CHAR2_TNB239V2 */
-    &ecCurve_X9_62_CHAR2_TNB239V3,      /* ECCurve_X9_62_CHAR2_TNB239V3 */
-    &ecCurve_X9_62_CHAR2_PNB272W1,      /* ECCurve_X9_62_CHAR2_PNB272W1 */
-    &ecCurve_X9_62_CHAR2_PNB304W1,      /* ECCurve_X9_62_CHAR2_PNB304W1 */
-    &ecCurve_X9_62_CHAR2_TNB359V1,      /* ECCurve_X9_62_CHAR2_TNB359V1 */
-    &ecCurve_X9_62_CHAR2_PNB368W1,      /* ECCurve_X9_62_CHAR2_PNB368W1 */
-    &ecCurve_X9_62_CHAR2_TNB431R1,      /* ECCurve_X9_62_CHAR2_TNB431R1 */
-    &ecCurve_SECG_PRIME_112R1,          /* ECCurve_SECG_PRIME_112R1 */
-    &ecCurve_SECG_PRIME_112R2,          /* ECCurve_SECG_PRIME_112R2 */
-    &ecCurve_SECG_PRIME_128R1,          /* ECCurve_SECG_PRIME_128R1 */
-    &ecCurve_SECG_PRIME_128R2,          /* ECCurve_SECG_PRIME_128R2 */
-    &ecCurve_SECG_PRIME_160K1,          /* ECCurve_SECG_PRIME_160K1 */
-    &ecCurve_SECG_PRIME_160R1,          /* ECCurve_SECG_PRIME_160R1 */
-    &ecCurve_SECG_PRIME_160R2,          /* ECCurve_SECG_PRIME_160R2 */
-    &ecCurve_SECG_PRIME_192K1,          /* ECCurve_SECG_PRIME_192K1 */
-    &ecCurve_SECG_PRIME_224K1,          /* ECCurve_SECG_PRIME_224K1 */
-    &ecCurve_SECG_PRIME_256K1,          /* ECCurve_SECG_PRIME_256K1 */
-    &ecCurve_SECG_CHAR2_113R1,          /* ECCurve_SECG_CHAR2_113R1 */
-    &ecCurve_SECG_CHAR2_113R2,          /* ECCurve_SECG_CHAR2_113R2 */
-    &ecCurve_SECG_CHAR2_131R1,          /* ECCurve_SECG_CHAR2_131R1 */
-    &ecCurve_SECG_CHAR2_131R2,          /* ECCurve_SECG_CHAR2_131R2 */
-    &ecCurve_SECG_CHAR2_163R1,          /* ECCurve_SECG_CHAR2_163R1 */
-    &ecCurve_SECG_CHAR2_193R1,          /* ECCurve_SECG_CHAR2_193R1 */
-    &ecCurve_SECG_CHAR2_193R2,          /* ECCurve_SECG_CHAR2_193R2 */
-    &ecCurve_SECG_CHAR2_239K1,          /* ECCurve_SECG_CHAR2_239K1 */
-    &ecCurve_WTLS_1,                    /* ECCurve_WTLS_1 */
-    &ecCurve_WTLS_8,                    /* ECCurve_WTLS_8 */
-    &ecCurve_WTLS_9,                    /* ECCurve_WTLS_9 */
-    NULL                                /* ECCurve_pastLastCurve */
-};
-
-#endif /* _ECL_CURVE_H */
--- a/jdk/src/share/native/sun/security/ec/ecl-exp.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_EXP_H
-#define _ECL_EXP_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* Curve field type */
-typedef enum {
-        ECField_GFp,
-        ECField_GF2m
-} ECField;
-
-/* Hexadecimal encoding of curve parameters */
-struct ECCurveParamsStr {
-        char *text;
-        ECField field;
-        unsigned int size;
-        char *irr;
-        char *curvea;
-        char *curveb;
-        char *genx;
-        char *geny;
-        char *order;
-        int cofactor;
-};
-typedef struct ECCurveParamsStr ECCurveParams;
-
-/* Named curve parameters */
-typedef enum {
-
-        ECCurve_noName = 0,
-
-        /* NIST prime curves */
-        ECCurve_NIST_P192,
-        ECCurve_NIST_P224,
-        ECCurve_NIST_P256,
-        ECCurve_NIST_P384,
-        ECCurve_NIST_P521,
-
-        /* NIST binary curves */
-        ECCurve_NIST_K163,
-        ECCurve_NIST_B163,
-        ECCurve_NIST_K233,
-        ECCurve_NIST_B233,
-        ECCurve_NIST_K283,
-        ECCurve_NIST_B283,
-        ECCurve_NIST_K409,
-        ECCurve_NIST_B409,
-        ECCurve_NIST_K571,
-        ECCurve_NIST_B571,
-
-        /* ANSI X9.62 prime curves */
-        /* ECCurve_X9_62_PRIME_192V1 == ECCurve_NIST_P192 */
-        ECCurve_X9_62_PRIME_192V2,
-        ECCurve_X9_62_PRIME_192V3,
-        ECCurve_X9_62_PRIME_239V1,
-        ECCurve_X9_62_PRIME_239V2,
-        ECCurve_X9_62_PRIME_239V3,
-        /* ECCurve_X9_62_PRIME_256V1 == ECCurve_NIST_P256 */
-
-        /* ANSI X9.62 binary curves */
-        ECCurve_X9_62_CHAR2_PNB163V1,
-        ECCurve_X9_62_CHAR2_PNB163V2,
-        ECCurve_X9_62_CHAR2_PNB163V3,
-        ECCurve_X9_62_CHAR2_PNB176V1,
-        ECCurve_X9_62_CHAR2_TNB191V1,
-        ECCurve_X9_62_CHAR2_TNB191V2,
-        ECCurve_X9_62_CHAR2_TNB191V3,
-        ECCurve_X9_62_CHAR2_PNB208W1,
-        ECCurve_X9_62_CHAR2_TNB239V1,
-        ECCurve_X9_62_CHAR2_TNB239V2,
-        ECCurve_X9_62_CHAR2_TNB239V3,
-        ECCurve_X9_62_CHAR2_PNB272W1,
-        ECCurve_X9_62_CHAR2_PNB304W1,
-        ECCurve_X9_62_CHAR2_TNB359V1,
-        ECCurve_X9_62_CHAR2_PNB368W1,
-        ECCurve_X9_62_CHAR2_TNB431R1,
-
-        /* SEC2 prime curves */
-        ECCurve_SECG_PRIME_112R1,
-        ECCurve_SECG_PRIME_112R2,
-        ECCurve_SECG_PRIME_128R1,
-        ECCurve_SECG_PRIME_128R2,
-        ECCurve_SECG_PRIME_160K1,
-        ECCurve_SECG_PRIME_160R1,
-        ECCurve_SECG_PRIME_160R2,
-        ECCurve_SECG_PRIME_192K1,
-        /* ECCurve_SECG_PRIME_192R1 == ECCurve_NIST_P192 */
-        ECCurve_SECG_PRIME_224K1,
-        /* ECCurve_SECG_PRIME_224R1 == ECCurve_NIST_P224 */
-        ECCurve_SECG_PRIME_256K1,
-        /* ECCurve_SECG_PRIME_256R1 == ECCurve_NIST_P256 */
-        /* ECCurve_SECG_PRIME_384R1 == ECCurve_NIST_P384 */
-        /* ECCurve_SECG_PRIME_521R1 == ECCurve_NIST_P521 */
-
-        /* SEC2 binary curves */
-        ECCurve_SECG_CHAR2_113R1,
-        ECCurve_SECG_CHAR2_113R2,
-        ECCurve_SECG_CHAR2_131R1,
-        ECCurve_SECG_CHAR2_131R2,
-        /* ECCurve_SECG_CHAR2_163K1 == ECCurve_NIST_K163 */
-        ECCurve_SECG_CHAR2_163R1,
-        /* ECCurve_SECG_CHAR2_163R2 == ECCurve_NIST_B163 */
-        ECCurve_SECG_CHAR2_193R1,
-        ECCurve_SECG_CHAR2_193R2,
-        /* ECCurve_SECG_CHAR2_233K1 == ECCurve_NIST_K233 */
-        /* ECCurve_SECG_CHAR2_233R1 == ECCurve_NIST_B233 */
-        ECCurve_SECG_CHAR2_239K1,
-        /* ECCurve_SECG_CHAR2_283K1 == ECCurve_NIST_K283 */
-        /* ECCurve_SECG_CHAR2_283R1 == ECCurve_NIST_B283 */
-        /* ECCurve_SECG_CHAR2_409K1 == ECCurve_NIST_K409 */
-        /* ECCurve_SECG_CHAR2_409R1 == ECCurve_NIST_B409 */
-        /* ECCurve_SECG_CHAR2_571K1 == ECCurve_NIST_K571 */
-        /* ECCurve_SECG_CHAR2_571R1 == ECCurve_NIST_B571 */
-
-        /* WTLS curves */
-        ECCurve_WTLS_1,
-        /* there is no WTLS 2 curve */
-        /* ECCurve_WTLS_3 == ECCurve_NIST_K163 */
-        /* ECCurve_WTLS_4 == ECCurve_SECG_CHAR2_113R1 */
-        /* ECCurve_WTLS_5 == ECCurve_X9_62_CHAR2_PNB163V1 */
-        /* ECCurve_WTLS_6 == ECCurve_SECG_PRIME_112R1 */
-        /* ECCurve_WTLS_7 == ECCurve_SECG_PRIME_160R1 */
-        ECCurve_WTLS_8,
-        ECCurve_WTLS_9,
-        /* ECCurve_WTLS_10 == ECCurve_NIST_K233 */
-        /* ECCurve_WTLS_11 == ECCurve_NIST_B233 */
-        /* ECCurve_WTLS_12 == ECCurve_NIST_P224 */
-
-        ECCurve_pastLastCurve
-} ECCurveName;
-
-/* Aliased named curves */
-
-#define ECCurve_X9_62_PRIME_192V1 ECCurve_NIST_P192
-#define ECCurve_X9_62_PRIME_256V1 ECCurve_NIST_P256
-#define ECCurve_SECG_PRIME_192R1 ECCurve_NIST_P192
-#define ECCurve_SECG_PRIME_224R1 ECCurve_NIST_P224
-#define ECCurve_SECG_PRIME_256R1 ECCurve_NIST_P256
-#define ECCurve_SECG_PRIME_384R1 ECCurve_NIST_P384
-#define ECCurve_SECG_PRIME_521R1 ECCurve_NIST_P521
-#define ECCurve_SECG_CHAR2_163K1 ECCurve_NIST_K163
-#define ECCurve_SECG_CHAR2_163R2 ECCurve_NIST_B163
-#define ECCurve_SECG_CHAR2_233K1 ECCurve_NIST_K233
-#define ECCurve_SECG_CHAR2_233R1 ECCurve_NIST_B233
-#define ECCurve_SECG_CHAR2_283K1 ECCurve_NIST_K283
-#define ECCurve_SECG_CHAR2_283R1 ECCurve_NIST_B283
-#define ECCurve_SECG_CHAR2_409K1 ECCurve_NIST_K409
-#define ECCurve_SECG_CHAR2_409R1 ECCurve_NIST_B409
-#define ECCurve_SECG_CHAR2_571K1 ECCurve_NIST_K571
-#define ECCurve_SECG_CHAR2_571R1 ECCurve_NIST_B571
-#define ECCurve_WTLS_3 ECCurve_NIST_K163
-#define ECCurve_WTLS_4 ECCurve_SECG_CHAR2_113R1
-#define ECCurve_WTLS_5 ECCurve_X9_62_CHAR2_PNB163V1
-#define ECCurve_WTLS_6 ECCurve_SECG_PRIME_112R1
-#define ECCurve_WTLS_7 ECCurve_SECG_PRIME_160R1
-#define ECCurve_WTLS_10 ECCurve_NIST_K233
-#define ECCurve_WTLS_11 ECCurve_NIST_B233
-#define ECCurve_WTLS_12 ECCurve_NIST_P224
-
-#endif /* _ECL_EXP_H */
--- a/jdk/src/share/native/sun/security/ec/ecl-priv.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stephen Fung <fungstep@hotmail.com> and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_PRIV_H
-#define _ECL_PRIV_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecl.h"
-#include "mpi.h"
-#include "mplogic.h"
-
-/* MAX_FIELD_SIZE_DIGITS is the maximum size of field element supported */
-/* the following needs to go away... */
-#if defined(MP_USE_LONG_LONG_DIGIT) || defined(MP_USE_LONG_DIGIT)
-#define ECL_SIXTY_FOUR_BIT
-#else
-#define ECL_THIRTY_TWO_BIT
-#endif
-
-#define ECL_CURVE_DIGITS(curve_size_in_bits) \
-        (((curve_size_in_bits)+(sizeof(mp_digit)*8-1))/(sizeof(mp_digit)*8))
-#define ECL_BITS (sizeof(mp_digit)*8)
-#define ECL_MAX_FIELD_SIZE_DIGITS (80/sizeof(mp_digit))
-
-/* Gets the i'th bit in the binary representation of a. If i >= length(a),
- * then return 0. (The above behaviour differs from mpl_get_bit, which
- * causes an error if i >= length(a).) */
-#define MP_GET_BIT(a, i) \
-        ((i) >= mpl_significant_bits((a))) ? 0 : mpl_get_bit((a), (i))
-
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-#define MP_ADD_CARRY(a1, a2, s, cin, cout)   \
-    { mp_word w; \
-    w = ((mp_word)(cin)) + (a1) + (a2); \
-    s = ACCUM(w); \
-    cout = CARRYOUT(w); }
-
-#define MP_SUB_BORROW(a1, a2, s, bin, bout)   \
-    { mp_word w; \
-    w = ((mp_word)(a1)) - (a2) - (bin); \
-    s = ACCUM(w); \
-    bout = (w >> MP_DIGIT_BIT) & 1; }
-
-#else
-/* NOTE,
- * cin and cout could be the same variable.
- * bin and bout could be the same variable.
- * a1 or a2 and s could be the same variable.
- * don't trash those outputs until their respective inputs have
- * been read. */
-#define MP_ADD_CARRY(a1, a2, s, cin, cout)   \
-    { mp_digit tmp,sum; \
-    tmp = (a1); \
-    sum = tmp + (a2); \
-    tmp = (sum < tmp);                     /* detect overflow */ \
-    s = sum += (cin); \
-    cout = tmp + (sum < (cin)); }
-
-#define MP_SUB_BORROW(a1, a2, s, bin, bout)   \
-    { mp_digit tmp; \
-    tmp = (a1); \
-    s = tmp - (a2); \
-    tmp = (s > tmp);                    /* detect borrow */ \
-    if ((bin) && !s--) tmp++;   \
-    bout = tmp; }
-#endif
-
-
-struct GFMethodStr;
-typedef struct GFMethodStr GFMethod;
-struct GFMethodStr {
-        /* Indicates whether the structure was constructed from dynamic memory
-         * or statically created. */
-        int constructed;
-        /* Irreducible that defines the field. For prime fields, this is the
-         * prime p. For binary polynomial fields, this is the bitstring
-         * representation of the irreducible polynomial. */
-        mp_int irr;
-        /* For prime fields, the value irr_arr[0] is the number of bits in the
-         * field. For binary polynomial fields, the irreducible polynomial
-         * f(t) is represented as an array of unsigned int[], where f(t) is
-         * of the form: f(t) = t^p[0] + t^p[1] + ... + t^p[4] where m = p[0]
-         * > p[1] > ... > p[4] = 0. */
-        unsigned int irr_arr[5];
-        /* Field arithmetic methods. All methods (except field_enc and
-         * field_dec) are assumed to take field-encoded parameters and return
-         * field-encoded values. All methods (except field_enc and field_dec)
-         * are required to be implemented. */
-        mp_err (*field_add) (const mp_int *a, const mp_int *b, mp_int *r,
-                                                 const GFMethod *meth);
-        mp_err (*field_neg) (const mp_int *a, mp_int *r, const GFMethod *meth);
-        mp_err (*field_sub) (const mp_int *a, const mp_int *b, mp_int *r,
-                                                 const GFMethod *meth);
-        mp_err (*field_mod) (const mp_int *a, mp_int *r, const GFMethod *meth);
-        mp_err (*field_mul) (const mp_int *a, const mp_int *b, mp_int *r,
-                                                 const GFMethod *meth);
-        mp_err (*field_sqr) (const mp_int *a, mp_int *r, const GFMethod *meth);
-        mp_err (*field_div) (const mp_int *a, const mp_int *b, mp_int *r,
-                                                 const GFMethod *meth);
-        mp_err (*field_enc) (const mp_int *a, mp_int *r, const GFMethod *meth);
-        mp_err (*field_dec) (const mp_int *a, mp_int *r, const GFMethod *meth);
-        /* Extra storage for implementation-specific data.  Any memory
-         * allocated to these extra fields will be cleared by extra_free. */
-        void *extra1;
-        void *extra2;
-        void (*extra_free) (GFMethod *meth);
-};
-
-/* Construct generic GFMethods. */
-GFMethod *GFMethod_consGFp(const mp_int *irr);
-GFMethod *GFMethod_consGFp_mont(const mp_int *irr);
-GFMethod *GFMethod_consGF2m(const mp_int *irr,
-                                                        const unsigned int irr_arr[5]);
-/* Free the memory allocated (if any) to a GFMethod object. */
-void GFMethod_free(GFMethod *meth);
-
-struct ECGroupStr {
-        /* Indicates whether the structure was constructed from dynamic memory
-         * or statically created. */
-        int constructed;
-        /* Field definition and arithmetic. */
-        GFMethod *meth;
-        /* Textual representation of curve name, if any. */
-        char *text;
-#ifdef _KERNEL
-        int text_len;
-#endif
-        /* Curve parameters, field-encoded. */
-        mp_int curvea, curveb;
-        /* x and y coordinates of the base point, field-encoded. */
-        mp_int genx, geny;
-        /* Order and cofactor of the base point. */
-        mp_int order;
-        int cofactor;
-        /* Point arithmetic methods. All methods are assumed to take
-         * field-encoded parameters and return field-encoded values. All
-         * methods (except base_point_mul and points_mul) are required to be
-         * implemented. */
-        mp_err (*point_add) (const mp_int *px, const mp_int *py,
-                                                 const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                                 mp_int *ry, const ECGroup *group);
-        mp_err (*point_sub) (const mp_int *px, const mp_int *py,
-                                                 const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                                 mp_int *ry, const ECGroup *group);
-        mp_err (*point_dbl) (const mp_int *px, const mp_int *py, mp_int *rx,
-                                                 mp_int *ry, const ECGroup *group);
-        mp_err (*point_mul) (const mp_int *n, const mp_int *px,
-                                                 const mp_int *py, mp_int *rx, mp_int *ry,
-                                                 const ECGroup *group);
-        mp_err (*base_point_mul) (const mp_int *n, mp_int *rx, mp_int *ry,
-                                                          const ECGroup *group);
-        mp_err (*points_mul) (const mp_int *k1, const mp_int *k2,
-                                                  const mp_int *px, const mp_int *py, mp_int *rx,
-                                                  mp_int *ry, const ECGroup *group);
-        mp_err (*validate_point) (const mp_int *px, const mp_int *py, const ECGroup *group);
-        /* Extra storage for implementation-specific data.  Any memory
-         * allocated to these extra fields will be cleared by extra_free. */
-        void *extra1;
-        void *extra2;
-        void (*extra_free) (ECGroup *group);
-};
-
-/* Wrapper functions for generic prime field arithmetic. */
-mp_err ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-
-/* fixed length in-line adds. Count is in words */
-mp_err ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-
-mp_err ec_GFp_mod(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-mp_err ec_GFp_sqr(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_div(const mp_int *a, const mp_int *b, mp_int *r,
-                                  const GFMethod *meth);
-/* Wrapper functions for generic binary polynomial field arithmetic. */
-mp_err ec_GF2m_add(const mp_int *a, const mp_int *b, mp_int *r,
-                                   const GFMethod *meth);
-mp_err ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GF2m_mod(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GF2m_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                   const GFMethod *meth);
-mp_err ec_GF2m_sqr(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GF2m_div(const mp_int *a, const mp_int *b, mp_int *r,
-                                   const GFMethod *meth);
-
-/* Montgomery prime field arithmetic. */
-mp_err ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r,
-                                           const GFMethod *meth);
-mp_err ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r,
-                                           const GFMethod *meth);
-mp_err ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth);
-void ec_GFp_extra_free_mont(GFMethod *meth);
-
-/* point multiplication */
-mp_err ec_pts_mul_basic(const mp_int *k1, const mp_int *k2,
-                                                const mp_int *px, const mp_int *py, mp_int *rx,
-                                                mp_int *ry, const ECGroup *group);
-mp_err ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2,
-                                                   const mp_int *px, const mp_int *py, mp_int *rx,
-                                                   mp_int *ry, const ECGroup *group);
-
-/* Computes the windowed non-adjacent-form (NAF) of a scalar. Out should
- * be an array of signed char's to output to, bitsize should be the number
- * of bits of out, in is the original scalar, and w is the window size.
- * NAF is discussed in the paper: D. Hankerson, J. Hernandez and A.
- * Menezes, "Software implementation of elliptic curve cryptography over
- * binary fields", Proc. CHES 2000. */
-mp_err ec_compute_wNAF(signed char *out, int bitsize, const mp_int *in,
-                                           int w);
-
-/* Optimized field arithmetic */
-mp_err ec_group_set_gfp192(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp224(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp256(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp384(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp521(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gf2m163(ECGroup *group, ECCurveName name);
-mp_err ec_group_set_gf2m193(ECGroup *group, ECCurveName name);
-mp_err ec_group_set_gf2m233(ECGroup *group, ECCurveName name);
-
-/* Optimized floating-point arithmetic */
-#ifdef ECL_USE_FP
-mp_err ec_group_set_secp160r1_fp(ECGroup *group);
-mp_err ec_group_set_nistp192_fp(ECGroup *group);
-mp_err ec_group_set_nistp224_fp(ECGroup *group);
-#endif
-
-#endif /* _ECL_PRIV_H */
--- a/jdk/src/share/native/sun/security/ec/ecl.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,475 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mpi.h"
-#include "mplogic.h"
-#include "ecl.h"
-#include "ecl-priv.h"
-#include "ec2.h"
-#include "ecp.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-/* Allocate memory for a new ECGroup object. */
-ECGroup *
-ECGroup_new(int kmflag)
-{
-        mp_err res = MP_OKAY;
-        ECGroup *group;
-#ifdef _KERNEL
-        group = (ECGroup *) kmem_alloc(sizeof(ECGroup), kmflag);
-#else
-        group = (ECGroup *) malloc(sizeof(ECGroup));
-#endif
-        if (group == NULL)
-                return NULL;
-        group->constructed = MP_YES;
-        group->meth = NULL;
-        group->text = NULL;
-        MP_DIGITS(&group->curvea) = 0;
-        MP_DIGITS(&group->curveb) = 0;
-        MP_DIGITS(&group->genx) = 0;
-        MP_DIGITS(&group->geny) = 0;
-        MP_DIGITS(&group->order) = 0;
-        group->base_point_mul = NULL;
-        group->points_mul = NULL;
-        group->validate_point = NULL;
-        group->extra1 = NULL;
-        group->extra2 = NULL;
-        group->extra_free = NULL;
-        MP_CHECKOK(mp_init(&group->curvea, kmflag));
-        MP_CHECKOK(mp_init(&group->curveb, kmflag));
-        MP_CHECKOK(mp_init(&group->genx, kmflag));
-        MP_CHECKOK(mp_init(&group->geny, kmflag));
-        MP_CHECKOK(mp_init(&group->order, kmflag));
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                ECGroup_free(group);
-                return NULL;
-        }
-        return group;
-}
-
-/* Construct a generic ECGroup for elliptic curves over prime fields. */
-ECGroup *
-ECGroup_consGFp(const mp_int *irr, const mp_int *curvea,
-                                const mp_int *curveb, const mp_int *genx,
-                                const mp_int *geny, const mp_int *order, int cofactor)
-{
-        mp_err res = MP_OKAY;
-        ECGroup *group = NULL;
-
-        group = ECGroup_new(FLAG(irr));
-        if (group == NULL)
-                return NULL;
-
-        group->meth = GFMethod_consGFp(irr);
-        if (group->meth == NULL) {
-                res = MP_MEM;
-                goto CLEANUP;
-        }
-        MP_CHECKOK(mp_copy(curvea, &group->curvea));
-        MP_CHECKOK(mp_copy(curveb, &group->curveb));
-        MP_CHECKOK(mp_copy(genx, &group->genx));
-        MP_CHECKOK(mp_copy(geny, &group->geny));
-        MP_CHECKOK(mp_copy(order, &group->order));
-        group->cofactor = cofactor;
-        group->point_add = &ec_GFp_pt_add_aff;
-        group->point_sub = &ec_GFp_pt_sub_aff;
-        group->point_dbl = &ec_GFp_pt_dbl_aff;
-        group->point_mul = &ec_GFp_pt_mul_jm_wNAF;
-        group->base_point_mul = NULL;
-        group->points_mul = &ec_GFp_pts_mul_jac;
-        group->validate_point = &ec_GFp_validate_point;
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                ECGroup_free(group);
-                return NULL;
-        }
-        return group;
-}
-
-/* Construct a generic ECGroup for elliptic curves over prime fields with
- * field arithmetic implemented in Montgomery coordinates. */
-ECGroup *
-ECGroup_consGFp_mont(const mp_int *irr, const mp_int *curvea,
-                                         const mp_int *curveb, const mp_int *genx,
-                                         const mp_int *geny, const mp_int *order, int cofactor)
-{
-        mp_err res = MP_OKAY;
-        ECGroup *group = NULL;
-
-        group = ECGroup_new(FLAG(irr));
-        if (group == NULL)
-                return NULL;
-
-        group->meth = GFMethod_consGFp_mont(irr);
-        if (group->meth == NULL) {
-                res = MP_MEM;
-                goto CLEANUP;
-        }
-        MP_CHECKOK(group->meth->
-                           field_enc(curvea, &group->curvea, group->meth));
-        MP_CHECKOK(group->meth->
-                           field_enc(curveb, &group->curveb, group->meth));
-        MP_CHECKOK(group->meth->field_enc(genx, &group->genx, group->meth));
-        MP_CHECKOK(group->meth->field_enc(geny, &group->geny, group->meth));
-        MP_CHECKOK(mp_copy(order, &group->order));
-        group->cofactor = cofactor;
-        group->point_add = &ec_GFp_pt_add_aff;
-        group->point_sub = &ec_GFp_pt_sub_aff;
-        group->point_dbl = &ec_GFp_pt_dbl_aff;
-        group->point_mul = &ec_GFp_pt_mul_jm_wNAF;
-        group->base_point_mul = NULL;
-        group->points_mul = &ec_GFp_pts_mul_jac;
-        group->validate_point = &ec_GFp_validate_point;
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                ECGroup_free(group);
-                return NULL;
-        }
-        return group;
-}
-
-#ifdef NSS_ECC_MORE_THAN_SUITE_B
-/* Construct a generic ECGroup for elliptic curves over binary polynomial
- * fields. */
-ECGroup *
-ECGroup_consGF2m(const mp_int *irr, const unsigned int irr_arr[5],
-                                 const mp_int *curvea, const mp_int *curveb,
-                                 const mp_int *genx, const mp_int *geny,
-                                 const mp_int *order, int cofactor)
-{
-        mp_err res = MP_OKAY;
-        ECGroup *group = NULL;
-
-        group = ECGroup_new(FLAG(irr));
-        if (group == NULL)
-                return NULL;
-
-        group->meth = GFMethod_consGF2m(irr, irr_arr);
-        if (group->meth == NULL) {
-                res = MP_MEM;
-                goto CLEANUP;
-        }
-        MP_CHECKOK(mp_copy(curvea, &group->curvea));
-        MP_CHECKOK(mp_copy(curveb, &group->curveb));
-        MP_CHECKOK(mp_copy(genx, &group->genx));
-        MP_CHECKOK(mp_copy(geny, &group->geny));
-        MP_CHECKOK(mp_copy(order, &group->order));
-        group->cofactor = cofactor;
-        group->point_add = &ec_GF2m_pt_add_aff;
-        group->point_sub = &ec_GF2m_pt_sub_aff;
-        group->point_dbl = &ec_GF2m_pt_dbl_aff;
-        group->point_mul = &ec_GF2m_pt_mul_mont;
-        group->base_point_mul = NULL;
-        group->points_mul = &ec_pts_mul_basic;
-        group->validate_point = &ec_GF2m_validate_point;
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                ECGroup_free(group);
-                return NULL;
-        }
-        return group;
-}
-#endif
-
-/* Construct ECGroup from hex parameters and name, if any. Called by
- * ECGroup_fromHex and ECGroup_fromName. */
-ECGroup *
-ecgroup_fromNameAndHex(const ECCurveName name,
-                                   const ECCurveParams * params, int kmflag)
-{
-        mp_int irr, curvea, curveb, genx, geny, order;
-        int bits;
-        ECGroup *group = NULL;
-        mp_err res = MP_OKAY;
-
-        /* initialize values */
-        MP_DIGITS(&irr) = 0;
-        MP_DIGITS(&curvea) = 0;
-        MP_DIGITS(&curveb) = 0;
-        MP_DIGITS(&genx) = 0;
-        MP_DIGITS(&geny) = 0;
-        MP_DIGITS(&order) = 0;
-        MP_CHECKOK(mp_init(&irr, kmflag));
-        MP_CHECKOK(mp_init(&curvea, kmflag));
-        MP_CHECKOK(mp_init(&curveb, kmflag));
-        MP_CHECKOK(mp_init(&genx, kmflag));
-        MP_CHECKOK(mp_init(&geny, kmflag));
-        MP_CHECKOK(mp_init(&order, kmflag));
-        MP_CHECKOK(mp_read_radix(&irr, params->irr, 16));
-        MP_CHECKOK(mp_read_radix(&curvea, params->curvea, 16));
-        MP_CHECKOK(mp_read_radix(&curveb, params->curveb, 16));
-        MP_CHECKOK(mp_read_radix(&genx, params->genx, 16));
-        MP_CHECKOK(mp_read_radix(&geny, params->geny, 16));
-        MP_CHECKOK(mp_read_radix(&order, params->order, 16));
-
-        /* determine number of bits */
-        bits = mpl_significant_bits(&irr) - 1;
-        if (bits < MP_OKAY) {
-                res = bits;
-                goto CLEANUP;
-        }
-
-        /* determine which optimizations (if any) to use */
-        if (params->field == ECField_GFp) {
-#ifdef NSS_ECC_MORE_THAN_SUITE_B
-            switch (name) {
-#ifdef ECL_USE_FP
-                case ECCurve_SECG_PRIME_160R1:
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_secp160r1_fp(group));
-                        break;
-#endif
-                case ECCurve_SECG_PRIME_192R1:
-#ifdef ECL_USE_FP
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_nistp192_fp(group));
-#else
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_gfp192(group, name));
-#endif
-                        break;
-                case ECCurve_SECG_PRIME_224R1:
-#ifdef ECL_USE_FP
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_nistp224_fp(group));
-#else
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_gfp224(group, name));
-#endif
-                        break;
-                case ECCurve_SECG_PRIME_256R1:
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_gfp256(group, name));
-                        break;
-                case ECCurve_SECG_PRIME_521R1:
-                        group =
-                                ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
-                                                                &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                        MP_CHECKOK(ec_group_set_gfp521(group, name));
-                        break;
-                default:
-                        /* use generic arithmetic */
-#endif
-                        group =
-                                ECGroup_consGFp_mont(&irr, &curvea, &curveb, &genx, &geny,
-                                                                         &order, params->cofactor);
-                        if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-#ifdef NSS_ECC_MORE_THAN_SUITE_B
-                }
-        } else if (params->field == ECField_GF2m) {
-                group = ECGroup_consGF2m(&irr, NULL, &curvea, &curveb, &genx, &geny, &order, params->cofactor);
-                if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-                if ((name == ECCurve_NIST_K163) ||
-                    (name == ECCurve_NIST_B163) ||
-                    (name == ECCurve_SECG_CHAR2_163R1)) {
-                        MP_CHECKOK(ec_group_set_gf2m163(group, name));
-                } else if ((name == ECCurve_SECG_CHAR2_193R1) ||
-                           (name == ECCurve_SECG_CHAR2_193R2)) {
-                        MP_CHECKOK(ec_group_set_gf2m193(group, name));
-                } else if ((name == ECCurve_NIST_K233) ||
-                           (name == ECCurve_NIST_B233)) {
-                        MP_CHECKOK(ec_group_set_gf2m233(group, name));
-                }
-#endif
-        } else {
-                res = MP_UNDEF;
-                goto CLEANUP;
-        }
-
-        /* set name, if any */
-        if ((group != NULL) && (params->text != NULL)) {
-#ifdef _KERNEL
-                int n = strlen(params->text) + 1;
-
-                group->text = kmem_alloc(n, kmflag);
-                if (group->text == NULL) {
-                        res = MP_MEM;
-                        goto CLEANUP;
-                }
-                bcopy(params->text, group->text, n);
-                group->text_len = n;
-#else
-                group->text = strdup(params->text);
-                if (group->text == NULL) {
-                        res = MP_MEM;
-                }
-#endif
-        }
-
-  CLEANUP:
-        mp_clear(&irr);
-        mp_clear(&curvea);
-        mp_clear(&curveb);
-        mp_clear(&genx);
-        mp_clear(&geny);
-        mp_clear(&order);
-        if (res != MP_OKAY) {
-                ECGroup_free(group);
-                return NULL;
-        }
-        return group;
-}
-
-/* Construct ECGroup from hexadecimal representations of parameters. */
-ECGroup *
-ECGroup_fromHex(const ECCurveParams * params, int kmflag)
-{
-        return ecgroup_fromNameAndHex(ECCurve_noName, params, kmflag);
-}
-
-/* Construct ECGroup from named parameters. */
-ECGroup *
-ECGroup_fromName(const ECCurveName name, int kmflag)
-{
-        ECGroup *group = NULL;
-        ECCurveParams *params = NULL;
-        mp_err res = MP_OKAY;
-
-        params = EC_GetNamedCurveParams(name, kmflag);
-        if (params == NULL) {
-                res = MP_UNDEF;
-                goto CLEANUP;
-        }
-
-        /* construct actual group */
-        group = ecgroup_fromNameAndHex(name, params, kmflag);
-        if (group == NULL) {
-                res = MP_UNDEF;
-                goto CLEANUP;
-        }
-
-  CLEANUP:
-        EC_FreeCurveParams(params);
-        if (res != MP_OKAY) {
-                ECGroup_free(group);
-                return NULL;
-        }
-        return group;
-}
-
-/* Validates an EC public key as described in Section 5.2.2 of X9.62. */
-mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
-                                        mp_int *py)
-{
-    /* 1: Verify that publicValue is not the point at infinity */
-    /* 2: Verify that the coordinates of publicValue are elements
-     *    of the field.
-     */
-    /* 3: Verify that publicValue is on the curve. */
-    /* 4: Verify that the order of the curve times the publicValue
-     *    is the point at infinity.
-     */
-        return group->validate_point(px, py, group);
-}
-
-/* Free the memory allocated (if any) to an ECGroup object. */
-void
-ECGroup_free(ECGroup *group)
-{
-        if (group == NULL)
-                return;
-        GFMethod_free(group->meth);
-        if (group->constructed == MP_NO)
-                return;
-        mp_clear(&group->curvea);
-        mp_clear(&group->curveb);
-        mp_clear(&group->genx);
-        mp_clear(&group->geny);
-        mp_clear(&group->order);
-        if (group->text != NULL)
-#ifdef _KERNEL
-                kmem_free(group->text, group->text_len);
-#else
-                free(group->text);
-#endif
-        if (group->extra_free != NULL)
-                group->extra_free(group);
-#ifdef _KERNEL
-        kmem_free(group, sizeof (ECGroup));
-#else
-        free(group);
-#endif
-}
--- a/jdk/src/share/native/sun/security/ec/ecl.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_H
-#define _ECL_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* Although this is not an exported header file, code which uses elliptic
- * curve point operations will need to include it. */
-
-#include "ecl-exp.h"
-#include "mpi.h"
-
-struct ECGroupStr;
-typedef struct ECGroupStr ECGroup;
-
-/* Construct ECGroup from hexadecimal representations of parameters. */
-ECGroup *ECGroup_fromHex(const ECCurveParams * params, int kmflag);
-
-/* Construct ECGroup from named parameters. */
-ECGroup *ECGroup_fromName(const ECCurveName name, int kmflag);
-
-/* Free an allocated ECGroup. */
-void ECGroup_free(ECGroup *group);
-
-/* Construct ECCurveParams from an ECCurveName */
-ECCurveParams *EC_GetNamedCurveParams(const ECCurveName name, int kmflag);
-
-/* Duplicates an ECCurveParams */
-ECCurveParams *ECCurveParams_dup(const ECCurveParams * params, int kmflag);
-
-/* Free an allocated ECCurveParams */
-void EC_FreeCurveParams(ECCurveParams * params);
-
-/* Elliptic curve scalar-point multiplication. Computes Q(x, y) = k * P(x,
- * y).  If x, y = NULL, then P is assumed to be the generator (base point)
- * of the group of points on the elliptic curve. Input and output values
- * are assumed to be NOT field-encoded. */
-mp_err ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
-                                   const mp_int *py, mp_int *qx, mp_int *qy);
-
-/* Elliptic curve scalar-point multiplication. Computes Q(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Input and output values are assumed to
- * be NOT field-encoded. */
-mp_err ECPoints_mul(const ECGroup *group, const mp_int *k1,
-                                        const mp_int *k2, const mp_int *px, const mp_int *py,
-                                        mp_int *qx, mp_int *qy);
-
-/* Validates an EC public key as described in Section 5.2.2 of X9.62.
- * Returns MP_YES if the public key is valid, MP_NO if the public key
- * is invalid, or an error code if the validation could not be
- * performed. */
-mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
-                                        mp_int *py);
-
-#endif /* _ECL_H */
--- a/jdk/src/share/native/sun/security/ec/ecl_curve.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecl.h"
-#include "ecl-curve.h"
-#include "ecl-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-#define CHECK(func) if ((func) == NULL) { res = 0; goto CLEANUP; }
-
-/* Duplicates an ECCurveParams */
-ECCurveParams *
-ECCurveParams_dup(const ECCurveParams * params, int kmflag)
-{
-        int res = 1;
-        ECCurveParams *ret = NULL;
-
-#ifdef _KERNEL
-        ret = (ECCurveParams *) kmem_zalloc(sizeof(ECCurveParams), kmflag);
-#else
-        CHECK(ret = (ECCurveParams *) calloc(1, sizeof(ECCurveParams)));
-#endif
-        if (params->text != NULL) {
-#ifdef _KERNEL
-                ret->text = kmem_alloc(strlen(params->text) + 1, kmflag);
-                bcopy(params->text, ret->text, strlen(params->text) + 1);
-#else
-                CHECK(ret->text = strdup(params->text));
-#endif
-        }
-        ret->field = params->field;
-        ret->size = params->size;
-        if (params->irr != NULL) {
-#ifdef _KERNEL
-                ret->irr = kmem_alloc(strlen(params->irr) + 1, kmflag);
-                bcopy(params->irr, ret->irr, strlen(params->irr) + 1);
-#else
-                CHECK(ret->irr = strdup(params->irr));
-#endif
-        }
-        if (params->curvea != NULL) {
-#ifdef _KERNEL
-                ret->curvea = kmem_alloc(strlen(params->curvea) + 1, kmflag);
-                bcopy(params->curvea, ret->curvea, strlen(params->curvea) + 1);
-#else
-                CHECK(ret->curvea = strdup(params->curvea));
-#endif
-        }
-        if (params->curveb != NULL) {
-#ifdef _KERNEL
-                ret->curveb = kmem_alloc(strlen(params->curveb) + 1, kmflag);
-                bcopy(params->curveb, ret->curveb, strlen(params->curveb) + 1);
-#else
-                CHECK(ret->curveb = strdup(params->curveb));
-#endif
-        }
-        if (params->genx != NULL) {
-#ifdef _KERNEL
-                ret->genx = kmem_alloc(strlen(params->genx) + 1, kmflag);
-                bcopy(params->genx, ret->genx, strlen(params->genx) + 1);
-#else
-                CHECK(ret->genx = strdup(params->genx));
-#endif
-        }
-        if (params->geny != NULL) {
-#ifdef _KERNEL
-                ret->geny = kmem_alloc(strlen(params->geny) + 1, kmflag);
-                bcopy(params->geny, ret->geny, strlen(params->geny) + 1);
-#else
-                CHECK(ret->geny = strdup(params->geny));
-#endif
-        }
-        if (params->order != NULL) {
-#ifdef _KERNEL
-                ret->order = kmem_alloc(strlen(params->order) + 1, kmflag);
-                bcopy(params->order, ret->order, strlen(params->order) + 1);
-#else
-                CHECK(ret->order = strdup(params->order));
-#endif
-        }
-        ret->cofactor = params->cofactor;
-
-  CLEANUP:
-        if (res != 1) {
-                EC_FreeCurveParams(ret);
-                return NULL;
-        }
-        return ret;
-}
-
-#undef CHECK
-
-/* Construct ECCurveParams from an ECCurveName */
-ECCurveParams *
-EC_GetNamedCurveParams(const ECCurveName name, int kmflag)
-{
-        if ((name <= ECCurve_noName) || (ECCurve_pastLastCurve <= name) ||
-                                        (ecCurve_map[name] == NULL)) {
-                return NULL;
-        } else {
-                return ECCurveParams_dup(ecCurve_map[name], kmflag);
-        }
-}
-
-/* Free the memory allocated (if any) to an ECCurveParams object. */
-void
-EC_FreeCurveParams(ECCurveParams * params)
-{
-        if (params == NULL)
-                return;
-        if (params->text != NULL)
-#ifdef _KERNEL
-                kmem_free(params->text, strlen(params->text) + 1);
-#else
-                free(params->text);
-#endif
-        if (params->irr != NULL)
-#ifdef _KERNEL
-                kmem_free(params->irr, strlen(params->irr) + 1);
-#else
-                free(params->irr);
-#endif
-        if (params->curvea != NULL)
-#ifdef _KERNEL
-                kmem_free(params->curvea, strlen(params->curvea) + 1);
-#else
-                free(params->curvea);
-#endif
-        if (params->curveb != NULL)
-#ifdef _KERNEL
-                kmem_free(params->curveb, strlen(params->curveb) + 1);
-#else
-                free(params->curveb);
-#endif
-        if (params->genx != NULL)
-#ifdef _KERNEL
-                kmem_free(params->genx, strlen(params->genx) + 1);
-#else
-                free(params->genx);
-#endif
-        if (params->geny != NULL)
-#ifdef _KERNEL
-                kmem_free(params->geny, strlen(params->geny) + 1);
-#else
-                free(params->geny);
-#endif
-        if (params->order != NULL)
-#ifdef _KERNEL
-                kmem_free(params->order, strlen(params->order) + 1);
-#else
-                free(params->order);
-#endif
-#ifdef _KERNEL
-        kmem_free(params, sizeof(ECCurveParams));
-#else
-        free(params);
-#endif
-}
--- a/jdk/src/share/native/sun/security/ec/ecl_gf.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1062 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stephen Fung <fungstep@hotmail.com> and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mpi.h"
-#include "mp_gf2m.h"
-#include "ecl-priv.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Allocate memory for a new GFMethod object. */
-GFMethod *
-GFMethod_new(int kmflag)
-{
-        mp_err res = MP_OKAY;
-        GFMethod *meth;
-#ifdef _KERNEL
-        meth = (GFMethod *) kmem_alloc(sizeof(GFMethod), kmflag);
-#else
-        meth = (GFMethod *) malloc(sizeof(GFMethod));
-        if (meth == NULL)
-                return NULL;
-#endif
-        meth->constructed = MP_YES;
-        MP_DIGITS(&meth->irr) = 0;
-        meth->extra_free = NULL;
-        MP_CHECKOK(mp_init(&meth->irr, kmflag));
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                GFMethod_free(meth);
-                return NULL;
-        }
-        return meth;
-}
-
-/* Construct a generic GFMethod for arithmetic over prime fields with
- * irreducible irr. */
-GFMethod *
-GFMethod_consGFp(const mp_int *irr)
-{
-        mp_err res = MP_OKAY;
-        GFMethod *meth = NULL;
-
-        meth = GFMethod_new(FLAG(irr));
-        if (meth == NULL)
-                return NULL;
-
-        MP_CHECKOK(mp_copy(irr, &meth->irr));
-        meth->irr_arr[0] = mpl_significant_bits(irr);
-        meth->irr_arr[1] = meth->irr_arr[2] = meth->irr_arr[3] =
-                meth->irr_arr[4] = 0;
-        switch(MP_USED(&meth->irr)) {
-        /* maybe we need 1 and 2 words here as well?*/
-        case 3:
-                meth->field_add = &ec_GFp_add_3;
-                meth->field_sub = &ec_GFp_sub_3;
-                break;
-        case 4:
-                meth->field_add = &ec_GFp_add_4;
-                meth->field_sub = &ec_GFp_sub_4;
-                break;
-        case 5:
-                meth->field_add = &ec_GFp_add_5;
-                meth->field_sub = &ec_GFp_sub_5;
-                break;
-        case 6:
-                meth->field_add = &ec_GFp_add_6;
-                meth->field_sub = &ec_GFp_sub_6;
-                break;
-        default:
-                meth->field_add = &ec_GFp_add;
-                meth->field_sub = &ec_GFp_sub;
-        }
-        meth->field_neg = &ec_GFp_neg;
-        meth->field_mod = &ec_GFp_mod;
-        meth->field_mul = &ec_GFp_mul;
-        meth->field_sqr = &ec_GFp_sqr;
-        meth->field_div = &ec_GFp_div;
-        meth->field_enc = NULL;
-        meth->field_dec = NULL;
-        meth->extra1 = NULL;
-        meth->extra2 = NULL;
-        meth->extra_free = NULL;
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                GFMethod_free(meth);
-                return NULL;
-        }
-        return meth;
-}
-
-/* Construct a generic GFMethod for arithmetic over binary polynomial
- * fields with irreducible irr that has array representation irr_arr (see
- * ecl-priv.h for description of the representation).  If irr_arr is NULL,
- * then it is constructed from the bitstring representation. */
-GFMethod *
-GFMethod_consGF2m(const mp_int *irr, const unsigned int irr_arr[5])
-{
-        mp_err res = MP_OKAY;
-        int ret;
-        GFMethod *meth = NULL;
-
-        meth = GFMethod_new(FLAG(irr));
-        if (meth == NULL)
-                return NULL;
-
-        MP_CHECKOK(mp_copy(irr, &meth->irr));
-        if (irr_arr != NULL) {
-                /* Irreducible polynomials are either trinomials or pentanomials. */
-                meth->irr_arr[0] = irr_arr[0];
-                meth->irr_arr[1] = irr_arr[1];
-                meth->irr_arr[2] = irr_arr[2];
-                if (irr_arr[2] > 0) {
-                        meth->irr_arr[3] = irr_arr[3];
-                        meth->irr_arr[4] = irr_arr[4];
-                } else {
-                        meth->irr_arr[3] = meth->irr_arr[4] = 0;
-                }
-        } else {
-                ret = mp_bpoly2arr(irr, meth->irr_arr, 5);
-                /* Irreducible polynomials are either trinomials or pentanomials. */
-                if ((ret != 5) && (ret != 3)) {
-                        res = MP_UNDEF;
-                        goto CLEANUP;
-                }
-        }
-        meth->field_add = &ec_GF2m_add;
-        meth->field_neg = &ec_GF2m_neg;
-        meth->field_sub = &ec_GF2m_add;
-        meth->field_mod = &ec_GF2m_mod;
-        meth->field_mul = &ec_GF2m_mul;
-        meth->field_sqr = &ec_GF2m_sqr;
-        meth->field_div = &ec_GF2m_div;
-        meth->field_enc = NULL;
-        meth->field_dec = NULL;
-        meth->extra1 = NULL;
-        meth->extra2 = NULL;
-        meth->extra_free = NULL;
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                GFMethod_free(meth);
-                return NULL;
-        }
-        return meth;
-}
-
-/* Free the memory allocated (if any) to a GFMethod object. */
-void
-GFMethod_free(GFMethod *meth)
-{
-        if (meth == NULL)
-                return;
-        if (meth->constructed == MP_NO)
-                return;
-        mp_clear(&meth->irr);
-        if (meth->extra_free != NULL)
-                meth->extra_free(meth);
-#ifdef _KERNEL
-        kmem_free(meth, sizeof(GFMethod));
-#else
-        free(meth);
-#endif
-}
-
-/* Wrapper functions for generic prime field arithmetic. */
-
-/* Add two field elements.  Assumes that 0 <= a, b < meth->irr */
-mp_err
-ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        /* PRE: 0 <= a, b < p = meth->irr POST: 0 <= r < p, r = a + b (mod p) */
-        mp_err res;
-
-        if ((res = mp_add(a, b, r)) != MP_OKAY) {
-                return res;
-        }
-        if (mp_cmp(r, &meth->irr) >= 0) {
-                return mp_sub(r, &meth->irr, r);
-        }
-        return res;
-}
-
-/* Negates a field element.  Assumes that 0 <= a < meth->irr */
-mp_err
-ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        /* PRE: 0 <= a < p = meth->irr POST: 0 <= r < p, r = -a (mod p) */
-
-        if (mp_cmp_z(a) == 0) {
-                mp_zero(r);
-                return MP_OKAY;
-        }
-        return mp_sub(&meth->irr, a, r);
-}
-
-/* Subtracts two field elements.  Assumes that 0 <= a, b < meth->irr */
-mp_err
-ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        /* PRE: 0 <= a, b < p = meth->irr POST: 0 <= r < p, r = a - b (mod p) */
-        res = mp_sub(a, b, r);
-        if (res == MP_RANGE) {
-                MP_CHECKOK(mp_sub(b, a, r));
-                if (mp_cmp_z(r) < 0) {
-                        MP_CHECKOK(mp_add(r, &meth->irr, r));
-                }
-                MP_CHECKOK(ec_GFp_neg(r, r, meth));
-        }
-        if (mp_cmp_z(r) < 0) {
-                MP_CHECKOK(mp_add(r, &meth->irr, r));
-        }
-  CLEANUP:
-        return res;
-}
-/*
- * Inline adds for small curve lengths.
- */
-/* 3 words */
-mp_err
-ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a0 = 0, a1 = 0, a2 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0;
-        mp_digit carry;
-
-        switch(MP_USED(a)) {
-        case 3:
-                a2 = MP_DIGIT(a,2);
-        case 2:
-                a1 = MP_DIGIT(a,1);
-        case 1:
-                a0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 3:
-                r2 = MP_DIGIT(b,2);
-        case 2:
-                r1 = MP_DIGIT(b,1);
-        case 1:
-                r0 = MP_DIGIT(b,0);
-        }
-
-#ifndef MPI_AMD64_ADD
-        MP_ADD_CARRY(a0, r0, r0, 0,     carry);
-        MP_ADD_CARRY(a1, r1, r1, carry, carry);
-        MP_ADD_CARRY(a2, r2, r2, carry, carry);
-#else
-        __asm__ (
-                "xorq   %3,%3           \n\t"
-                "addq   %4,%0           \n\t"
-                "adcq   %5,%1           \n\t"
-                "adcq   %6,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(carry)
-                : "r" (a0), "r" (a1), "r" (a2),
-                  "0" (r0), "1" (r1), "2" (r2)
-                : "%cc" );
-#endif
-
-        MP_CHECKOK(s_mp_pad(r, 3));
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 3;
-
-        /* Do quick 'subract' if we've gone over
-         * (add the 2's complement of the curve field) */
-         a2 = MP_DIGIT(&meth->irr,2);
-        if (carry ||  r2 >  a2 ||
-                ((r2 == a2) && mp_cmp(r,&meth->irr) != MP_LT)) {
-                a1 = MP_DIGIT(&meth->irr,1);
-                a0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
-                MP_SUB_BORROW(r0, a0, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a1, r1, carry, carry);
-                MP_SUB_BORROW(r2, a2, r2, carry, carry);
-#else
-                __asm__ (
-                        "subq   %3,%0           \n\t"
-                        "sbbq   %4,%1           \n\t"
-                        "sbbq   %5,%2           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2)
-                        : "r" (a0), "r" (a1), "r" (a2),
-                          "0" (r0), "1" (r1), "2" (r2)
-                        : "%cc" );
-#endif
-                MP_DIGIT(r, 2) = r2;
-                MP_DIGIT(r, 1) = r1;
-                MP_DIGIT(r, 0) = r0;
-        }
-
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* 4 words */
-mp_err
-ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0;
-        mp_digit carry;
-
-        switch(MP_USED(a)) {
-        case 4:
-                a3 = MP_DIGIT(a,3);
-        case 3:
-                a2 = MP_DIGIT(a,2);
-        case 2:
-                a1 = MP_DIGIT(a,1);
-        case 1:
-                a0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 4:
-                r3 = MP_DIGIT(b,3);
-        case 3:
-                r2 = MP_DIGIT(b,2);
-        case 2:
-                r1 = MP_DIGIT(b,1);
-        case 1:
-                r0 = MP_DIGIT(b,0);
-        }
-
-#ifndef MPI_AMD64_ADD
-        MP_ADD_CARRY(a0, r0, r0, 0,     carry);
-        MP_ADD_CARRY(a1, r1, r1, carry, carry);
-        MP_ADD_CARRY(a2, r2, r2, carry, carry);
-        MP_ADD_CARRY(a3, r3, r3, carry, carry);
-#else
-        __asm__ (
-                "xorq   %4,%4           \n\t"
-                "addq   %5,%0           \n\t"
-                "adcq   %6,%1           \n\t"
-                "adcq   %7,%2           \n\t"
-                "adcq   %8,%3           \n\t"
-                "adcq   $0,%4           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(carry)
-                : "r" (a0), "r" (a1), "r" (a2), "r" (a3),
-                  "0" (r0), "1" (r1), "2" (r2), "3" (r3)
-                : "%cc" );
-#endif
-
-        MP_CHECKOK(s_mp_pad(r, 4));
-        MP_DIGIT(r, 3) = r3;
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 4;
-
-        /* Do quick 'subract' if we've gone over
-         * (add the 2's complement of the curve field) */
-         a3 = MP_DIGIT(&meth->irr,3);
-        if (carry ||  r3 >  a3 ||
-                ((r3 == a3) && mp_cmp(r,&meth->irr) != MP_LT)) {
-                a2 = MP_DIGIT(&meth->irr,2);
-                a1 = MP_DIGIT(&meth->irr,1);
-                a0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
-                MP_SUB_BORROW(r0, a0, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a1, r1, carry, carry);
-                MP_SUB_BORROW(r2, a2, r2, carry, carry);
-                MP_SUB_BORROW(r3, a3, r3, carry, carry);
-#else
-                __asm__ (
-                        "subq   %4,%0           \n\t"
-                        "sbbq   %5,%1           \n\t"
-                        "sbbq   %6,%2           \n\t"
-                        "sbbq   %7,%3           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3)
-                        : "r" (a0), "r" (a1), "r" (a2), "r" (a3),
-                          "0" (r0), "1" (r1), "2" (r2), "3" (r3)
-                        : "%cc" );
-#endif
-                MP_DIGIT(r, 3) = r3;
-                MP_DIGIT(r, 2) = r2;
-                MP_DIGIT(r, 1) = r1;
-                MP_DIGIT(r, 0) = r0;
-        }
-
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* 5 words */
-mp_err
-ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0;
-        mp_digit carry;
-
-        switch(MP_USED(a)) {
-        case 5:
-                a4 = MP_DIGIT(a,4);
-        case 4:
-                a3 = MP_DIGIT(a,3);
-        case 3:
-                a2 = MP_DIGIT(a,2);
-        case 2:
-                a1 = MP_DIGIT(a,1);
-        case 1:
-                a0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 5:
-                r4 = MP_DIGIT(b,4);
-        case 4:
-                r3 = MP_DIGIT(b,3);
-        case 3:
-                r2 = MP_DIGIT(b,2);
-        case 2:
-                r1 = MP_DIGIT(b,1);
-        case 1:
-                r0 = MP_DIGIT(b,0);
-        }
-
-        MP_ADD_CARRY(a0, r0, r0, 0,     carry);
-        MP_ADD_CARRY(a1, r1, r1, carry, carry);
-        MP_ADD_CARRY(a2, r2, r2, carry, carry);
-        MP_ADD_CARRY(a3, r3, r3, carry, carry);
-        MP_ADD_CARRY(a4, r4, r4, carry, carry);
-
-        MP_CHECKOK(s_mp_pad(r, 5));
-        MP_DIGIT(r, 4) = r4;
-        MP_DIGIT(r, 3) = r3;
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 5;
-
-        /* Do quick 'subract' if we've gone over
-         * (add the 2's complement of the curve field) */
-         a4 = MP_DIGIT(&meth->irr,4);
-        if (carry ||  r4 >  a4 ||
-                ((r4 == a4) && mp_cmp(r,&meth->irr) != MP_LT)) {
-                a3 = MP_DIGIT(&meth->irr,3);
-                a2 = MP_DIGIT(&meth->irr,2);
-                a1 = MP_DIGIT(&meth->irr,1);
-                a0 = MP_DIGIT(&meth->irr,0);
-                MP_SUB_BORROW(r0, a0, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a1, r1, carry, carry);
-                MP_SUB_BORROW(r2, a2, r2, carry, carry);
-                MP_SUB_BORROW(r3, a3, r3, carry, carry);
-                MP_SUB_BORROW(r4, a4, r4, carry, carry);
-                MP_DIGIT(r, 4) = r4;
-                MP_DIGIT(r, 3) = r3;
-                MP_DIGIT(r, 2) = r2;
-                MP_DIGIT(r, 1) = r1;
-                MP_DIGIT(r, 0) = r0;
-        }
-
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* 6 words */
-mp_err
-ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0;
-        mp_digit carry;
-
-        switch(MP_USED(a)) {
-        case 6:
-                a5 = MP_DIGIT(a,5);
-        case 5:
-                a4 = MP_DIGIT(a,4);
-        case 4:
-                a3 = MP_DIGIT(a,3);
-        case 3:
-                a2 = MP_DIGIT(a,2);
-        case 2:
-                a1 = MP_DIGIT(a,1);
-        case 1:
-                a0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 6:
-                r5 = MP_DIGIT(b,5);
-        case 5:
-                r4 = MP_DIGIT(b,4);
-        case 4:
-                r3 = MP_DIGIT(b,3);
-        case 3:
-                r2 = MP_DIGIT(b,2);
-        case 2:
-                r1 = MP_DIGIT(b,1);
-        case 1:
-                r0 = MP_DIGIT(b,0);
-        }
-
-        MP_ADD_CARRY(a0, r0, r0, 0,     carry);
-        MP_ADD_CARRY(a1, r1, r1, carry, carry);
-        MP_ADD_CARRY(a2, r2, r2, carry, carry);
-        MP_ADD_CARRY(a3, r3, r3, carry, carry);
-        MP_ADD_CARRY(a4, r4, r4, carry, carry);
-        MP_ADD_CARRY(a5, r5, r5, carry, carry);
-
-        MP_CHECKOK(s_mp_pad(r, 6));
-        MP_DIGIT(r, 5) = r5;
-        MP_DIGIT(r, 4) = r4;
-        MP_DIGIT(r, 3) = r3;
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 6;
-
-        /* Do quick 'subract' if we've gone over
-         * (add the 2's complement of the curve field) */
-        a5 = MP_DIGIT(&meth->irr,5);
-        if (carry ||  r5 >  a5 ||
-                ((r5 == a5) && mp_cmp(r,&meth->irr) != MP_LT)) {
-                a4 = MP_DIGIT(&meth->irr,4);
-                a3 = MP_DIGIT(&meth->irr,3);
-                a2 = MP_DIGIT(&meth->irr,2);
-                a1 = MP_DIGIT(&meth->irr,1);
-                a0 = MP_DIGIT(&meth->irr,0);
-                MP_SUB_BORROW(r0, a0, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a1, r1, carry, carry);
-                MP_SUB_BORROW(r2, a2, r2, carry, carry);
-                MP_SUB_BORROW(r3, a3, r3, carry, carry);
-                MP_SUB_BORROW(r4, a4, r4, carry, carry);
-                MP_SUB_BORROW(r5, a5, r5, carry, carry);
-                MP_DIGIT(r, 5) = r5;
-                MP_DIGIT(r, 4) = r4;
-                MP_DIGIT(r, 3) = r3;
-                MP_DIGIT(r, 2) = r2;
-                MP_DIGIT(r, 1) = r1;
-                MP_DIGIT(r, 0) = r0;
-        }
-
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/*
- * The following subraction functions do in-line subractions based
- * on our curve size.
- *
- * ... 3 words
- */
-mp_err
-ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit b0 = 0, b1 = 0, b2 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0;
-        mp_digit borrow;
-
-        switch(MP_USED(a)) {
-        case 3:
-                r2 = MP_DIGIT(a,2);
-        case 2:
-                r1 = MP_DIGIT(a,1);
-        case 1:
-                r0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 3:
-                b2 = MP_DIGIT(b,2);
-        case 2:
-                b1 = MP_DIGIT(b,1);
-        case 1:
-                b0 = MP_DIGIT(b,0);
-        }
-
-#ifndef MPI_AMD64_ADD
-        MP_SUB_BORROW(r0, b0, r0, 0,     borrow);
-        MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
-        MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-#else
-        __asm__ (
-                "xorq   %3,%3           \n\t"
-                "subq   %4,%0           \n\t"
-                "sbbq   %5,%1           \n\t"
-                "sbbq   %6,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r" (borrow)
-                : "r" (b0), "r" (b1), "r" (b2),
-                  "0" (r0), "1" (r1), "2" (r2)
-                : "%cc" );
-#endif
-
-        /* Do quick 'add' if we've gone under 0
-         * (subtract the 2's complement of the curve field) */
-        if (borrow) {
-                b2 = MP_DIGIT(&meth->irr,2);
-                b1 = MP_DIGIT(&meth->irr,1);
-                b0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
-                MP_ADD_CARRY(b0, r0, r0, 0,      borrow);
-                MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
-                MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
-#else
-                __asm__ (
-                        "addq   %3,%0           \n\t"
-                        "adcq   %4,%1           \n\t"
-                        "adcq   %5,%2           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2)
-                        : "r" (b0), "r" (b1), "r" (b2),
-                          "0" (r0), "1" (r1), "2" (r2)
-                        : "%cc" );
-#endif
-        }
-
-#ifdef MPI_AMD64_ADD
-        /* compiler fakeout? */
-        if ((r2 == b0) && (r1 == b0) && (r0 == b0)) {
-                MP_CHECKOK(s_mp_pad(r, 4));
-        }
-#endif
-        MP_CHECKOK(s_mp_pad(r, 3));
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 3;
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* 4 words */
-mp_err
-ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0;
-        mp_digit borrow;
-
-        switch(MP_USED(a)) {
-        case 4:
-                r3 = MP_DIGIT(a,3);
-        case 3:
-                r2 = MP_DIGIT(a,2);
-        case 2:
-                r1 = MP_DIGIT(a,1);
-        case 1:
-                r0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 4:
-                b3 = MP_DIGIT(b,3);
-        case 3:
-                b2 = MP_DIGIT(b,2);
-        case 2:
-                b1 = MP_DIGIT(b,1);
-        case 1:
-                b0 = MP_DIGIT(b,0);
-        }
-
-#ifndef MPI_AMD64_ADD
-        MP_SUB_BORROW(r0, b0, r0, 0,     borrow);
-        MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
-        MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-        MP_SUB_BORROW(r3, b3, r3, borrow, borrow);
-#else
-        __asm__ (
-                "xorq   %4,%4           \n\t"
-                "subq   %5,%0           \n\t"
-                "sbbq   %6,%1           \n\t"
-                "sbbq   %7,%2           \n\t"
-                "sbbq   %8,%3           \n\t"
-                "adcq   $0,%4           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r" (borrow)
-                : "r" (b0), "r" (b1), "r" (b2), "r" (b3),
-                  "0" (r0), "1" (r1), "2" (r2), "3" (r3)
-                : "%cc" );
-#endif
-
-        /* Do quick 'add' if we've gone under 0
-         * (subtract the 2's complement of the curve field) */
-        if (borrow) {
-                b3 = MP_DIGIT(&meth->irr,3);
-                b2 = MP_DIGIT(&meth->irr,2);
-                b1 = MP_DIGIT(&meth->irr,1);
-                b0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
-                MP_ADD_CARRY(b0, r0, r0, 0,      borrow);
-                MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
-                MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
-                MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
-#else
-                __asm__ (
-                        "addq   %4,%0           \n\t"
-                        "adcq   %5,%1           \n\t"
-                        "adcq   %6,%2           \n\t"
-                        "adcq   %7,%3           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3)
-                        : "r" (b0), "r" (b1), "r" (b2), "r" (b3),
-                          "0" (r0), "1" (r1), "2" (r2), "3" (r3)
-                        : "%cc" );
-#endif
-        }
-#ifdef MPI_AMD64_ADD
-        /* compiler fakeout? */
-        if ((r3 == b0) && (r1 == b0) && (r0 == b0)) {
-                MP_CHECKOK(s_mp_pad(r, 4));
-        }
-#endif
-        MP_CHECKOK(s_mp_pad(r, 4));
-        MP_DIGIT(r, 3) = r3;
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 4;
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* 5 words */
-mp_err
-ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0;
-        mp_digit borrow;
-
-        switch(MP_USED(a)) {
-        case 5:
-                r4 = MP_DIGIT(a,4);
-        case 4:
-                r3 = MP_DIGIT(a,3);
-        case 3:
-                r2 = MP_DIGIT(a,2);
-        case 2:
-                r1 = MP_DIGIT(a,1);
-        case 1:
-                r0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 5:
-                b4 = MP_DIGIT(b,4);
-        case 4:
-                b3 = MP_DIGIT(b,3);
-        case 3:
-                b2 = MP_DIGIT(b,2);
-        case 2:
-                b1 = MP_DIGIT(b,1);
-        case 1:
-                b0 = MP_DIGIT(b,0);
-        }
-
-        MP_SUB_BORROW(r0, b0, r0, 0,     borrow);
-        MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
-        MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-        MP_SUB_BORROW(r3, b3, r3, borrow, borrow);
-        MP_SUB_BORROW(r4, b4, r4, borrow, borrow);
-
-        /* Do quick 'add' if we've gone under 0
-         * (subtract the 2's complement of the curve field) */
-        if (borrow) {
-                b4 = MP_DIGIT(&meth->irr,4);
-                b3 = MP_DIGIT(&meth->irr,3);
-                b2 = MP_DIGIT(&meth->irr,2);
-                b1 = MP_DIGIT(&meth->irr,1);
-                b0 = MP_DIGIT(&meth->irr,0);
-                MP_ADD_CARRY(b0, r0, r0, 0,      borrow);
-                MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
-                MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
-                MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
-        }
-        MP_CHECKOK(s_mp_pad(r, 5));
-        MP_DIGIT(r, 4) = r4;
-        MP_DIGIT(r, 3) = r3;
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 5;
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-/* 6 words */
-mp_err
-ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0, b5 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0;
-        mp_digit borrow;
-
-        switch(MP_USED(a)) {
-        case 6:
-                r5 = MP_DIGIT(a,5);
-        case 5:
-                r4 = MP_DIGIT(a,4);
-        case 4:
-                r3 = MP_DIGIT(a,3);
-        case 3:
-                r2 = MP_DIGIT(a,2);
-        case 2:
-                r1 = MP_DIGIT(a,1);
-        case 1:
-                r0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 6:
-                b5 = MP_DIGIT(b,5);
-        case 5:
-                b4 = MP_DIGIT(b,4);
-        case 4:
-                b3 = MP_DIGIT(b,3);
-        case 3:
-                b2 = MP_DIGIT(b,2);
-        case 2:
-                b1 = MP_DIGIT(b,1);
-        case 1:
-                b0 = MP_DIGIT(b,0);
-        }
-
-        MP_SUB_BORROW(r0, b0, r0, 0,     borrow);
-        MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
-        MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-        MP_SUB_BORROW(r3, b3, r3, borrow, borrow);
-        MP_SUB_BORROW(r4, b4, r4, borrow, borrow);
-        MP_SUB_BORROW(r5, b5, r5, borrow, borrow);
-
-        /* Do quick 'add' if we've gone under 0
-         * (subtract the 2's complement of the curve field) */
-        if (borrow) {
-                b5 = MP_DIGIT(&meth->irr,5);
-                b4 = MP_DIGIT(&meth->irr,4);
-                b3 = MP_DIGIT(&meth->irr,3);
-                b2 = MP_DIGIT(&meth->irr,2);
-                b1 = MP_DIGIT(&meth->irr,1);
-                b0 = MP_DIGIT(&meth->irr,0);
-                MP_ADD_CARRY(b0, r0, r0, 0,      borrow);
-                MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
-                MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
-                MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
-                MP_ADD_CARRY(b4, r4, r4, borrow, borrow);
-        }
-
-        MP_CHECKOK(s_mp_pad(r, 6));
-        MP_DIGIT(r, 5) = r5;
-        MP_DIGIT(r, 4) = r4;
-        MP_DIGIT(r, 3) = r3;
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 6;
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-
-/* Reduces an integer to a field element. */
-mp_err
-ec_GFp_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        return mp_mod(a, &meth->irr, r);
-}
-
-/* Multiplies two field elements. */
-mp_err
-ec_GFp_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        return mp_mulmod(a, b, &meth->irr, r);
-}
-
-/* Squares a field element. */
-mp_err
-ec_GFp_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        return mp_sqrmod(a, &meth->irr, r);
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_div(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_int t;
-
-        /* If a is NULL, then return the inverse of b, otherwise return a/b. */
-        if (a == NULL) {
-                return mp_invmod(b, &meth->irr, r);
-        } else {
-                /* MPI doesn't support divmod, so we implement it using invmod and
-                 * mulmod. */
-                MP_CHECKOK(mp_init(&t, FLAG(b)));
-                MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
-                MP_CHECKOK(mp_mulmod(a, &t, &meth->irr, r));
-          CLEANUP:
-                mp_clear(&t);
-                return res;
-        }
-}
-
-/* Wrapper functions for generic binary polynomial field arithmetic. */
-
-/* Adds two field elements. */
-mp_err
-ec_GF2m_add(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        return mp_badd(a, b, r);
-}
-
-/* Negates a field element. Note that for binary polynomial fields, the
- * negation of a field element is the field element itself. */
-mp_err
-ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        if (a == r) {
-                return MP_OKAY;
-        } else {
-                return mp_copy(a, r);
-        }
-}
-
-/* Reduces a binary polynomial to a field element. */
-mp_err
-ec_GF2m_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        return mp_bmod(a, meth->irr_arr, r);
-}
-
-/* Multiplies two field elements. */
-mp_err
-ec_GF2m_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        return mp_bmulmod(a, b, meth->irr_arr, r);
-}
-
-/* Squares a field element. */
-mp_err
-ec_GF2m_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        return mp_bsqrmod(a, meth->irr_arr, r);
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GF2m_div(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_int t;
-
-        /* If a is NULL, then return the inverse of b, otherwise return a/b. */
-        if (a == NULL) {
-                /* The GF(2^m) portion of MPI doesn't support invmod, so we
-                 * compute 1/b. */
-                MP_CHECKOK(mp_init(&t, FLAG(b)));
-                MP_CHECKOK(mp_set_int(&t, 1));
-                MP_CHECKOK(mp_bdivmod(&t, b, &meth->irr, meth->irr_arr, r));
-          CLEANUP:
-                mp_clear(&t);
-                return res;
-        } else {
-                return mp_bdivmod(a, b, &meth->irr, meth->irr_arr, r);
-        }
-}
--- a/jdk/src/share/native/sun/security/ec/ecl_mult.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,378 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mpi.h"
-#include "mplogic.h"
-#include "ecl.h"
-#include "ecl-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k * P(x,
- * y).  If x, y = NULL, then P is assumed to be the generator (base point)
- * of the group of points on the elliptic curve. Input and output values
- * are assumed to be NOT field-encoded. */
-mp_err
-ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
-                        const mp_int *py, mp_int *rx, mp_int *ry)
-{
-        mp_err res = MP_OKAY;
-        mp_int kt;
-
-        ARGCHK((k != NULL) && (group != NULL), MP_BADARG);
-        MP_DIGITS(&kt) = 0;
-
-        /* want scalar to be less than or equal to group order */
-        if (mp_cmp(k, &group->order) > 0) {
-                MP_CHECKOK(mp_init(&kt, FLAG(k)));
-                MP_CHECKOK(mp_mod(k, &group->order, &kt));
-        } else {
-                MP_SIGN(&kt) = MP_ZPOS;
-                MP_USED(&kt) = MP_USED(k);
-                MP_ALLOC(&kt) = MP_ALLOC(k);
-                MP_DIGITS(&kt) = MP_DIGITS(k);
-        }
-
-        if ((px == NULL) || (py == NULL)) {
-                if (group->base_point_mul) {
-                        MP_CHECKOK(group->base_point_mul(&kt, rx, ry, group));
-                } else {
-                        MP_CHECKOK(group->
-                                           point_mul(&kt, &group->genx, &group->geny, rx, ry,
-                                                                 group));
-                }
-        } else {
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->field_enc(px, rx, group->meth));
-                        MP_CHECKOK(group->meth->field_enc(py, ry, group->meth));
-                        MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group));
-                } else {
-                        MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group));
-                }
-        }
-        if (group->meth->field_dec) {
-                MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
-                MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
-        }
-
-  CLEANUP:
-        if (MP_DIGITS(&kt) != MP_DIGITS(k)) {
-                mp_clear(&kt);
-        }
-        return res;
-}
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Input and output values are assumed to be NOT field-encoded. */
-mp_err
-ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px,
-                                 const mp_int *py, mp_int *rx, mp_int *ry,
-                                 const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int sx, sy;
-
-        ARGCHK(group != NULL, MP_BADARG);
-        ARGCHK(!((k1 == NULL)
-                         && ((k2 == NULL) || (px == NULL)
-                                 || (py == NULL))), MP_BADARG);
-
-        /* if some arguments are not defined used ECPoint_mul */
-        if (k1 == NULL) {
-                return ECPoint_mul(group, k2, px, py, rx, ry);
-        } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
-                return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
-        }
-
-        MP_DIGITS(&sx) = 0;
-        MP_DIGITS(&sy) = 0;
-        MP_CHECKOK(mp_init(&sx, FLAG(k1)));
-        MP_CHECKOK(mp_init(&sy, FLAG(k1)));
-
-        MP_CHECKOK(ECPoint_mul(group, k1, NULL, NULL, &sx, &sy));
-        MP_CHECKOK(ECPoint_mul(group, k2, px, py, rx, ry));
-
-        if (group->meth->field_enc) {
-                MP_CHECKOK(group->meth->field_enc(&sx, &sx, group->meth));
-                MP_CHECKOK(group->meth->field_enc(&sy, &sy, group->meth));
-                MP_CHECKOK(group->meth->field_enc(rx, rx, group->meth));
-                MP_CHECKOK(group->meth->field_enc(ry, ry, group->meth));
-        }
-
-        MP_CHECKOK(group->point_add(&sx, &sy, rx, ry, rx, ry, group));
-
-        if (group->meth->field_dec) {
-                MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
-                MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
-        }
-
-  CLEANUP:
-        mp_clear(&sx);
-        mp_clear(&sy);
-        return res;
-}
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Input and output values are assumed to be NOT field-encoded. Uses
- * algorithm 15 (simultaneous multiple point multiplication) from Brown,
- * Hankerson, Lopez, Menezes. Software Implementation of the NIST
- * Elliptic Curves over Prime Fields. */
-mp_err
-ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
-                                        const mp_int *py, mp_int *rx, mp_int *ry,
-                                        const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int precomp[4][4][2];
-        const mp_int *a, *b;
-        int i, j;
-        int ai, bi, d;
-
-        ARGCHK(group != NULL, MP_BADARG);
-        ARGCHK(!((k1 == NULL)
-                         && ((k2 == NULL) || (px == NULL)
-                                 || (py == NULL))), MP_BADARG);
-
-        /* if some arguments are not defined used ECPoint_mul */
-        if (k1 == NULL) {
-                return ECPoint_mul(group, k2, px, py, rx, ry);
-        } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
-                return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
-        }
-
-        /* initialize precomputation table */
-        for (i = 0; i < 4; i++) {
-                for (j = 0; j < 4; j++) {
-                        MP_DIGITS(&precomp[i][j][0]) = 0;
-                        MP_DIGITS(&precomp[i][j][1]) = 0;
-                }
-        }
-        for (i = 0; i < 4; i++) {
-                for (j = 0; j < 4; j++) {
-                         MP_CHECKOK( mp_init_size(&precomp[i][j][0],
-                                         ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
-                         MP_CHECKOK( mp_init_size(&precomp[i][j][1],
-                                         ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
-                }
-        }
-
-        /* fill precomputation table */
-        /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
-        if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
-                a = k2;
-                b = k1;
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->
-                                           field_enc(px, &precomp[1][0][0], group->meth));
-                        MP_CHECKOK(group->meth->
-                                           field_enc(py, &precomp[1][0][1], group->meth));
-                } else {
-                        MP_CHECKOK(mp_copy(px, &precomp[1][0][0]));
-                        MP_CHECKOK(mp_copy(py, &precomp[1][0][1]));
-                }
-                MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0]));
-                MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1]));
-        } else {
-                a = k1;
-                b = k2;
-                MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0]));
-                MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1]));
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->
-                                           field_enc(px, &precomp[0][1][0], group->meth));
-                        MP_CHECKOK(group->meth->
-                                           field_enc(py, &precomp[0][1][1], group->meth));
-                } else {
-                        MP_CHECKOK(mp_copy(px, &precomp[0][1][0]));
-                        MP_CHECKOK(mp_copy(py, &precomp[0][1][1]));
-                }
-        }
-        /* precompute [*][0][*] */
-        mp_zero(&precomp[0][0][0]);
-        mp_zero(&precomp[0][0][1]);
-        MP_CHECKOK(group->
-                           point_dbl(&precomp[1][0][0], &precomp[1][0][1],
-                                                 &precomp[2][0][0], &precomp[2][0][1], group));
-        MP_CHECKOK(group->
-                           point_add(&precomp[1][0][0], &precomp[1][0][1],
-                                                 &precomp[2][0][0], &precomp[2][0][1],
-                                                 &precomp[3][0][0], &precomp[3][0][1], group));
-        /* precompute [*][1][*] */
-        for (i = 1; i < 4; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[0][1][0], &precomp[0][1][1],
-                                                         &precomp[i][0][0], &precomp[i][0][1],
-                                                         &precomp[i][1][0], &precomp[i][1][1], group));
-        }
-        /* precompute [*][2][*] */
-        MP_CHECKOK(group->
-                           point_dbl(&precomp[0][1][0], &precomp[0][1][1],
-                                                 &precomp[0][2][0], &precomp[0][2][1], group));
-        for (i = 1; i < 4; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[0][2][0], &precomp[0][2][1],
-                                                         &precomp[i][0][0], &precomp[i][0][1],
-                                                         &precomp[i][2][0], &precomp[i][2][1], group));
-        }
-        /* precompute [*][3][*] */
-        MP_CHECKOK(group->
-                           point_add(&precomp[0][1][0], &precomp[0][1][1],
-                                                 &precomp[0][2][0], &precomp[0][2][1],
-                                                 &precomp[0][3][0], &precomp[0][3][1], group));
-        for (i = 1; i < 4; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[0][3][0], &precomp[0][3][1],
-                                                         &precomp[i][0][0], &precomp[i][0][1],
-                                                         &precomp[i][3][0], &precomp[i][3][1], group));
-        }
-
-        d = (mpl_significant_bits(a) + 1) / 2;
-
-        /* R = inf */
-        mp_zero(rx);
-        mp_zero(ry);
-
-        for (i = d - 1; i >= 0; i--) {
-                ai = MP_GET_BIT(a, 2 * i + 1);
-                ai <<= 1;
-                ai |= MP_GET_BIT(a, 2 * i);
-                bi = MP_GET_BIT(b, 2 * i + 1);
-                bi <<= 1;
-                bi |= MP_GET_BIT(b, 2 * i);
-                /* R = 2^2 * R */
-                MP_CHECKOK(group->point_dbl(rx, ry, rx, ry, group));
-                MP_CHECKOK(group->point_dbl(rx, ry, rx, ry, group));
-                /* R = R + (ai * A + bi * B) */
-                MP_CHECKOK(group->
-                                   point_add(rx, ry, &precomp[ai][bi][0],
-                                                         &precomp[ai][bi][1], rx, ry, group));
-        }
-
-        if (group->meth->field_dec) {
-                MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
-                MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
-        }
-
-  CLEANUP:
-        for (i = 0; i < 4; i++) {
-                for (j = 0; j < 4; j++) {
-                        mp_clear(&precomp[i][j][0]);
-                        mp_clear(&precomp[i][j][1]);
-                }
-        }
-        return res;
-}
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Input and output values are assumed to be NOT field-encoded. */
-mp_err
-ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2,
-                         const mp_int *px, const mp_int *py, mp_int *rx, mp_int *ry)
-{
-        mp_err res = MP_OKAY;
-        mp_int k1t, k2t;
-        const mp_int *k1p, *k2p;
-
-        MP_DIGITS(&k1t) = 0;
-        MP_DIGITS(&k2t) = 0;
-
-        ARGCHK(group != NULL, MP_BADARG);
-
-        /* want scalar to be less than or equal to group order */
-        if (k1 != NULL) {
-                if (mp_cmp(k1, &group->order) >= 0) {
-                        MP_CHECKOK(mp_init(&k1t, FLAG(k1)));
-                        MP_CHECKOK(mp_mod(k1, &group->order, &k1t));
-                        k1p = &k1t;
-                } else {
-                        k1p = k1;
-                }
-        } else {
-                k1p = k1;
-        }
-        if (k2 != NULL) {
-                if (mp_cmp(k2, &group->order) >= 0) {
-                        MP_CHECKOK(mp_init(&k2t, FLAG(k2)));
-                        MP_CHECKOK(mp_mod(k2, &group->order, &k2t));
-                        k2p = &k2t;
-                } else {
-                        k2p = k2;
-                }
-        } else {
-                k2p = k2;
-        }
-
-        /* if points_mul is defined, then use it */
-        if (group->points_mul) {
-                res = group->points_mul(k1p, k2p, px, py, rx, ry, group);
-        } else {
-                res = ec_pts_mul_simul_w2(k1p, k2p, px, py, rx, ry, group);
-        }
-
-  CLEANUP:
-        mp_clear(&k1t);
-        mp_clear(&k2t);
-        return res;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECP_H
-#define _ECP_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecl-priv.h"
-
-/* Checks if point P(px, py) is at infinity.  Uses affine coordinates. */
-mp_err ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py);
-
-/* Sets P(px, py) to be the point at infinity.  Uses affine coordinates. */
-mp_err ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py);
-
-/* Computes R = P + Q where R is (rx, ry), P is (px, py) and Q is (qx,
- * qy). Uses affine coordinates. */
-mp_err ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py,
-                                                 const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                                 mp_int *ry, const ECGroup *group);
-
-/* Computes R = P - Q.  Uses affine coordinates. */
-mp_err ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py,
-                                                 const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                                 mp_int *ry, const ECGroup *group);
-
-/* Computes R = 2P.  Uses affine coordinates. */
-mp_err ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
-                                                 mp_int *ry, const ECGroup *group);
-
-/* Validates a point on a GFp curve. */
-mp_err ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group);
-
-#ifdef ECL_ENABLE_GFP_PT_MUL_AFF
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GFp.  Uses affine coordinates. */
-mp_err ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px,
-                                                 const mp_int *py, mp_int *rx, mp_int *ry,
-                                                 const ECGroup *group);
-#endif
-
-/* Converts a point P(px, py) from affine coordinates to Jacobian
- * projective coordinates R(rx, ry, rz). */
-mp_err ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
-                                                 mp_int *ry, mp_int *rz, const ECGroup *group);
-
-/* Converts a point P(px, py, pz) from Jacobian projective coordinates to
- * affine coordinates R(rx, ry). */
-mp_err ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py,
-                                                 const mp_int *pz, mp_int *rx, mp_int *ry,
-                                                 const ECGroup *group);
-
-/* Checks if point P(px, py, pz) is at infinity.  Uses Jacobian
- * coordinates. */
-mp_err ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py,
-                                                        const mp_int *pz);
-
-/* Sets P(px, py, pz) to be the point at infinity.  Uses Jacobian
- * coordinates. */
-mp_err ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz);
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, qz).  Uses Jacobian coordinates. */
-mp_err ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py,
-                                                         const mp_int *pz, const mp_int *qx,
-                                                         const mp_int *qy, mp_int *rx, mp_int *ry,
-                                                         mp_int *rz, const ECGroup *group);
-
-/* Computes R = 2P.  Uses Jacobian coordinates. */
-mp_err ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py,
-                                                 const mp_int *pz, mp_int *rx, mp_int *ry,
-                                                 mp_int *rz, const ECGroup *group);
-
-#ifdef ECL_ENABLE_GFP_PT_MUL_JAC
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GFp.  Uses Jacobian coordinates. */
-mp_err ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px,
-                                                 const mp_int *py, mp_int *rx, mp_int *ry,
-                                                 const ECGroup *group);
-#endif
-
-/* Computes R(x, y) = k1 * G + k2 * P(x, y), where G is the generator
- * (base point) of the group of points on the elliptic curve. Allows k1 =
- * NULL or { k2, P } = NULL.  Implemented using mixed Jacobian-affine
- * coordinates. Input and output values are assumed to be NOT
- * field-encoded and are in affine form. */
-mp_err
- ec_GFp_pts_mul_jac(const mp_int *k1, const mp_int *k2, const mp_int *px,
-                                        const mp_int *py, mp_int *rx, mp_int *ry,
-                                        const ECGroup *group);
-
-/* Computes R = nP where R is (rx, ry) and P is the base point. Elliptic
- * curve points P and R can be identical. Uses mixed Modified-Jacobian
- * co-ordinates for doubling and Chudnovsky Jacobian coordinates for
- * additions. Assumes input is already field-encoded using field_enc, and
- * returns output that is still field-encoded. Uses 5-bit window NAF
- * method (algorithm 11) for scalar-point multiplication from Brown,
- * Hankerson, Lopez, Menezes. Software Implementation of the NIST Elliptic
- * Curves Over Prime Fields. */
-mp_err
- ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py,
-                                           mp_int *rx, mp_int *ry, const ECGroup *group);
-
-#endif /* _ECP_H */
--- a/jdk/src/share/native/sun/security/ec/ecp_192.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,538 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define ECP192_DIGITS ECL_CURVE_DIGITS(192)
-
-/* Fast modular reduction for p192 = 2^192 - 2^64 - 1.  a can be r. Uses
- * algorithm 7 from Brown, Hankerson, Lopez, Menezes. Software
- * Implementation of the NIST Elliptic Curves over Prime Fields. */
-mp_err
-ec_GFp_nistp192_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_size a_used = MP_USED(a);
-        mp_digit r3;
-#ifndef MPI_AMD64_ADD
-        mp_digit carry;
-#endif
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0;
-        mp_digit r0a, r0b, r1a, r1b, r2a, r2b;
-#else
-        mp_digit a5 = 0, a4 = 0, a3 = 0;
-        mp_digit r0, r1, r2;
-#endif
-
-        /* reduction not needed if a is not larger than field size */
-        if (a_used < ECP192_DIGITS) {
-                if (a == r) {
-                        return MP_OKAY;
-                }
-                return mp_copy(a, r);
-        }
-
-        /* for polynomials larger than twice the field size, use regular
-         * reduction */
-        if (a_used > ECP192_DIGITS*2) {
-                MP_CHECKOK(mp_mod(a, &meth->irr, r));
-        } else {
-                /* copy out upper words of a */
-
-#ifdef ECL_THIRTY_TWO_BIT
-
-                /* in all the math below,
-                 * nXb is most signifiant, nXa is least significant */
-                switch (a_used) {
-                case 12:
-                        a5b = MP_DIGIT(a, 11);
-                case 11:
-                        a5a = MP_DIGIT(a, 10);
-                case 10:
-                        a4b = MP_DIGIT(a, 9);
-                case 9:
-                        a4a = MP_DIGIT(a, 8);
-                case 8:
-                        a3b = MP_DIGIT(a, 7);
-                case 7:
-                        a3a = MP_DIGIT(a, 6);
-                }
-
-
-                r2b= MP_DIGIT(a, 5);
-                r2a= MP_DIGIT(a, 4);
-                r1b = MP_DIGIT(a, 3);
-                r1a = MP_DIGIT(a, 2);
-                r0b = MP_DIGIT(a, 1);
-                r0a = MP_DIGIT(a, 0);
-
-                /* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */
-                MP_ADD_CARRY(r0a, a3a, r0a, 0,    carry);
-                MP_ADD_CARRY(r0b, a3b, r0b, carry, carry);
-                MP_ADD_CARRY(r1a, a3a, r1a, carry, carry);
-                MP_ADD_CARRY(r1b, a3b, r1b, carry, carry);
-                MP_ADD_CARRY(r2a, a4a, r2a, carry, carry);
-                MP_ADD_CARRY(r2b, a4b, r2b, carry, carry);
-                r3 = carry; carry = 0;
-                MP_ADD_CARRY(r0a, a5a, r0a, 0,     carry);
-                MP_ADD_CARRY(r0b, a5b, r0b, carry, carry);
-                MP_ADD_CARRY(r1a, a5a, r1a, carry, carry);
-                MP_ADD_CARRY(r1b, a5b, r1b, carry, carry);
-                MP_ADD_CARRY(r2a, a5a, r2a, carry, carry);
-                MP_ADD_CARRY(r2b, a5b, r2b, carry, carry);
-                r3 += carry;
-                MP_ADD_CARRY(r1a, a4a, r1a, 0,     carry);
-                MP_ADD_CARRY(r1b, a4b, r1b, carry, carry);
-                MP_ADD_CARRY(r2a,   0, r2a, carry, carry);
-                MP_ADD_CARRY(r2b,   0, r2b, carry, carry);
-                r3 += carry;
-
-                /* reduce out the carry */
-                while (r3) {
-                        MP_ADD_CARRY(r0a, r3, r0a, 0,     carry);
-                        MP_ADD_CARRY(r0b,  0, r0b, carry, carry);
-                        MP_ADD_CARRY(r1a, r3, r1a, carry, carry);
-                        MP_ADD_CARRY(r1b,  0, r1b, carry, carry);
-                        MP_ADD_CARRY(r2a,  0, r2a, carry, carry);
-                        MP_ADD_CARRY(r2b,  0, r2b, carry, carry);
-                        r3 = carry;
-                }
-
-                /* check for final reduction */
-                /*
-                 * our field is 0xffffffffffffffff, 0xfffffffffffffffe,
-                 * 0xffffffffffffffff. That means we can only be over and need
-                 * one more reduction
-                 *  if r2 == 0xffffffffffffffffff (same as r2+1 == 0)
-                 *     and
-                 *     r1 == 0xffffffffffffffffff   or
-                 *     r1 == 0xfffffffffffffffffe and r0 = 0xfffffffffffffffff
-                 * In all cases, we subtract the field (or add the 2's
-                 * complement value (1,1,0)).  (r0, r1, r2)
-                 */
-                if (((r2b == 0xffffffff) && (r2a == 0xffffffff)
-                        && (r1b == 0xffffffff) ) &&
-                           ((r1a == 0xffffffff) ||
-                            (r1a == 0xfffffffe) && (r0a == 0xffffffff) &&
-                                        (r0b == 0xffffffff)) ) {
-                        /* do a quick subtract */
-                        MP_ADD_CARRY(r0a, 1, r0a, 0, carry);
-                        r0b += carry;
-                        r1a = r1b = r2a = r2b = 0;
-                }
-
-                /* set the lower words of r */
-                if (a != r) {
-                        MP_CHECKOK(s_mp_pad(r, 6));
-                }
-                MP_DIGIT(r, 5) = r2b;
-                MP_DIGIT(r, 4) = r2a;
-                MP_DIGIT(r, 3) = r1b;
-                MP_DIGIT(r, 2) = r1a;
-                MP_DIGIT(r, 1) = r0b;
-                MP_DIGIT(r, 0) = r0a;
-                MP_USED(r) = 6;
-#else
-                switch (a_used) {
-                case 6:
-                        a5 = MP_DIGIT(a, 5);
-                case 5:
-                        a4 = MP_DIGIT(a, 4);
-                case 4:
-                        a3 = MP_DIGIT(a, 3);
-                }
-
-                r2 = MP_DIGIT(a, 2);
-                r1 = MP_DIGIT(a, 1);
-                r0 = MP_DIGIT(a, 0);
-
-                /* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */
-#ifndef MPI_AMD64_ADD
-                MP_ADD_CARRY(r0, a3, r0, 0,     carry);
-                MP_ADD_CARRY(r1, a3, r1, carry, carry);
-                MP_ADD_CARRY(r2, a4, r2, carry, carry);
-                r3 = carry;
-                MP_ADD_CARRY(r0, a5, r0, 0,     carry);
-                MP_ADD_CARRY(r1, a5, r1, carry, carry);
-                MP_ADD_CARRY(r2, a5, r2, carry, carry);
-                r3 += carry;
-                MP_ADD_CARRY(r1, a4, r1, 0,     carry);
-                MP_ADD_CARRY(r2,  0, r2, carry, carry);
-                r3 += carry;
-
-#else
-                r2 = MP_DIGIT(a, 2);
-                r1 = MP_DIGIT(a, 1);
-                r0 = MP_DIGIT(a, 0);
-
-                /* set the lower words of r */
-                __asm__ (
-                "xorq   %3,%3           \n\t"
-                "addq   %4,%0           \n\t"
-                "adcq   %4,%1           \n\t"
-                "adcq   %5,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                "addq   %6,%0           \n\t"
-                "adcq   %6,%1           \n\t"
-                "adcq   %6,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                "addq   %5,%1           \n\t"
-                "adcq   $0,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(a3),
-                  "=r"(a4), "=r"(a5)
-                : "0" (r0), "1" (r1), "2" (r2), "3" (r3),
-                  "4" (a3), "5" (a4), "6"(a5)
-                : "%cc" );
-#endif
-
-                /* reduce out the carry */
-                while (r3) {
-#ifndef MPI_AMD64_ADD
-                        MP_ADD_CARRY(r0, r3, r0, 0,     carry);
-                        MP_ADD_CARRY(r1, r3, r1, carry, carry);
-                        MP_ADD_CARRY(r2,  0, r2, carry, carry);
-                        r3 = carry;
-#else
-                        a3=r3;
-                        __asm__ (
-                        "xorq   %3,%3           \n\t"
-                        "addq   %4,%0           \n\t"
-                        "adcq   %4,%1           \n\t"
-                        "adcq   $0,%2           \n\t"
-                        "adcq   $0,%3           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(a3)
-                        : "0" (r0), "1" (r1), "2" (r2), "3" (r3), "4"(a3)
-                        : "%cc" );
-#endif
-                }
-
-                /* check for final reduction */
-                /*
-                 * our field is 0xffffffffffffffff, 0xfffffffffffffffe,
-                 * 0xffffffffffffffff. That means we can only be over and need
-                 * one more reduction
-                 *  if r2 == 0xffffffffffffffffff (same as r2+1 == 0)
-                 *     and
-                 *     r1 == 0xffffffffffffffffff   or
-                 *     r1 == 0xfffffffffffffffffe and r0 = 0xfffffffffffffffff
-                 * In all cases, we subtract the field (or add the 2's
-                 * complement value (1,1,0)).  (r0, r1, r2)
-                 */
-                if (r3 || ((r2 == MP_DIGIT_MAX) &&
-                      ((r1 == MP_DIGIT_MAX) ||
-                        ((r1 == (MP_DIGIT_MAX-1)) && (r0 == MP_DIGIT_MAX))))) {
-                        /* do a quick subtract */
-                        r0++;
-                        r1 = r2 = 0;
-                }
-                /* set the lower words of r */
-                if (a != r) {
-                        MP_CHECKOK(s_mp_pad(r, 3));
-                }
-                MP_DIGIT(r, 2) = r2;
-                MP_DIGIT(r, 1) = r1;
-                MP_DIGIT(r, 0) = r0;
-                MP_USED(r) = 3;
-#endif
-        }
-
-  CLEANUP:
-        return res;
-}
-
-#ifndef ECL_THIRTY_TWO_BIT
-/* Compute the sum of 192 bit curves. Do the work in-line since the
- * number of words are so small, we don't want to overhead of mp function
- * calls.  Uses optimized modular reduction for p192.
- */
-mp_err
-ec_GFp_nistp192_add(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit a0 = 0, a1 = 0, a2 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0;
-        mp_digit carry;
-
-        switch(MP_USED(a)) {
-        case 3:
-                a2 = MP_DIGIT(a,2);
-        case 2:
-                a1 = MP_DIGIT(a,1);
-        case 1:
-                a0 = MP_DIGIT(a,0);
-        }
-        switch(MP_USED(b)) {
-        case 3:
-                r2 = MP_DIGIT(b,2);
-        case 2:
-                r1 = MP_DIGIT(b,1);
-        case 1:
-                r0 = MP_DIGIT(b,0);
-        }
-
-#ifndef MPI_AMD64_ADD
-        MP_ADD_CARRY(a0, r0, r0, 0,     carry);
-        MP_ADD_CARRY(a1, r1, r1, carry, carry);
-        MP_ADD_CARRY(a2, r2, r2, carry, carry);
-#else
-        __asm__ (
-                "xorq   %3,%3           \n\t"
-                "addq   %4,%0           \n\t"
-                "adcq   %5,%1           \n\t"
-                "adcq   %6,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(carry)
-                : "r" (a0), "r" (a1), "r" (a2), "0" (r0),
-                  "1" (r1), "2" (r2)
-                : "%cc" );
-#endif
-
-        /* Do quick 'subract' if we've gone over
-         * (add the 2's complement of the curve field) */
-        if (carry || ((r2 == MP_DIGIT_MAX) &&
-                      ((r1 == MP_DIGIT_MAX) ||
-                        ((r1 == (MP_DIGIT_MAX-1)) && (r0 == MP_DIGIT_MAX))))) {
-#ifndef MPI_AMD64_ADD
-                MP_ADD_CARRY(r0, 1, r0, 0,     carry);
-                MP_ADD_CARRY(r1, 1, r1, carry, carry);
-                MP_ADD_CARRY(r2, 0, r2, carry, carry);
-#else
-                __asm__ (
-                        "addq   $1,%0           \n\t"
-                        "adcq   $1,%1           \n\t"
-                        "adcq   $0,%2           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2)
-                        : "0" (r0), "1" (r1), "2" (r2)
-                        : "%cc" );
-#endif
-        }
-
-
-        MP_CHECKOK(s_mp_pad(r, 3));
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 3;
-        s_mp_clamp(r);
-
-
-  CLEANUP:
-        return res;
-}
-
-/* Compute the diff of 192 bit curves. Do the work in-line since the
- * number of words are so small, we don't want to overhead of mp function
- * calls.  Uses optimized modular reduction for p192.
- */
-mp_err
-ec_GFp_nistp192_sub(const mp_int *a, const mp_int *b, mp_int *r,
-                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_digit b0 = 0, b1 = 0, b2 = 0;
-        mp_digit r0 = 0, r1 = 0, r2 = 0;
-        mp_digit borrow;
-
-        switch(MP_USED(a)) {
-        case 3:
-                r2 = MP_DIGIT(a,2);
-        case 2:
-                r1 = MP_DIGIT(a,1);
-        case 1:
-                r0 = MP_DIGIT(a,0);
-        }
-
-        switch(MP_USED(b)) {
-        case 3:
-                b2 = MP_DIGIT(b,2);
-        case 2:
-                b1 = MP_DIGIT(b,1);
-        case 1:
-                b0 = MP_DIGIT(b,0);
-        }
-
-#ifndef MPI_AMD64_ADD
-        MP_SUB_BORROW(r0, b0, r0, 0,     borrow);
-        MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
-        MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-#else
-        __asm__ (
-                "xorq   %3,%3           \n\t"
-                "subq   %4,%0           \n\t"
-                "sbbq   %5,%1           \n\t"
-                "sbbq   %6,%2           \n\t"
-                "adcq   $0,%3           \n\t"
-                : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(borrow)
-                : "r" (b0), "r" (b1), "r" (b2), "0" (r0),
-                  "1" (r1), "2" (r2)
-                : "%cc" );
-#endif
-
-        /* Do quick 'add' if we've gone under 0
-         * (subtract the 2's complement of the curve field) */
-        if (borrow) {
-#ifndef MPI_AMD64_ADD
-                MP_SUB_BORROW(r0, 1, r0, 0,     borrow);
-                MP_SUB_BORROW(r1, 1, r1, borrow, borrow);
-                MP_SUB_BORROW(r2,  0, r2, borrow, borrow);
-#else
-                __asm__ (
-                        "subq   $1,%0           \n\t"
-                        "sbbq   $1,%1           \n\t"
-                        "sbbq   $0,%2           \n\t"
-                        : "=r"(r0), "=r"(r1), "=r"(r2)
-                        : "0" (r0), "1" (r1), "2" (r2)
-                        : "%cc" );
-#endif
-        }
-
-        MP_CHECKOK(s_mp_pad(r, 3));
-        MP_DIGIT(r, 2) = r2;
-        MP_DIGIT(r, 1) = r1;
-        MP_DIGIT(r, 0) = r0;
-        MP_SIGN(r) = MP_ZPOS;
-        MP_USED(r) = 3;
-        s_mp_clamp(r);
-
-  CLEANUP:
-        return res;
-}
-
-#endif
-
-/* Compute the square of polynomial a, reduce modulo p192. Store the
- * result in r.  r could be a.  Uses optimized modular reduction for p192.
- */
-mp_err
-ec_GFp_nistp192_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_sqr(a, r));
-        MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p192.
- * Store the result in r.  r could be a or b; a could be b.  Uses
- * optimized modular reduction for p192. */
-mp_err
-ec_GFp_nistp192_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_mul(a, b, r));
-        MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_nistp192_div(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_int t;
-
-        /* If a is NULL, then return the inverse of b, otherwise return a/b. */
-        if (a == NULL) {
-                return  mp_invmod(b, &meth->irr, r);
-        } else {
-                /* MPI doesn't support divmod, so we implement it using invmod and
-                 * mulmod. */
-                MP_CHECKOK(mp_init(&t, FLAG(b)));
-                MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
-                MP_CHECKOK(mp_mul(a, &t, r));
-                MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth));
-          CLEANUP:
-                mp_clear(&t);
-                return res;
-        }
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp192(ECGroup *group, ECCurveName name)
-{
-        if (name == ECCurve_NIST_P192) {
-                group->meth->field_mod = &ec_GFp_nistp192_mod;
-                group->meth->field_mul = &ec_GFp_nistp192_mul;
-                group->meth->field_sqr = &ec_GFp_nistp192_sqr;
-                group->meth->field_div = &ec_GFp_nistp192_div;
-#ifndef ECL_THIRTY_TWO_BIT
-                group->meth->field_add = &ec_GFp_nistp192_add;
-                group->meth->field_sub = &ec_GFp_nistp192_sub;
-#endif
-        }
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_224.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,394 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define ECP224_DIGITS ECL_CURVE_DIGITS(224)
-
-/* Fast modular reduction for p224 = 2^224 - 2^96 + 1.  a can be r. Uses
- * algorithm 7 from Brown, Hankerson, Lopez, Menezes. Software
- * Implementation of the NIST Elliptic Curves over Prime Fields. */
-mp_err
-ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_size a_used = MP_USED(a);
-
-        int    r3b;
-        mp_digit carry;
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit a6a = 0, a6b = 0,
-                a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0;
-        mp_digit r0a, r0b, r1a, r1b, r2a, r2b, r3a;
-#else
-        mp_digit a6 = 0, a5 = 0, a4 = 0, a3b = 0, a5a = 0;
-        mp_digit a6b = 0, a6a_a5b = 0, a5b = 0, a5a_a4b = 0, a4a_a3b = 0;
-        mp_digit r0, r1, r2, r3;
-#endif
-
-        /* reduction not needed if a is not larger than field size */
-        if (a_used < ECP224_DIGITS) {
-                if (a == r) return MP_OKAY;
-                return mp_copy(a, r);
-        }
-        /* for polynomials larger than twice the field size, use regular
-         * reduction */
-        if (a_used > ECL_CURVE_DIGITS(224*2)) {
-                MP_CHECKOK(mp_mod(a, &meth->irr, r));
-        } else {
-#ifdef ECL_THIRTY_TWO_BIT
-                /* copy out upper words of a */
-                switch (a_used) {
-                case 14:
-                        a6b = MP_DIGIT(a, 13);
-                case 13:
-                        a6a = MP_DIGIT(a, 12);
-                case 12:
-                        a5b = MP_DIGIT(a, 11);
-                case 11:
-                        a5a = MP_DIGIT(a, 10);
-                case 10:
-                        a4b = MP_DIGIT(a, 9);
-                case 9:
-                        a4a = MP_DIGIT(a, 8);
-                case 8:
-                        a3b = MP_DIGIT(a, 7);
-                }
-                r3a = MP_DIGIT(a, 6);
-                r2b= MP_DIGIT(a, 5);
-                r2a= MP_DIGIT(a, 4);
-                r1b = MP_DIGIT(a, 3);
-                r1a = MP_DIGIT(a, 2);
-                r0b = MP_DIGIT(a, 1);
-                r0a = MP_DIGIT(a, 0);
-
-
-                /* implement r = (a3a,a2,a1,a0)
-                        +(a5a, a4,a3b,  0)
-                        +(  0, a6,a5b,  0)
-                        -(  0    0,    0|a6b, a6a|a5b )
-                        -(  a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */
-                MP_ADD_CARRY (r1b, a3b, r1b, 0,     carry);
-                MP_ADD_CARRY (r2a, a4a, r2a, carry, carry);
-                MP_ADD_CARRY (r2b, a4b, r2b, carry, carry);
-                MP_ADD_CARRY (r3a, a5a, r3a, carry, carry);
-                r3b = carry;
-                MP_ADD_CARRY (r1b, a5b, r1b, 0,     carry);
-                MP_ADD_CARRY (r2a, a6a, r2a, carry, carry);
-                MP_ADD_CARRY (r2b, a6b, r2b, carry, carry);
-                MP_ADD_CARRY (r3a,   0, r3a, carry, carry);
-                r3b += carry;
-                MP_SUB_BORROW(r0a, a3b, r0a, 0,     carry);
-                MP_SUB_BORROW(r0b, a4a, r0b, carry, carry);
-                MP_SUB_BORROW(r1a, a4b, r1a, carry, carry);
-                MP_SUB_BORROW(r1b, a5a, r1b, carry, carry);
-                MP_SUB_BORROW(r2a, a5b, r2a, carry, carry);
-                MP_SUB_BORROW(r2b, a6a, r2b, carry, carry);
-                MP_SUB_BORROW(r3a, a6b, r3a, carry, carry);
-                r3b -= carry;
-                MP_SUB_BORROW(r0a, a5b, r0a, 0,     carry);
-                MP_SUB_BORROW(r0b, a6a, r0b, carry, carry);
-                MP_SUB_BORROW(r1a, a6b, r1a, carry, carry);
-                if (carry) {
-                        MP_SUB_BORROW(r1b, 0, r1b, carry, carry);
-                        MP_SUB_BORROW(r2a, 0, r2a, carry, carry);
-                        MP_SUB_BORROW(r2b, 0, r2b, carry, carry);
-                        MP_SUB_BORROW(r3a, 0, r3a, carry, carry);
-                        r3b -= carry;
-                }
-
-                while (r3b > 0) {
-                        int tmp;
-                        MP_ADD_CARRY(r1b, r3b, r1b, 0,     carry);
-                        if (carry) {
-                                MP_ADD_CARRY(r2a,  0, r2a, carry, carry);
-                                MP_ADD_CARRY(r2b,  0, r2b, carry, carry);
-                                MP_ADD_CARRY(r3a,  0, r3a, carry, carry);
-                        }
-                        tmp = carry;
-                        MP_SUB_BORROW(r0a, r3b, r0a, 0,     carry);
-                        if (carry) {
-                                MP_SUB_BORROW(r0b, 0, r0b, carry, carry);
-                                MP_SUB_BORROW(r1a, 0, r1a, carry, carry);
-                                MP_SUB_BORROW(r1b, 0, r1b, carry, carry);
-                                MP_SUB_BORROW(r2a, 0, r2a, carry, carry);
-                                MP_SUB_BORROW(r2b, 0, r2b, carry, carry);
-                                MP_SUB_BORROW(r3a, 0, r3a, carry, carry);
-                                tmp -= carry;
-                        }
-                        r3b = tmp;
-                }
-
-                while (r3b < 0) {
-                        mp_digit maxInt = MP_DIGIT_MAX;
-                        MP_ADD_CARRY (r0a, 1, r0a, 0,     carry);
-                        MP_ADD_CARRY (r0b, 0, r0b, carry, carry);
-                        MP_ADD_CARRY (r1a, 0, r1a, carry, carry);
-                        MP_ADD_CARRY (r1b, maxInt, r1b, carry, carry);
-                        MP_ADD_CARRY (r2a, maxInt, r2a, carry, carry);
-                        MP_ADD_CARRY (r2b, maxInt, r2b, carry, carry);
-                        MP_ADD_CARRY (r3a, maxInt, r3a, carry, carry);
-                        r3b += carry;
-                }
-                /* check for final reduction */
-                /* now the only way we are over is if the top 4 words are all ones */
-                if ((r3a == MP_DIGIT_MAX) && (r2b == MP_DIGIT_MAX)
-                        && (r2a == MP_DIGIT_MAX) && (r1b == MP_DIGIT_MAX) &&
-                         ((r1a != 0) || (r0b != 0) || (r0a != 0)) ) {
-                        /* one last subraction */
-                        MP_SUB_BORROW(r0a, 1, r0a, 0,     carry);
-                        MP_SUB_BORROW(r0b, 0, r0b, carry, carry);
-                        MP_SUB_BORROW(r1a, 0, r1a, carry, carry);
-                        r1b = r2a = r2b = r3a = 0;
-                }
-
-
-                if (a != r) {
-                        MP_CHECKOK(s_mp_pad(r, 7));
-                }
-                /* set the lower words of r */
-                MP_SIGN(r) = MP_ZPOS;
-                MP_USED(r) = 7;
-                MP_DIGIT(r, 6) = r3a;
-                MP_DIGIT(r, 5) = r2b;
-                MP_DIGIT(r, 4) = r2a;
-                MP_DIGIT(r, 3) = r1b;
-                MP_DIGIT(r, 2) = r1a;
-                MP_DIGIT(r, 1) = r0b;
-                MP_DIGIT(r, 0) = r0a;
-#else
-                /* copy out upper words of a */
-                switch (a_used) {
-                case 7:
-                        a6 = MP_DIGIT(a, 6);
-                        a6b = a6 >> 32;
-                        a6a_a5b = a6 << 32;
-                case 6:
-                        a5 = MP_DIGIT(a, 5);
-                        a5b = a5 >> 32;
-                        a6a_a5b |= a5b;
-                        a5b = a5b << 32;
-                        a5a_a4b = a5 << 32;
-                        a5a = a5 & 0xffffffff;
-                case 5:
-                        a4 = MP_DIGIT(a, 4);
-                        a5a_a4b |= a4 >> 32;
-                        a4a_a3b = a4 << 32;
-                case 4:
-                        a3b = MP_DIGIT(a, 3) >> 32;
-                        a4a_a3b |= a3b;
-                        a3b = a3b << 32;
-                }
-
-                r3 = MP_DIGIT(a, 3) & 0xffffffff;
-                r2 = MP_DIGIT(a, 2);
-                r1 = MP_DIGIT(a, 1);
-                r0 = MP_DIGIT(a, 0);
-
-                /* implement r = (a3a,a2,a1,a0)
-                        +(a5a, a4,a3b,  0)
-                        +(  0, a6,a5b,  0)
-                        -(  0    0,    0|a6b, a6a|a5b )
-                        -(  a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */
-                MP_ADD_CARRY (r1, a3b, r1, 0,     carry);
-                MP_ADD_CARRY (r2, a4 , r2, carry, carry);
-                MP_ADD_CARRY (r3, a5a, r3, carry, carry);
-                MP_ADD_CARRY (r1, a5b, r1, 0,     carry);
-                MP_ADD_CARRY (r2, a6 , r2, carry, carry);
-                MP_ADD_CARRY (r3,   0, r3, carry, carry);
-
-                MP_SUB_BORROW(r0, a4a_a3b, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a5a_a4b, r1, carry, carry);
-                MP_SUB_BORROW(r2, a6a_a5b, r2, carry, carry);
-                MP_SUB_BORROW(r3, a6b    , r3, carry, carry);
-                MP_SUB_BORROW(r0, a6a_a5b, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a6b    , r1, carry, carry);
-                if (carry) {
-                        MP_SUB_BORROW(r2, 0, r2, carry, carry);
-                        MP_SUB_BORROW(r3, 0, r3, carry, carry);
-                }
-
-
-                /* if the value is negative, r3 has a 2's complement
-                 * high value */
-                r3b = (int)(r3 >>32);
-                while (r3b > 0) {
-                        r3 &= 0xffffffff;
-                        MP_ADD_CARRY(r1,((mp_digit)r3b) << 32, r1, 0, carry);
-                        if (carry) {
-                                MP_ADD_CARRY(r2,  0, r2, carry, carry);
-                                MP_ADD_CARRY(r3,  0, r3, carry, carry);
-                        }
-                        MP_SUB_BORROW(r0, r3b, r0, 0, carry);
-                        if (carry) {
-                                MP_SUB_BORROW(r1, 0, r1, carry, carry);
-                                MP_SUB_BORROW(r2, 0, r2, carry, carry);
-                                MP_SUB_BORROW(r3, 0, r3, carry, carry);
-                        }
-                        r3b = (int)(r3 >>32);
-                }
-
-                while (r3b < 0) {
-                        MP_ADD_CARRY (r0, 1, r0, 0,     carry);
-                        MP_ADD_CARRY (r1, MP_DIGIT_MAX <<32, r1, carry, carry);
-                        MP_ADD_CARRY (r2, MP_DIGIT_MAX, r2, carry, carry);
-                        MP_ADD_CARRY (r3, MP_DIGIT_MAX >> 32, r3, carry, carry);
-                        r3b = (int)(r3 >>32);
-                }
-                /* check for final reduction */
-                /* now the only way we are over is if the top 4 words are all ones */
-                if ((r3 == (MP_DIGIT_MAX >> 32)) && (r2 == MP_DIGIT_MAX)
-                        && ((r1 & MP_DIGIT_MAX << 32)== MP_DIGIT_MAX << 32) &&
-                         ((r1 != MP_DIGIT_MAX << 32 ) || (r0 != 0)) ) {
-                        /* one last subraction */
-                        MP_SUB_BORROW(r0, 1, r0, 0,     carry);
-                        MP_SUB_BORROW(r1, 0, r1, carry, carry);
-                        r2 = r3 = 0;
-                }
-
-
-                if (a != r) {
-                        MP_CHECKOK(s_mp_pad(r, 4));
-                }
-                /* set the lower words of r */
-                MP_SIGN(r) = MP_ZPOS;
-                MP_USED(r) = 4;
-                MP_DIGIT(r, 3) = r3;
-                MP_DIGIT(r, 2) = r2;
-                MP_DIGIT(r, 1) = r1;
-                MP_DIGIT(r, 0) = r0;
-#endif
-        }
-
-  CLEANUP:
-        return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p224. Store the
- * result in r.  r could be a.  Uses optimized modular reduction for p224.
- */
-mp_err
-ec_GFp_nistp224_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_sqr(a, r));
-        MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p224.
- * Store the result in r.  r could be a or b; a could be b.  Uses
- * optimized modular reduction for p224. */
-mp_err
-ec_GFp_nistp224_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_mul(a, b, r));
-        MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_nistp224_div(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_int t;
-
-        /* If a is NULL, then return the inverse of b, otherwise return a/b. */
-        if (a == NULL) {
-                return  mp_invmod(b, &meth->irr, r);
-        } else {
-                /* MPI doesn't support divmod, so we implement it using invmod and
-                 * mulmod. */
-                MP_CHECKOK(mp_init(&t, FLAG(b)));
-                MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
-                MP_CHECKOK(mp_mul(a, &t, r));
-                MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth));
-          CLEANUP:
-                mp_clear(&t);
-                return res;
-        }
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp224(ECGroup *group, ECCurveName name)
-{
-        if (name == ECCurve_NIST_P224) {
-                group->meth->field_mod = &ec_GFp_nistp224_mod;
-                group->meth->field_mul = &ec_GFp_nistp224_mul;
-                group->meth->field_sqr = &ec_GFp_nistp224_sqr;
-                group->meth->field_div = &ec_GFp_nistp224_div;
-        }
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_256.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,451 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast modular reduction for p256 = 2^256 - 2^224 + 2^192+ 2^96 - 1.  a can be r.
- * Uses algorithm 2.29 from Hankerson, Menezes, Vanstone. Guide to
- * Elliptic Curve Cryptography. */
-mp_err
-ec_GFp_nistp256_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_size a_used = MP_USED(a);
-        int a_bits = mpl_significant_bits(a);
-        mp_digit carry;
-
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit a8=0, a9=0, a10=0, a11=0, a12=0, a13=0, a14=0, a15=0;
-        mp_digit r0, r1, r2, r3, r4, r5, r6, r7;
-        int r8; /* must be a signed value ! */
-#else
-        mp_digit a4=0, a5=0, a6=0, a7=0;
-        mp_digit a4h, a4l, a5h, a5l, a6h, a6l, a7h, a7l;
-        mp_digit r0, r1, r2, r3;
-        int r4; /* must be a signed value ! */
-#endif
-        /* for polynomials larger than twice the field size
-         * use regular reduction */
-        if (a_bits < 256) {
-                if (a == r) return MP_OKAY;
-                return mp_copy(a,r);
-        }
-        if (a_bits > 512)  {
-                MP_CHECKOK(mp_mod(a, &meth->irr, r));
-        } else {
-
-#ifdef ECL_THIRTY_TWO_BIT
-                switch (a_used) {
-                case 16:
-                        a15 = MP_DIGIT(a,15);
-                case 15:
-                        a14 = MP_DIGIT(a,14);
-                case 14:
-                        a13 = MP_DIGIT(a,13);
-                case 13:
-                        a12 = MP_DIGIT(a,12);
-                case 12:
-                        a11 = MP_DIGIT(a,11);
-                case 11:
-                        a10 = MP_DIGIT(a,10);
-                case 10:
-                        a9 = MP_DIGIT(a,9);
-                case 9:
-                        a8 = MP_DIGIT(a,8);
-                }
-
-                r0 = MP_DIGIT(a,0);
-                r1 = MP_DIGIT(a,1);
-                r2 = MP_DIGIT(a,2);
-                r3 = MP_DIGIT(a,3);
-                r4 = MP_DIGIT(a,4);
-                r5 = MP_DIGIT(a,5);
-                r6 = MP_DIGIT(a,6);
-                r7 = MP_DIGIT(a,7);
-
-                /* sum 1 */
-                MP_ADD_CARRY(r3, a11, r3, 0,     carry);
-                MP_ADD_CARRY(r4, a12, r4, carry, carry);
-                MP_ADD_CARRY(r5, a13, r5, carry, carry);
-                MP_ADD_CARRY(r6, a14, r6, carry, carry);
-                MP_ADD_CARRY(r7, a15, r7, carry, carry);
-                r8 = carry;
-                MP_ADD_CARRY(r3, a11, r3, 0,     carry);
-                MP_ADD_CARRY(r4, a12, r4, carry, carry);
-                MP_ADD_CARRY(r5, a13, r5, carry, carry);
-                MP_ADD_CARRY(r6, a14, r6, carry, carry);
-                MP_ADD_CARRY(r7, a15, r7, carry, carry);
-                r8 += carry;
-                /* sum 2 */
-                MP_ADD_CARRY(r3, a12, r3, 0,     carry);
-                MP_ADD_CARRY(r4, a13, r4, carry, carry);
-                MP_ADD_CARRY(r5, a14, r5, carry, carry);
-                MP_ADD_CARRY(r6, a15, r6, carry, carry);
-                MP_ADD_CARRY(r7,   0, r7, carry, carry);
-                r8 += carry;
-                /* combine last bottom of sum 3 with second sum 2 */
-                MP_ADD_CARRY(r0, a8,  r0, 0,     carry);
-                MP_ADD_CARRY(r1, a9,  r1, carry, carry);
-                MP_ADD_CARRY(r2, a10, r2, carry, carry);
-                MP_ADD_CARRY(r3, a12, r3, carry, carry);
-                MP_ADD_CARRY(r4, a13, r4, carry, carry);
-                MP_ADD_CARRY(r5, a14, r5, carry, carry);
-                MP_ADD_CARRY(r6, a15, r6, carry, carry);
-                MP_ADD_CARRY(r7, a15, r7, carry, carry); /* from sum 3 */
-                r8 += carry;
-                /* sum 3 (rest of it)*/
-                MP_ADD_CARRY(r6, a14, r6, 0,     carry);
-                MP_ADD_CARRY(r7,   0, r7, carry, carry);
-                r8 += carry;
-                /* sum 4 (rest of it)*/
-                MP_ADD_CARRY(r0, a9,  r0, 0,     carry);
-                MP_ADD_CARRY(r1, a10, r1, carry, carry);
-                MP_ADD_CARRY(r2, a11, r2, carry, carry);
-                MP_ADD_CARRY(r3, a13, r3, carry, carry);
-                MP_ADD_CARRY(r4, a14, r4, carry, carry);
-                MP_ADD_CARRY(r5, a15, r5, carry, carry);
-                MP_ADD_CARRY(r6, a13, r6, carry, carry);
-                MP_ADD_CARRY(r7, a8,  r7, carry, carry);
-                r8 += carry;
-                /* diff 5 */
-                MP_SUB_BORROW(r0, a11, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a12, r1, carry, carry);
-                MP_SUB_BORROW(r2, a13, r2, carry, carry);
-                MP_SUB_BORROW(r3,   0, r3, carry, carry);
-                MP_SUB_BORROW(r4,   0, r4, carry, carry);
-                MP_SUB_BORROW(r5,   0, r5, carry, carry);
-                MP_SUB_BORROW(r6, a8,  r6, carry, carry);
-                MP_SUB_BORROW(r7, a10, r7, carry, carry);
-                r8 -= carry;
-                /* diff 6 */
-                MP_SUB_BORROW(r0, a12, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a13, r1, carry, carry);
-                MP_SUB_BORROW(r2, a14, r2, carry, carry);
-                MP_SUB_BORROW(r3, a15, r3, carry, carry);
-                MP_SUB_BORROW(r4,   0, r4, carry, carry);
-                MP_SUB_BORROW(r5,   0, r5, carry, carry);
-                MP_SUB_BORROW(r6, a9,  r6, carry, carry);
-                MP_SUB_BORROW(r7, a11, r7, carry, carry);
-                r8 -= carry;
-                /* diff 7 */
-                MP_SUB_BORROW(r0, a13, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a14, r1, carry, carry);
-                MP_SUB_BORROW(r2, a15, r2, carry, carry);
-                MP_SUB_BORROW(r3, a8,  r3, carry, carry);
-                MP_SUB_BORROW(r4, a9,  r4, carry, carry);
-                MP_SUB_BORROW(r5, a10, r5, carry, carry);
-                MP_SUB_BORROW(r6, 0,   r6, carry, carry);
-                MP_SUB_BORROW(r7, a12, r7, carry, carry);
-                r8 -= carry;
-                /* diff 8 */
-                MP_SUB_BORROW(r0, a14, r0, 0,     carry);
-                MP_SUB_BORROW(r1, a15, r1, carry, carry);
-                MP_SUB_BORROW(r2, 0,   r2, carry, carry);
-                MP_SUB_BORROW(r3, a9,  r3, carry, carry);
-                MP_SUB_BORROW(r4, a10, r4, carry, carry);
-                MP_SUB_BORROW(r5, a11, r5, carry, carry);
-                MP_SUB_BORROW(r6, 0,   r6, carry, carry);
-                MP_SUB_BORROW(r7, a13, r7, carry, carry);
-                r8 -= carry;
-
-                /* reduce the overflows */
-                while (r8 > 0) {
-                        mp_digit r8_d = r8;
-                        MP_ADD_CARRY(r0, r8_d,         r0, 0,     carry);
-                        MP_ADD_CARRY(r1, 0,            r1, carry, carry);
-                        MP_ADD_CARRY(r2, 0,            r2, carry, carry);
-                        MP_ADD_CARRY(r3, -r8_d,        r3, carry, carry);
-                        MP_ADD_CARRY(r4, MP_DIGIT_MAX, r4, carry, carry);
-                        MP_ADD_CARRY(r5, MP_DIGIT_MAX, r5, carry, carry);
-                        MP_ADD_CARRY(r6, -(r8_d+1),    r6, carry, carry);
-                        MP_ADD_CARRY(r7, (r8_d-1),     r7, carry, carry);
-                        r8 = carry;
-                }
-
-                /* reduce the underflows */
-                while (r8 < 0) {
-                        mp_digit r8_d = -r8;
-                        MP_SUB_BORROW(r0, r8_d,         r0, 0,     carry);
-                        MP_SUB_BORROW(r1, 0,            r1, carry, carry);
-                        MP_SUB_BORROW(r2, 0,            r2, carry, carry);
-                        MP_SUB_BORROW(r3, -r8_d,        r3, carry, carry);
-                        MP_SUB_BORROW(r4, MP_DIGIT_MAX, r4, carry, carry);
-                        MP_SUB_BORROW(r5, MP_DIGIT_MAX, r5, carry, carry);
-                        MP_SUB_BORROW(r6, -(r8_d+1),    r6, carry, carry);
-                        MP_SUB_BORROW(r7, (r8_d-1),     r7, carry, carry);
-                        r8 = -carry;
-                }
-                if (a != r) {
-                        MP_CHECKOK(s_mp_pad(r,8));
-                }
-                MP_SIGN(r) = MP_ZPOS;
-                MP_USED(r) = 8;
-
-                MP_DIGIT(r,7) = r7;
-                MP_DIGIT(r,6) = r6;
-                MP_DIGIT(r,5) = r5;
-                MP_DIGIT(r,4) = r4;
-                MP_DIGIT(r,3) = r3;
-                MP_DIGIT(r,2) = r2;
-                MP_DIGIT(r,1) = r1;
-                MP_DIGIT(r,0) = r0;
-
-                /* final reduction if necessary */
-                if ((r7 == MP_DIGIT_MAX) &&
-                        ((r6 > 1) || ((r6 == 1) &&
-                        (r5 || r4 || r3 ||
-                                ((r2 == MP_DIGIT_MAX) && (r1 == MP_DIGIT_MAX)
-                                  && (r0 == MP_DIGIT_MAX)))))) {
-                        MP_CHECKOK(mp_sub(r, &meth->irr, r));
-                }
-#ifdef notdef
-
-
-                /* smooth the negatives */
-                while (MP_SIGN(r) != MP_ZPOS) {
-                        MP_CHECKOK(mp_add(r, &meth->irr, r));
-                }
-                while (MP_USED(r) > 8) {
-                        MP_CHECKOK(mp_sub(r, &meth->irr, r));
-                }
-
-                /* final reduction if necessary */
-                if (MP_DIGIT(r,7) >= MP_DIGIT(&meth->irr,7)) {
-                    if (mp_cmp(r,&meth->irr) != MP_LT) {
-                        MP_CHECKOK(mp_sub(r, &meth->irr, r));
-                    }
-                }
-#endif
-                s_mp_clamp(r);
-#else
-                switch (a_used) {
-                case 8:
-                        a7 = MP_DIGIT(a,7);
-                case 7:
-                        a6 = MP_DIGIT(a,6);
-                case 6:
-                        a5 = MP_DIGIT(a,5);
-                case 5:
-                        a4 = MP_DIGIT(a,4);
-                }
-                a7l = a7 << 32;
-                a7h = a7 >> 32;
-                a6l = a6 << 32;
-                a6h = a6 >> 32;
-                a5l = a5 << 32;
-                a5h = a5 >> 32;
-                a4l = a4 << 32;
-                a4h = a4 >> 32;
-                r3 = MP_DIGIT(a,3);
-                r2 = MP_DIGIT(a,2);
-                r1 = MP_DIGIT(a,1);
-                r0 = MP_DIGIT(a,0);
-
-                /* sum 1 */
-                MP_ADD_CARRY(r1, a5h << 32, r1, 0,     carry);
-                MP_ADD_CARRY(r2, a6,        r2, carry, carry);
-                MP_ADD_CARRY(r3, a7,        r3, carry, carry);
-                r4 = carry;
-                MP_ADD_CARRY(r1, a5h << 32, r1, 0,     carry);
-                MP_ADD_CARRY(r2, a6,        r2, carry, carry);
-                MP_ADD_CARRY(r3, a7,        r3, carry, carry);
-                r4 += carry;
-                /* sum 2 */
-                MP_ADD_CARRY(r1, a6l,       r1, 0,     carry);
-                MP_ADD_CARRY(r2, a6h | a7l, r2, carry, carry);
-                MP_ADD_CARRY(r3, a7h,       r3, carry, carry);
-                r4 += carry;
-                MP_ADD_CARRY(r1, a6l,       r1, 0,     carry);
-                MP_ADD_CARRY(r2, a6h | a7l, r2, carry, carry);
-                MP_ADD_CARRY(r3, a7h,       r3, carry, carry);
-                r4 += carry;
-
-                /* sum 3 */
-                MP_ADD_CARRY(r0, a4,        r0, 0,     carry);
-                MP_ADD_CARRY(r1, a5l >> 32, r1, carry, carry);
-                MP_ADD_CARRY(r2, 0,         r2, carry, carry);
-                MP_ADD_CARRY(r3, a7,        r3, carry, carry);
-                r4 += carry;
-                /* sum 4 */
-                MP_ADD_CARRY(r0, a4h | a5l,     r0, 0,     carry);
-                MP_ADD_CARRY(r1, a5h|(a6h<<32), r1, carry, carry);
-                MP_ADD_CARRY(r2, a7,            r2, carry, carry);
-                MP_ADD_CARRY(r3, a6h | a4l,     r3, carry, carry);
-                r4 += carry;
-                /* diff 5 */
-                MP_SUB_BORROW(r0, a5h | a6l,    r0, 0,     carry);
-                MP_SUB_BORROW(r1, a6h,          r1, carry, carry);
-                MP_SUB_BORROW(r2, 0,            r2, carry, carry);
-                MP_SUB_BORROW(r3, (a4l>>32)|a5l,r3, carry, carry);
-                r4 -= carry;
-                /* diff 6 */
-                MP_SUB_BORROW(r0, a6,           r0, 0,     carry);
-                MP_SUB_BORROW(r1, a7,           r1, carry, carry);
-                MP_SUB_BORROW(r2, 0,            r2, carry, carry);
-                MP_SUB_BORROW(r3, a4h|(a5h<<32),r3, carry, carry);
-                r4 -= carry;
-                /* diff 7 */
-                MP_SUB_BORROW(r0, a6h|a7l,      r0, 0,     carry);
-                MP_SUB_BORROW(r1, a7h|a4l,      r1, carry, carry);
-                MP_SUB_BORROW(r2, a4h|a5l,      r2, carry, carry);
-                MP_SUB_BORROW(r3, a6l,          r3, carry, carry);
-                r4 -= carry;
-                /* diff 8 */
-                MP_SUB_BORROW(r0, a7,           r0, 0,     carry);
-                MP_SUB_BORROW(r1, a4h<<32,      r1, carry, carry);
-                MP_SUB_BORROW(r2, a5,           r2, carry, carry);
-                MP_SUB_BORROW(r3, a6h<<32,      r3, carry, carry);
-                r4 -= carry;
-
-                /* reduce the overflows */
-                while (r4 > 0) {
-                        mp_digit r4_long = r4;
-                        mp_digit r4l = (r4_long << 32);
-                        MP_ADD_CARRY(r0, r4_long,      r0, 0,     carry);
-                        MP_ADD_CARRY(r1, -r4l,         r1, carry, carry);
-                        MP_ADD_CARRY(r2, MP_DIGIT_MAX, r2, carry, carry);
-                        MP_ADD_CARRY(r3, r4l-r4_long-1,r3, carry, carry);
-                        r4 = carry;
-                }
-
-                /* reduce the underflows */
-                while (r4 < 0) {
-                        mp_digit r4_long = -r4;
-                        mp_digit r4l = (r4_long << 32);
-                        MP_SUB_BORROW(r0, r4_long,      r0, 0,     carry);
-                        MP_SUB_BORROW(r1, -r4l,         r1, carry, carry);
-                        MP_SUB_BORROW(r2, MP_DIGIT_MAX, r2, carry, carry);
-                        MP_SUB_BORROW(r3, r4l-r4_long-1,r3, carry, carry);
-                        r4 = -carry;
-                }
-
-                if (a != r) {
-                        MP_CHECKOK(s_mp_pad(r,4));
-                }
-                MP_SIGN(r) = MP_ZPOS;
-                MP_USED(r) = 4;
-
-                MP_DIGIT(r,3) = r3;
-                MP_DIGIT(r,2) = r2;
-                MP_DIGIT(r,1) = r1;
-                MP_DIGIT(r,0) = r0;
-
-                /* final reduction if necessary */
-                if ((r3 > 0xFFFFFFFF00000001ULL) ||
-                        ((r3 == 0xFFFFFFFF00000001ULL) &&
-                        (r2 || (r1 >> 32)||
-                               (r1 == 0xFFFFFFFFULL && r0 == MP_DIGIT_MAX)))) {
-                        /* very rare, just use mp_sub */
-                        MP_CHECKOK(mp_sub(r, &meth->irr, r));
-                }
-
-                s_mp_clamp(r);
-#endif
-        }
-
-  CLEANUP:
-        return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p256. Store the
- * result in r.  r could be a.  Uses optimized modular reduction for p256.
- */
-mp_err
-ec_GFp_nistp256_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_sqr(a, r));
-        MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p256.
- * Store the result in r.  r could be a or b; a could be b.  Uses
- * optimized modular reduction for p256. */
-mp_err
-ec_GFp_nistp256_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_mul(a, b, r));
-        MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp256(ECGroup *group, ECCurveName name)
-{
-        if (name == ECCurve_NIST_P256) {
-                group->meth->field_mod = &ec_GFp_nistp256_mod;
-                group->meth->field_mul = &ec_GFp_nistp256_mul;
-                group->meth->field_sqr = &ec_GFp_nistp256_sqr;
-        }
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_384.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast modular reduction for p384 = 2^384 - 2^128 - 2^96 + 2^32 - 1.  a can be r.
- * Uses algorithm 2.30 from Hankerson, Menezes, Vanstone. Guide to
- * Elliptic Curve Cryptography. */
-mp_err
-ec_GFp_nistp384_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        int a_bits = mpl_significant_bits(a);
-        int i;
-
-        /* m1, m2 are statically-allocated mp_int of exactly the size we need */
-        mp_int m[10];
-
-#ifdef ECL_THIRTY_TWO_BIT
-        mp_digit s[10][12];
-        for (i = 0; i < 10; i++) {
-                MP_SIGN(&m[i]) = MP_ZPOS;
-                MP_ALLOC(&m[i]) = 12;
-                MP_USED(&m[i]) = 12;
-                MP_DIGITS(&m[i]) = s[i];
-        }
-#else
-        mp_digit s[10][6];
-        for (i = 0; i < 10; i++) {
-                MP_SIGN(&m[i]) = MP_ZPOS;
-                MP_ALLOC(&m[i]) = 6;
-                MP_USED(&m[i]) = 6;
-                MP_DIGITS(&m[i]) = s[i];
-        }
-#endif
-
-#ifdef ECL_THIRTY_TWO_BIT
-        /* for polynomials larger than twice the field size or polynomials
-         * not using all words, use regular reduction */
-        if ((a_bits > 768) || (a_bits <= 736)) {
-                MP_CHECKOK(mp_mod(a, &meth->irr, r));
-        } else {
-                for (i = 0; i < 12; i++) {
-                        s[0][i] = MP_DIGIT(a, i);
-                }
-                s[1][0] = 0;
-                s[1][1] = 0;
-                s[1][2] = 0;
-                s[1][3] = 0;
-                s[1][4] = MP_DIGIT(a, 21);
-                s[1][5] = MP_DIGIT(a, 22);
-                s[1][6] = MP_DIGIT(a, 23);
-                s[1][7] = 0;
-                s[1][8] = 0;
-                s[1][9] = 0;
-                s[1][10] = 0;
-                s[1][11] = 0;
-                for (i = 0; i < 12; i++) {
-                        s[2][i] = MP_DIGIT(a, i+12);
-                }
-                s[3][0] = MP_DIGIT(a, 21);
-                s[3][1] = MP_DIGIT(a, 22);
-                s[3][2] = MP_DIGIT(a, 23);
-                for (i = 3; i < 12; i++) {
-                        s[3][i] = MP_DIGIT(a, i+9);
-                }
-                s[4][0] = 0;
-                s[4][1] = MP_DIGIT(a, 23);
-                s[4][2] = 0;
-                s[4][3] = MP_DIGIT(a, 20);
-                for (i = 4; i < 12; i++) {
-                        s[4][i] = MP_DIGIT(a, i+8);
-                }
-                s[5][0] = 0;
-                s[5][1] = 0;
-                s[5][2] = 0;
-                s[5][3] = 0;
-                s[5][4] = MP_DIGIT(a, 20);
-                s[5][5] = MP_DIGIT(a, 21);
-                s[5][6] = MP_DIGIT(a, 22);
-                s[5][7] = MP_DIGIT(a, 23);
-                s[5][8] = 0;
-                s[5][9] = 0;
-                s[5][10] = 0;
-                s[5][11] = 0;
-                s[6][0] = MP_DIGIT(a, 20);
-                s[6][1] = 0;
-                s[6][2] = 0;
-                s[6][3] = MP_DIGIT(a, 21);
-                s[6][4] = MP_DIGIT(a, 22);
-                s[6][5] = MP_DIGIT(a, 23);
-                s[6][6] = 0;
-                s[6][7] = 0;
-                s[6][8] = 0;
-                s[6][9] = 0;
-                s[6][10] = 0;
-                s[6][11] = 0;
-                s[7][0] = MP_DIGIT(a, 23);
-                for (i = 1; i < 12; i++) {
-                        s[7][i] = MP_DIGIT(a, i+11);
-                }
-                s[8][0] = 0;
-                s[8][1] = MP_DIGIT(a, 20);
-                s[8][2] = MP_DIGIT(a, 21);
-                s[8][3] = MP_DIGIT(a, 22);
-                s[8][4] = MP_DIGIT(a, 23);
-                s[8][5] = 0;
-                s[8][6] = 0;
-                s[8][7] = 0;
-                s[8][8] = 0;
-                s[8][9] = 0;
-                s[8][10] = 0;
-                s[8][11] = 0;
-                s[9][0] = 0;
-                s[9][1] = 0;
-                s[9][2] = 0;
-                s[9][3] = MP_DIGIT(a, 23);
-                s[9][4] = MP_DIGIT(a, 23);
-                s[9][5] = 0;
-                s[9][6] = 0;
-                s[9][7] = 0;
-                s[9][8] = 0;
-                s[9][9] = 0;
-                s[9][10] = 0;
-                s[9][11] = 0;
-
-                MP_CHECKOK(mp_add(&m[0], &m[1], r));
-                MP_CHECKOK(mp_add(r, &m[1], r));
-                MP_CHECKOK(mp_add(r, &m[2], r));
-                MP_CHECKOK(mp_add(r, &m[3], r));
-                MP_CHECKOK(mp_add(r, &m[4], r));
-                MP_CHECKOK(mp_add(r, &m[5], r));
-                MP_CHECKOK(mp_add(r, &m[6], r));
-                MP_CHECKOK(mp_sub(r, &m[7], r));
-                MP_CHECKOK(mp_sub(r, &m[8], r));
-                MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r));
-                s_mp_clamp(r);
-        }
-#else
-        /* for polynomials larger than twice the field size or polynomials
-         * not using all words, use regular reduction */
-        if ((a_bits > 768) || (a_bits <= 736)) {
-                MP_CHECKOK(mp_mod(a, &meth->irr, r));
-        } else {
-                for (i = 0; i < 6; i++) {
-                        s[0][i] = MP_DIGIT(a, i);
-                }
-                s[1][0] = 0;
-                s[1][1] = 0;
-                s[1][2] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32);
-                s[1][3] = MP_DIGIT(a, 11) >> 32;
-                s[1][4] = 0;
-                s[1][5] = 0;
-                for (i = 0; i < 6; i++) {
-                        s[2][i] = MP_DIGIT(a, i+6);
-                }
-                s[3][0] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32);
-                s[3][1] = (MP_DIGIT(a, 11) >> 32) | (MP_DIGIT(a, 6) << 32);
-                for (i = 2; i < 6; i++) {
-                        s[3][i] = (MP_DIGIT(a, i+4) >> 32) | (MP_DIGIT(a, i+5) << 32);
-                }
-                s[4][0] = (MP_DIGIT(a, 11) >> 32) << 32;
-                s[4][1] = MP_DIGIT(a, 10) << 32;
-                for (i = 2; i < 6; i++) {
-                        s[4][i] = MP_DIGIT(a, i+4);
-                }
-                s[5][0] = 0;
-                s[5][1] = 0;
-                s[5][2] = MP_DIGIT(a, 10);
-                s[5][3] = MP_DIGIT(a, 11);
-                s[5][4] = 0;
-                s[5][5] = 0;
-                s[6][0] = (MP_DIGIT(a, 10) << 32) >> 32;
-                s[6][1] = (MP_DIGIT(a, 10) >> 32) << 32;
-                s[6][2] = MP_DIGIT(a, 11);
-                s[6][3] = 0;
-                s[6][4] = 0;
-                s[6][5] = 0;
-                s[7][0] = (MP_DIGIT(a, 11) >> 32) | (MP_DIGIT(a, 6) << 32);
-                for (i = 1; i < 6; i++) {
-                        s[7][i] = (MP_DIGIT(a, i+5) >> 32) | (MP_DIGIT(a, i+6) << 32);
-                }
-                s[8][0] = MP_DIGIT(a, 10) << 32;
-                s[8][1] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32);
-                s[8][2] = MP_DIGIT(a, 11) >> 32;
-                s[8][3] = 0;
-                s[8][4] = 0;
-                s[8][5] = 0;
-                s[9][0] = 0;
-                s[9][1] = (MP_DIGIT(a, 11) >> 32) << 32;
-                s[9][2] = MP_DIGIT(a, 11) >> 32;
-                s[9][3] = 0;
-                s[9][4] = 0;
-                s[9][5] = 0;
-
-                MP_CHECKOK(mp_add(&m[0], &m[1], r));
-                MP_CHECKOK(mp_add(r, &m[1], r));
-                MP_CHECKOK(mp_add(r, &m[2], r));
-                MP_CHECKOK(mp_add(r, &m[3], r));
-                MP_CHECKOK(mp_add(r, &m[4], r));
-                MP_CHECKOK(mp_add(r, &m[5], r));
-                MP_CHECKOK(mp_add(r, &m[6], r));
-                MP_CHECKOK(mp_sub(r, &m[7], r));
-                MP_CHECKOK(mp_sub(r, &m[8], r));
-                MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r));
-                s_mp_clamp(r);
-        }
-#endif
-
-  CLEANUP:
-        return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p384. Store the
- * result in r.  r could be a.  Uses optimized modular reduction for p384.
- */
-mp_err
-ec_GFp_nistp384_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_sqr(a, r));
-        MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p384.
- * Store the result in r.  r could be a or b; a could be b.  Uses
- * optimized modular reduction for p384. */
-mp_err
-ec_GFp_nistp384_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_mul(a, b, r));
-        MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp384(ECGroup *group, ECCurveName name)
-{
-        if (name == ECCurve_NIST_P384) {
-                group->meth->field_mod = &ec_GFp_nistp384_mod;
-                group->meth->field_mul = &ec_GFp_nistp384_mul;
-                group->meth->field_sqr = &ec_GFp_nistp384_sqr;
-        }
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_521.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define ECP521_DIGITS ECL_CURVE_DIGITS(521)
-
-/* Fast modular reduction for p521 = 2^521 - 1.  a can be r. Uses
- * algorithm 2.31 from Hankerson, Menezes, Vanstone. Guide to
- * Elliptic Curve Cryptography. */
-mp_err
-ec_GFp_nistp521_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        int a_bits = mpl_significant_bits(a);
-        int i;
-
-        /* m1, m2 are statically-allocated mp_int of exactly the size we need */
-        mp_int m1;
-
-        mp_digit s1[ECP521_DIGITS] = { 0 };
-
-        MP_SIGN(&m1) = MP_ZPOS;
-        MP_ALLOC(&m1) = ECP521_DIGITS;
-        MP_USED(&m1) = ECP521_DIGITS;
-        MP_DIGITS(&m1) = s1;
-
-        if (a_bits < 521) {
-                if (a==r) return MP_OKAY;
-                return mp_copy(a, r);
-        }
-        /* for polynomials larger than twice the field size or polynomials
-         * not using all words, use regular reduction */
-        if (a_bits > (521*2)) {
-                MP_CHECKOK(mp_mod(a, &meth->irr, r));
-        } else {
-#define FIRST_DIGIT (ECP521_DIGITS-1)
-                for (i = FIRST_DIGIT; i < MP_USED(a)-1; i++) {
-                        s1[i-FIRST_DIGIT] = (MP_DIGIT(a, i) >> 9)
-                                | (MP_DIGIT(a, 1+i) << (MP_DIGIT_BIT-9));
-                }
-                s1[i-FIRST_DIGIT] = MP_DIGIT(a, i) >> 9;
-
-                if ( a != r ) {
-                        MP_CHECKOK(s_mp_pad(r,ECP521_DIGITS));
-                        for (i = 0; i < ECP521_DIGITS; i++) {
-                                MP_DIGIT(r,i) = MP_DIGIT(a, i);
-                        }
-                }
-                MP_USED(r) = ECP521_DIGITS;
-                MP_DIGIT(r,FIRST_DIGIT) &=  0x1FF;
-
-                MP_CHECKOK(s_mp_add(r, &m1));
-                if (MP_DIGIT(r, FIRST_DIGIT) & 0x200) {
-                        MP_CHECKOK(s_mp_add_d(r,1));
-                        MP_DIGIT(r,FIRST_DIGIT) &=  0x1FF;
-                }
-                s_mp_clamp(r);
-        }
-
-  CLEANUP:
-        return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p521. Store the
- * result in r.  r could be a.  Uses optimized modular reduction for p521.
- */
-mp_err
-ec_GFp_nistp521_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_sqr(a, r));
-        MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p521.
- * Store the result in r.  r could be a or b; a could be b.  Uses
- * optimized modular reduction for p521. */
-mp_err
-ec_GFp_nistp521_mul(const mp_int *a, const mp_int *b, mp_int *r,
-                                        const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        MP_CHECKOK(mp_mul(a, b, r));
-        MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth));
-  CLEANUP:
-        return res;
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_nistp521_div(const mp_int *a, const mp_int *b, mp_int *r,
-                   const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-        mp_int t;
-
-        /* If a is NULL, then return the inverse of b, otherwise return a/b. */
-        if (a == NULL) {
-                return mp_invmod(b, &meth->irr, r);
-        } else {
-                /* MPI doesn't support divmod, so we implement it using invmod and
-                 * mulmod. */
-                MP_CHECKOK(mp_init(&t, FLAG(b)));
-                MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
-                MP_CHECKOK(mp_mul(a, &t, r));
-                MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth));
-          CLEANUP:
-                mp_clear(&t);
-                return res;
-        }
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp521(ECGroup *group, ECCurveName name)
-{
-        if (name == ECCurve_NIST_P521) {
-                group->meth->field_mod = &ec_GFp_nistp521_mod;
-                group->meth->field_mul = &ec_GFp_nistp521_mul;
-                group->meth->field_sqr = &ec_GFp_nistp521_sqr;
-                group->meth->field_div = &ec_GFp_nistp521_div;
-        }
-        return MP_OKAY;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_aff.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,379 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <fungstep@hotmail.com>, and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *   Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>,
- *   Nils Larsch <nla@trustcenter.de>, and
- *   Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mplogic.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Checks if point P(px, py) is at infinity.  Uses affine coordinates. */
-mp_err
-ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py)
-{
-
-        if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
-                return MP_YES;
-        } else {
-                return MP_NO;
-        }
-
-}
-
-/* Sets P(px, py) to be the point at infinity.  Uses affine coordinates. */
-mp_err
-ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py)
-{
-        mp_zero(px);
-        mp_zero(py);
-        return MP_OKAY;
-}
-
-/* Computes R = P + Q based on IEEE P1363 A.10.1. Elliptic curve points P,
- * Q, and R can all be identical. Uses affine coordinates. Assumes input
- * is already field-encoded using field_enc, and returns output that is
- * still field-encoded. */
-mp_err
-ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
-                                  const mp_int *qy, mp_int *rx, mp_int *ry,
-                                  const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int lambda, temp, tempx, tempy;
-
-        MP_DIGITS(&lambda) = 0;
-        MP_DIGITS(&temp) = 0;
-        MP_DIGITS(&tempx) = 0;
-        MP_DIGITS(&tempy) = 0;
-        MP_CHECKOK(mp_init(&lambda, FLAG(px)));
-        MP_CHECKOK(mp_init(&temp, FLAG(px)));
-        MP_CHECKOK(mp_init(&tempx, FLAG(px)));
-        MP_CHECKOK(mp_init(&tempy, FLAG(px)));
-        /* if P = inf, then R = Q */
-        if (ec_GFp_pt_is_inf_aff(px, py) == 0) {
-                MP_CHECKOK(mp_copy(qx, rx));
-                MP_CHECKOK(mp_copy(qy, ry));
-                res = MP_OKAY;
-                goto CLEANUP;
-        }
-        /* if Q = inf, then R = P */
-        if (ec_GFp_pt_is_inf_aff(qx, qy) == 0) {
-                MP_CHECKOK(mp_copy(px, rx));
-                MP_CHECKOK(mp_copy(py, ry));
-                res = MP_OKAY;
-                goto CLEANUP;
-        }
-        /* if px != qx, then lambda = (py-qy) / (px-qx) */
-        if (mp_cmp(px, qx) != 0) {
-                MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth));
-                MP_CHECKOK(group->meth->field_sub(px, qx, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_div(&tempy, &tempx, &lambda, group->meth));
-        } else {
-                /* if py != qy or qy = 0, then R = inf */
-                if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qy) == 0)) {
-                        mp_zero(rx);
-                        mp_zero(ry);
-                        res = MP_OKAY;
-                        goto CLEANUP;
-                }
-                /* lambda = (3qx^2+a) / (2qy) */
-                MP_CHECKOK(group->meth->field_sqr(qx, &tempx, group->meth));
-                MP_CHECKOK(mp_set_int(&temp, 3));
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth));
-                }
-                MP_CHECKOK(group->meth->
-                                   field_mul(&tempx, &temp, &tempx, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&tempx, &group->curvea, &tempx, group->meth));
-                MP_CHECKOK(mp_set_int(&temp, 2));
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth));
-                }
-                MP_CHECKOK(group->meth->field_mul(qy, &temp, &tempy, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_div(&tempx, &tempy, &lambda, group->meth));
-        }
-        /* rx = lambda^2 - px - qx */
-        MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(&tempx, px, &tempx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(&tempx, qx, &tempx, group->meth));
-        /* ry = (x1-x2) * lambda - y1 */
-        MP_CHECKOK(group->meth->field_sub(qx, &tempx, &tempy, group->meth));
-        MP_CHECKOK(group->meth->
-                           field_mul(&tempy, &lambda, &tempy, group->meth));
-        MP_CHECKOK(group->meth->field_sub(&tempy, qy, &tempy, group->meth));
-        MP_CHECKOK(mp_copy(&tempx, rx));
-        MP_CHECKOK(mp_copy(&tempy, ry));
-
-  CLEANUP:
-        mp_clear(&lambda);
-        mp_clear(&temp);
-        mp_clear(&tempx);
-        mp_clear(&tempy);
-        return res;
-}
-
-/* Computes R = P - Q. Elliptic curve points P, Q, and R can all be
- * identical. Uses affine coordinates. Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
-                                  const mp_int *qy, mp_int *rx, mp_int *ry,
-                                  const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int nqy;
-
-        MP_DIGITS(&nqy) = 0;
-        MP_CHECKOK(mp_init(&nqy, FLAG(px)));
-        /* nqy = -qy */
-        MP_CHECKOK(group->meth->field_neg(qy, &nqy, group->meth));
-        res = group->point_add(px, py, qx, &nqy, rx, ry, group);
-  CLEANUP:
-        mp_clear(&nqy);
-        return res;
-}
-
-/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses
- * affine coordinates. Assumes input is already field-encoded using
- * field_enc, and returns output that is still field-encoded. */
-mp_err
-ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
-                                  mp_int *ry, const ECGroup *group)
-{
-        return ec_GFp_pt_add_aff(px, py, px, py, rx, ry, group);
-}
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GFP_PT_MUL_AFF
-/* Computes R = nP based on IEEE P1363 A.10.3. Elliptic curve points P and
- * R can be identical. Uses affine coordinates. Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
-                                  mp_int *rx, mp_int *ry, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int k, k3, qx, qy, sx, sy;
-        int b1, b3, i, l;
-
-        MP_DIGITS(&k) = 0;
-        MP_DIGITS(&k3) = 0;
-        MP_DIGITS(&qx) = 0;
-        MP_DIGITS(&qy) = 0;
-        MP_DIGITS(&sx) = 0;
-        MP_DIGITS(&sy) = 0;
-        MP_CHECKOK(mp_init(&k));
-        MP_CHECKOK(mp_init(&k3));
-        MP_CHECKOK(mp_init(&qx));
-        MP_CHECKOK(mp_init(&qy));
-        MP_CHECKOK(mp_init(&sx));
-        MP_CHECKOK(mp_init(&sy));
-
-        /* if n = 0 then r = inf */
-        if (mp_cmp_z(n) == 0) {
-                mp_zero(rx);
-                mp_zero(ry);
-                res = MP_OKAY;
-                goto CLEANUP;
-        }
-        /* Q = P, k = n */
-        MP_CHECKOK(mp_copy(px, &qx));
-        MP_CHECKOK(mp_copy(py, &qy));
-        MP_CHECKOK(mp_copy(n, &k));
-        /* if n < 0 then Q = -Q, k = -k */
-        if (mp_cmp_z(n) < 0) {
-                MP_CHECKOK(group->meth->field_neg(&qy, &qy, group->meth));
-                MP_CHECKOK(mp_neg(&k, &k));
-        }
-#ifdef ECL_DEBUG                                /* basic double and add method */
-        l = mpl_significant_bits(&k) - 1;
-        MP_CHECKOK(mp_copy(&qx, &sx));
-        MP_CHECKOK(mp_copy(&qy, &sy));
-        for (i = l - 1; i >= 0; i--) {
-                /* S = 2S */
-                MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
-                /* if k_i = 1, then S = S + Q */
-                if (mpl_get_bit(&k, i) != 0) {
-                        MP_CHECKOK(group->
-                                           point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
-                }
-        }
-#else                                                   /* double and add/subtract method from
-                                                                 * standard */
-        /* k3 = 3 * k */
-        MP_CHECKOK(mp_set_int(&k3, 3));
-        MP_CHECKOK(mp_mul(&k, &k3, &k3));
-        /* S = Q */
-        MP_CHECKOK(mp_copy(&qx, &sx));
-        MP_CHECKOK(mp_copy(&qy, &sy));
-        /* l = index of high order bit in binary representation of 3*k */
-        l = mpl_significant_bits(&k3) - 1;
-        /* for i = l-1 downto 1 */
-        for (i = l - 1; i >= 1; i--) {
-                /* S = 2S */
-                MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
-                b3 = MP_GET_BIT(&k3, i);
-                b1 = MP_GET_BIT(&k, i);
-                /* if k3_i = 1 and k_i = 0, then S = S + Q */
-                if ((b3 == 1) && (b1 == 0)) {
-                        MP_CHECKOK(group->
-                                           point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
-                        /* if k3_i = 0 and k_i = 1, then S = S - Q */
-                } else if ((b3 == 0) && (b1 == 1)) {
-                        MP_CHECKOK(group->
-                                           point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group));
-                }
-        }
-#endif
-        /* output S */
-        MP_CHECKOK(mp_copy(&sx, rx));
-        MP_CHECKOK(mp_copy(&sy, ry));
-
-  CLEANUP:
-        mp_clear(&k);
-        mp_clear(&k3);
-        mp_clear(&qx);
-        mp_clear(&qy);
-        mp_clear(&sx);
-        mp_clear(&sy);
-        return res;
-}
-#endif
-
-/* Validates a point on a GFp curve. */
-mp_err
-ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
-{
-        mp_err res = MP_NO;
-        mp_int accl, accr, tmp, pxt, pyt;
-
-        MP_DIGITS(&accl) = 0;
-        MP_DIGITS(&accr) = 0;
-        MP_DIGITS(&tmp) = 0;
-        MP_DIGITS(&pxt) = 0;
-        MP_DIGITS(&pyt) = 0;
-        MP_CHECKOK(mp_init(&accl, FLAG(px)));
-        MP_CHECKOK(mp_init(&accr, FLAG(px)));
-        MP_CHECKOK(mp_init(&tmp, FLAG(px)));
-        MP_CHECKOK(mp_init(&pxt, FLAG(px)));
-        MP_CHECKOK(mp_init(&pyt, FLAG(px)));
-
-    /* 1: Verify that publicValue is not the point at infinity */
-        if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-    /* 2: Verify that the coordinates of publicValue are elements
-     *    of the field.
-     */
-        if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) ||
-                (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-    /* 3: Verify that publicValue is on the curve. */
-        if (group->meth->field_enc) {
-                group->meth->field_enc(px, &pxt, group->meth);
-                group->meth->field_enc(py, &pyt, group->meth);
-        } else {
-                mp_copy(px, &pxt);
-                mp_copy(py, &pyt);
-        }
-        /* left-hand side: y^2  */
-        MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) );
-        /* right-hand side: x^3 + a*x + b */
-        MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) );
-        MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) );
-        MP_CHECKOK( group->meth->field_mul(&group->curvea, &pxt, &tmp, group->meth) );
-        MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) );
-        MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) );
-        /* check LHS - RHS == 0 */
-        MP_CHECKOK( group->meth->field_sub(&accl, &accr, &accr, group->meth) );
-        if (mp_cmp_z(&accr) != 0) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-    /* 4: Verify that the order of the curve times the publicValue
-     *    is the point at infinity.
-     */
-        MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );
-        if (ec_GFp_pt_is_inf_aff(&pxt, &pyt) != MP_YES) {
-                res = MP_NO;
-                goto CLEANUP;
-        }
-
-        res = MP_YES;
-
-CLEANUP:
-        mp_clear(&accl);
-        mp_clear(&accr);
-        mp_clear(&tmp);
-        mp_clear(&pxt);
-        mp_clear(&pyt);
-        return res;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_jac.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,575 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <fungstep@hotmail.com>, and
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *   Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>,
- *   Nils Larsch <nla@trustcenter.de>, and
- *   Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "mplogic.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-#ifdef ECL_DEBUG
-#include <assert.h>
-#endif
-
-/* Converts a point P(px, py) from affine coordinates to Jacobian
- * projective coordinates R(rx, ry, rz). Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
-                                  mp_int *ry, mp_int *rz, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-
-        if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
-                MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz));
-        } else {
-                MP_CHECKOK(mp_copy(px, rx));
-                MP_CHECKOK(mp_copy(py, ry));
-                MP_CHECKOK(mp_set_int(rz, 1));
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->field_enc(rz, rz, group->meth));
-                }
-        }
-  CLEANUP:
-        return res;
-}
-
-/* Converts a point P(px, py, pz) from Jacobian projective coordinates to
- * affine coordinates R(rx, ry).  P and R can share x and y coordinates.
- * Assumes input is already field-encoded using field_enc, and returns
- * output that is still field-encoded. */
-mp_err
-ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, const mp_int *pz,
-                                  mp_int *rx, mp_int *ry, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int z1, z2, z3;
-
-        MP_DIGITS(&z1) = 0;
-        MP_DIGITS(&z2) = 0;
-        MP_DIGITS(&z3) = 0;
-        MP_CHECKOK(mp_init(&z1, FLAG(px)));
-        MP_CHECKOK(mp_init(&z2, FLAG(px)));
-        MP_CHECKOK(mp_init(&z3, FLAG(px)));
-
-        /* if point at infinity, then set point at infinity and exit */
-        if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
-                MP_CHECKOK(ec_GFp_pt_set_inf_aff(rx, ry));
-                goto CLEANUP;
-        }
-
-        /* transform (px, py, pz) into (px / pz^2, py / pz^3) */
-        if (mp_cmp_d(pz, 1) == 0) {
-                MP_CHECKOK(mp_copy(px, rx));
-                MP_CHECKOK(mp_copy(py, ry));
-        } else {
-                MP_CHECKOK(group->meth->field_div(NULL, pz, &z1, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(&z1, &z2, group->meth));
-                MP_CHECKOK(group->meth->field_mul(&z1, &z2, &z3, group->meth));
-                MP_CHECKOK(group->meth->field_mul(px, &z2, rx, group->meth));
-                MP_CHECKOK(group->meth->field_mul(py, &z3, ry, group->meth));
-        }
-
-  CLEANUP:
-        mp_clear(&z1);
-        mp_clear(&z2);
-        mp_clear(&z3);
-        return res;
-}
-
-/* Checks if point P(px, py, pz) is at infinity. Uses Jacobian
- * coordinates. */
-mp_err
-ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, const mp_int *pz)
-{
-        return mp_cmp_z(pz);
-}
-
-/* Sets P(px, py, pz) to be the point at infinity.  Uses Jacobian
- * coordinates. */
-mp_err
-ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz)
-{
-        mp_zero(pz);
-        return MP_OKAY;
-}
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, 1).  Elliptic curve points P, Q, and R can all be identical.
- * Uses mixed Jacobian-affine coordinates. Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. Uses equation (2) from Brown, Hankerson, Lopez, and
- * Menezes. Software Implementation of the NIST Elliptic Curves Over Prime
- * Fields. */
-mp_err
-ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, const mp_int *pz,
-                                          const mp_int *qx, const mp_int *qy, mp_int *rx,
-                                          mp_int *ry, mp_int *rz, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int A, B, C, D, C2, C3;
-
-        MP_DIGITS(&A) = 0;
-        MP_DIGITS(&B) = 0;
-        MP_DIGITS(&C) = 0;
-        MP_DIGITS(&D) = 0;
-        MP_DIGITS(&C2) = 0;
-        MP_DIGITS(&C3) = 0;
-        MP_CHECKOK(mp_init(&A, FLAG(px)));
-        MP_CHECKOK(mp_init(&B, FLAG(px)));
-        MP_CHECKOK(mp_init(&C, FLAG(px)));
-        MP_CHECKOK(mp_init(&D, FLAG(px)));
-        MP_CHECKOK(mp_init(&C2, FLAG(px)));
-        MP_CHECKOK(mp_init(&C3, FLAG(px)));
-
-        /* If either P or Q is the point at infinity, then return the other
-         * point */
-        if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
-                MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group));
-                goto CLEANUP;
-        }
-        if (ec_GFp_pt_is_inf_aff(qx, qy) == MP_YES) {
-                MP_CHECKOK(mp_copy(px, rx));
-                MP_CHECKOK(mp_copy(py, ry));
-                MP_CHECKOK(mp_copy(pz, rz));
-                goto CLEANUP;
-        }
-
-        /* A = qx * pz^2, B = qy * pz^3 */
-        MP_CHECKOK(group->meth->field_sqr(pz, &A, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&A, pz, &B, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&A, qx, &A, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&B, qy, &B, group->meth));
-
-        /* C = A - px, D = B - py */
-        MP_CHECKOK(group->meth->field_sub(&A, px, &C, group->meth));
-        MP_CHECKOK(group->meth->field_sub(&B, py, &D, group->meth));
-
-        /* C2 = C^2, C3 = C^3 */
-        MP_CHECKOK(group->meth->field_sqr(&C, &C2, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&C, &C2, &C3, group->meth));
-
-        /* rz = pz * C */
-        MP_CHECKOK(group->meth->field_mul(pz, &C, rz, group->meth));
-
-        /* C = px * C^2 */
-        MP_CHECKOK(group->meth->field_mul(px, &C2, &C, group->meth));
-        /* A = D^2 */
-        MP_CHECKOK(group->meth->field_sqr(&D, &A, group->meth));
-
-        /* rx = D^2 - (C^3 + 2 * (px * C^2)) */
-        MP_CHECKOK(group->meth->field_add(&C, &C, rx, group->meth));
-        MP_CHECKOK(group->meth->field_add(&C3, rx, rx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(&A, rx, rx, group->meth));
-
-        /* C3 = py * C^3 */
-        MP_CHECKOK(group->meth->field_mul(py, &C3, &C3, group->meth));
-
-        /* ry = D * (px * C^2 - rx) - py * C^3 */
-        MP_CHECKOK(group->meth->field_sub(&C, rx, ry, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&D, ry, ry, group->meth));
-        MP_CHECKOK(group->meth->field_sub(ry, &C3, ry, group->meth));
-
-  CLEANUP:
-        mp_clear(&A);
-        mp_clear(&B);
-        mp_clear(&C);
-        mp_clear(&D);
-        mp_clear(&C2);
-        mp_clear(&C3);
-        return res;
-}
-
-/* Computes R = 2P.  Elliptic curve points P and R can be identical.  Uses
- * Jacobian coordinates.
- *
- * Assumes input is already field-encoded using field_enc, and returns
- * output that is still field-encoded.
- *
- * This routine implements Point Doubling in the Jacobian Projective
- * space as described in the paper "Efficient elliptic curve exponentiation
- * using mixed coordinates", by H. Cohen, A Miyaji, T. Ono.
- */
-mp_err
-ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, const mp_int *pz,
-                                  mp_int *rx, mp_int *ry, mp_int *rz, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int t0, t1, M, S;
-
-        MP_DIGITS(&t0) = 0;
-        MP_DIGITS(&t1) = 0;
-        MP_DIGITS(&M) = 0;
-        MP_DIGITS(&S) = 0;
-        MP_CHECKOK(mp_init(&t0, FLAG(px)));
-        MP_CHECKOK(mp_init(&t1, FLAG(px)));
-        MP_CHECKOK(mp_init(&M, FLAG(px)));
-        MP_CHECKOK(mp_init(&S, FLAG(px)));
-
-        if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
-                MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz));
-                goto CLEANUP;
-        }
-
-        if (mp_cmp_d(pz, 1) == 0) {
-                /* M = 3 * px^2 + a */
-                MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth));
-                MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth));
-                MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_add(&t0, &group->curvea, &M, group->meth));
-        } else if (mp_cmp_int(&group->curvea, -3, FLAG(px)) == 0) {
-                /* M = 3 * (px + pz^2) * (px - pz^2) */
-                MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth));
-                MP_CHECKOK(group->meth->field_add(px, &M, &t0, group->meth));
-                MP_CHECKOK(group->meth->field_sub(px, &M, &t1, group->meth));
-                MP_CHECKOK(group->meth->field_mul(&t0, &t1, &M, group->meth));
-                MP_CHECKOK(group->meth->field_add(&M, &M, &t0, group->meth));
-                MP_CHECKOK(group->meth->field_add(&t0, &M, &M, group->meth));
-        } else {
-                /* M = 3 * (px^2) + a * (pz^4) */
-                MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth));
-                MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth));
-                MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(&M, &M, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_mul(&M, &group->curvea, &M, group->meth));
-                MP_CHECKOK(group->meth->field_add(&M, &t0, &M, group->meth));
-        }
-
-        /* rz = 2 * py * pz */
-        /* t0 = 4 * py^2 */
-        if (mp_cmp_d(pz, 1) == 0) {
-                MP_CHECKOK(group->meth->field_add(py, py, rz, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(rz, &t0, group->meth));
-        } else {
-                MP_CHECKOK(group->meth->field_add(py, py, &t0, group->meth));
-                MP_CHECKOK(group->meth->field_mul(&t0, pz, rz, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(&t0, &t0, group->meth));
-        }
-
-        /* S = 4 * px * py^2 = px * (2 * py)^2 */
-        MP_CHECKOK(group->meth->field_mul(px, &t0, &S, group->meth));
-
-        /* rx = M^2 - 2 * S */
-        MP_CHECKOK(group->meth->field_add(&S, &S, &t1, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(&M, rx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(rx, &t1, rx, group->meth));
-
-        /* ry = M * (S - rx) - 8 * py^4 */
-        MP_CHECKOK(group->meth->field_sqr(&t0, &t1, group->meth));
-        if (mp_isodd(&t1)) {
-                MP_CHECKOK(mp_add(&t1, &group->meth->irr, &t1));
-        }
-        MP_CHECKOK(mp_div_2(&t1, &t1));
-        MP_CHECKOK(group->meth->field_sub(&S, rx, &S, group->meth));
-        MP_CHECKOK(group->meth->field_mul(&M, &S, &M, group->meth));
-        MP_CHECKOK(group->meth->field_sub(&M, &t1, ry, group->meth));
-
-  CLEANUP:
-        mp_clear(&t0);
-        mp_clear(&t1);
-        mp_clear(&M);
-        mp_clear(&S);
-        return res;
-}
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GFP_PT_MUL_JAC
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GFp.  Elliptic curve points P and R can be
- * identical.  Uses mixed Jacobian-affine coordinates. Assumes input is
- * already field-encoded using field_enc, and returns output that is still
- * field-encoded. Uses 4-bit window method. */
-mp_err
-ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px, const mp_int *py,
-                                  mp_int *rx, mp_int *ry, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int precomp[16][2], rz;
-        int i, ni, d;
-
-        MP_DIGITS(&rz) = 0;
-        for (i = 0; i < 16; i++) {
-                MP_DIGITS(&precomp[i][0]) = 0;
-                MP_DIGITS(&precomp[i][1]) = 0;
-        }
-
-        ARGCHK(group != NULL, MP_BADARG);
-        ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG);
-
-        /* initialize precomputation table */
-        for (i = 0; i < 16; i++) {
-                MP_CHECKOK(mp_init(&precomp[i][0]));
-                MP_CHECKOK(mp_init(&precomp[i][1]));
-        }
-
-        /* fill precomputation table */
-        mp_zero(&precomp[0][0]);
-        mp_zero(&precomp[0][1]);
-        MP_CHECKOK(mp_copy(px, &precomp[1][0]));
-        MP_CHECKOK(mp_copy(py, &precomp[1][1]));
-        for (i = 2; i < 16; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[1][0], &precomp[1][1],
-                                                         &precomp[i - 1][0], &precomp[i - 1][1],
-                                                         &precomp[i][0], &precomp[i][1], group));
-        }
-
-        d = (mpl_significant_bits(n) + 3) / 4;
-
-        /* R = inf */
-        MP_CHECKOK(mp_init(&rz));
-        MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz));
-
-        for (i = d - 1; i >= 0; i--) {
-                /* compute window ni */
-                ni = MP_GET_BIT(n, 4 * i + 3);
-                ni <<= 1;
-                ni |= MP_GET_BIT(n, 4 * i + 2);
-                ni <<= 1;
-                ni |= MP_GET_BIT(n, 4 * i + 1);
-                ni <<= 1;
-                ni |= MP_GET_BIT(n, 4 * i);
-                /* R = 2^4 * R */
-                MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
-                MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
-                MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
-                MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
-                /* R = R + (ni * P) */
-                MP_CHECKOK(ec_GFp_pt_add_jac_aff
-                                   (rx, ry, &rz, &precomp[ni][0], &precomp[ni][1], rx, ry,
-                                        &rz, group));
-        }
-
-        /* convert result S to affine coordinates */
-        MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
-
-  CLEANUP:
-        mp_clear(&rz);
-        for (i = 0; i < 16; i++) {
-                mp_clear(&precomp[i][0]);
-                mp_clear(&precomp[i][1]);
-        }
-        return res;
-}
-#endif
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Uses mixed Jacobian-affine coordinates. Input and output values are
- * assumed to be NOT field-encoded. Uses algorithm 15 (simultaneous
- * multiple point multiplication) from Brown, Hankerson, Lopez, Menezes.
- * Software Implementation of the NIST Elliptic Curves over Prime Fields. */
-mp_err
-ec_GFp_pts_mul_jac(const mp_int *k1, const mp_int *k2, const mp_int *px,
-                                   const mp_int *py, mp_int *rx, mp_int *ry,
-                                   const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int precomp[4][4][2];
-        mp_int rz;
-        const mp_int *a, *b;
-        int i, j;
-        int ai, bi, d;
-
-        for (i = 0; i < 4; i++) {
-                for (j = 0; j < 4; j++) {
-                        MP_DIGITS(&precomp[i][j][0]) = 0;
-                        MP_DIGITS(&precomp[i][j][1]) = 0;
-                }
-        }
-        MP_DIGITS(&rz) = 0;
-
-        ARGCHK(group != NULL, MP_BADARG);
-        ARGCHK(!((k1 == NULL)
-                         && ((k2 == NULL) || (px == NULL)
-                                 || (py == NULL))), MP_BADARG);
-
-        /* if some arguments are not defined used ECPoint_mul */
-        if (k1 == NULL) {
-                return ECPoint_mul(group, k2, px, py, rx, ry);
-        } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
-                return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
-        }
-
-        /* initialize precomputation table */
-        for (i = 0; i < 4; i++) {
-                for (j = 0; j < 4; j++) {
-                        MP_CHECKOK(mp_init(&precomp[i][j][0], FLAG(k1)));
-                        MP_CHECKOK(mp_init(&precomp[i][j][1], FLAG(k1)));
-                }
-        }
-
-        /* fill precomputation table */
-        /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
-        if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
-                a = k2;
-                b = k1;
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->
-                                           field_enc(px, &precomp[1][0][0], group->meth));
-                        MP_CHECKOK(group->meth->
-                                           field_enc(py, &precomp[1][0][1], group->meth));
-                } else {
-                        MP_CHECKOK(mp_copy(px, &precomp[1][0][0]));
-                        MP_CHECKOK(mp_copy(py, &precomp[1][0][1]));
-                }
-                MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0]));
-                MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1]));
-        } else {
-                a = k1;
-                b = k2;
-                MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0]));
-                MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1]));
-                if (group->meth->field_enc) {
-                        MP_CHECKOK(group->meth->
-                                           field_enc(px, &precomp[0][1][0], group->meth));
-                        MP_CHECKOK(group->meth->
-                                           field_enc(py, &precomp[0][1][1], group->meth));
-                } else {
-                        MP_CHECKOK(mp_copy(px, &precomp[0][1][0]));
-                        MP_CHECKOK(mp_copy(py, &precomp[0][1][1]));
-                }
-        }
-        /* precompute [*][0][*] */
-        mp_zero(&precomp[0][0][0]);
-        mp_zero(&precomp[0][0][1]);
-        MP_CHECKOK(group->
-                           point_dbl(&precomp[1][0][0], &precomp[1][0][1],
-                                                 &precomp[2][0][0], &precomp[2][0][1], group));
-        MP_CHECKOK(group->
-                           point_add(&precomp[1][0][0], &precomp[1][0][1],
-                                                 &precomp[2][0][0], &precomp[2][0][1],
-                                                 &precomp[3][0][0], &precomp[3][0][1], group));
-        /* precompute [*][1][*] */
-        for (i = 1; i < 4; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[0][1][0], &precomp[0][1][1],
-                                                         &precomp[i][0][0], &precomp[i][0][1],
-                                                         &precomp[i][1][0], &precomp[i][1][1], group));
-        }
-        /* precompute [*][2][*] */
-        MP_CHECKOK(group->
-                           point_dbl(&precomp[0][1][0], &precomp[0][1][1],
-                                                 &precomp[0][2][0], &precomp[0][2][1], group));
-        for (i = 1; i < 4; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[0][2][0], &precomp[0][2][1],
-                                                         &precomp[i][0][0], &precomp[i][0][1],
-                                                         &precomp[i][2][0], &precomp[i][2][1], group));
-        }
-        /* precompute [*][3][*] */
-        MP_CHECKOK(group->
-                           point_add(&precomp[0][1][0], &precomp[0][1][1],
-                                                 &precomp[0][2][0], &precomp[0][2][1],
-                                                 &precomp[0][3][0], &precomp[0][3][1], group));
-        for (i = 1; i < 4; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[0][3][0], &precomp[0][3][1],
-                                                         &precomp[i][0][0], &precomp[i][0][1],
-                                                         &precomp[i][3][0], &precomp[i][3][1], group));
-        }
-
-        d = (mpl_significant_bits(a) + 1) / 2;
-
-        /* R = inf */
-        MP_CHECKOK(mp_init(&rz, FLAG(k1)));
-        MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz));
-
-        for (i = d - 1; i >= 0; i--) {
-                ai = MP_GET_BIT(a, 2 * i + 1);
-                ai <<= 1;
-                ai |= MP_GET_BIT(a, 2 * i);
-                bi = MP_GET_BIT(b, 2 * i + 1);
-                bi <<= 1;
-                bi |= MP_GET_BIT(b, 2 * i);
-                /* R = 2^2 * R */
-                MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
-                MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
-                /* R = R + (ai * A + bi * B) */
-                MP_CHECKOK(ec_GFp_pt_add_jac_aff
-                                   (rx, ry, &rz, &precomp[ai][bi][0], &precomp[ai][bi][1],
-                                        rx, ry, &rz, group));
-        }
-
-        MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
-
-        if (group->meth->field_dec) {
-                MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
-                MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
-        }
-
-  CLEANUP:
-        mp_clear(&rz);
-        for (i = 0; i < 4; i++) {
-                for (j = 0; j < 4; j++) {
-                        mp_clear(&precomp[i][j][0]);
-                        mp_clear(&precomp[i][j][1]);
-                }
-        }
-        return res;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_jm.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stephen Fung <fungstep@hotmail.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "ecp.h"
-#include "ecl-priv.h"
-#include "mplogic.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define MAX_SCRATCH 6
-
-/* Computes R = 2P.  Elliptic curve points P and R can be identical.  Uses
- * Modified Jacobian coordinates.
- *
- * Assumes input is already field-encoded using field_enc, and returns
- * output that is still field-encoded.
- *
- */
-mp_err
-ec_GFp_pt_dbl_jm(const mp_int *px, const mp_int *py, const mp_int *pz,
-                                 const mp_int *paz4, mp_int *rx, mp_int *ry, mp_int *rz,
-                                 mp_int *raz4, mp_int scratch[], const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int *t0, *t1, *M, *S;
-
-        t0 = &scratch[0];
-        t1 = &scratch[1];
-        M = &scratch[2];
-        S = &scratch[3];
-
-#if MAX_SCRATCH < 4
-#error "Scratch array defined too small "
-#endif
-
-        /* Check for point at infinity */
-        if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
-                /* Set r = pt at infinity by setting rz = 0 */
-
-                MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz));
-                goto CLEANUP;
-        }
-
-        /* M = 3 (px^2) + a*(pz^4) */
-        MP_CHECKOK(group->meth->field_sqr(px, t0, group->meth));
-        MP_CHECKOK(group->meth->field_add(t0, t0, M, group->meth));
-        MP_CHECKOK(group->meth->field_add(t0, M, t0, group->meth));
-        MP_CHECKOK(group->meth->field_add(t0, paz4, M, group->meth));
-
-        /* rz = 2 * py * pz */
-        MP_CHECKOK(group->meth->field_mul(py, pz, S, group->meth));
-        MP_CHECKOK(group->meth->field_add(S, S, rz, group->meth));
-
-        /* t0 = 2y^2 , t1 = 8y^4 */
-        MP_CHECKOK(group->meth->field_sqr(py, t0, group->meth));
-        MP_CHECKOK(group->meth->field_add(t0, t0, t0, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(t0, t1, group->meth));
-        MP_CHECKOK(group->meth->field_add(t1, t1, t1, group->meth));
-
-        /* S = 4 * px * py^2 = 2 * px * t0 */
-        MP_CHECKOK(group->meth->field_mul(px, t0, S, group->meth));
-        MP_CHECKOK(group->meth->field_add(S, S, S, group->meth));
-
-
-        /* rx = M^2 - 2S */
-        MP_CHECKOK(group->meth->field_sqr(M, rx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(rx, S, rx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(rx, S, rx, group->meth));
-
-        /* ry = M * (S - rx) - t1 */
-        MP_CHECKOK(group->meth->field_sub(S, rx, S, group->meth));
-        MP_CHECKOK(group->meth->field_mul(S, M, ry, group->meth));
-        MP_CHECKOK(group->meth->field_sub(ry, t1, ry, group->meth));
-
-        /* ra*z^4 = 2*t1*(apz4) */
-        MP_CHECKOK(group->meth->field_mul(paz4, t1, raz4, group->meth));
-        MP_CHECKOK(group->meth->field_add(raz4, raz4, raz4, group->meth));
-
-
-  CLEANUP:
-        return res;
-}
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, 1).  Elliptic curve points P, Q, and R can all be identical.
- * Uses mixed Modified_Jacobian-affine coordinates. Assumes input is
- * already field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_add_jm_aff(const mp_int *px, const mp_int *py, const mp_int *pz,
-                                         const mp_int *paz4, const mp_int *qx,
-                                         const mp_int *qy, mp_int *rx, mp_int *ry, mp_int *rz,
-                                         mp_int *raz4, mp_int scratch[], const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int *A, *B, *C, *D, *C2, *C3;
-
-        A = &scratch[0];
-        B = &scratch[1];
-        C = &scratch[2];
-        D = &scratch[3];
-        C2 = &scratch[4];
-        C3 = &scratch[5];
-
-#if MAX_SCRATCH < 6
-#error "Scratch array defined too small "
-#endif
-
-        /* If either P or Q is the point at infinity, then return the other
-         * point */
-        if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
-                MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group));
-                MP_CHECKOK(group->meth->field_sqr(rz, raz4, group->meth));
-                MP_CHECKOK(group->meth->field_sqr(raz4, raz4, group->meth));
-                MP_CHECKOK(group->meth->
-                                   field_mul(raz4, &group->curvea, raz4, group->meth));
-                goto CLEANUP;
-        }
-        if (ec_GFp_pt_is_inf_aff(qx, qy) == MP_YES) {
-                MP_CHECKOK(mp_copy(px, rx));
-                MP_CHECKOK(mp_copy(py, ry));
-                MP_CHECKOK(mp_copy(pz, rz));
-                MP_CHECKOK(mp_copy(paz4, raz4));
-                goto CLEANUP;
-        }
-
-        /* A = qx * pz^2, B = qy * pz^3 */
-        MP_CHECKOK(group->meth->field_sqr(pz, A, group->meth));
-        MP_CHECKOK(group->meth->field_mul(A, pz, B, group->meth));
-        MP_CHECKOK(group->meth->field_mul(A, qx, A, group->meth));
-        MP_CHECKOK(group->meth->field_mul(B, qy, B, group->meth));
-
-        /* C = A - px, D = B - py */
-        MP_CHECKOK(group->meth->field_sub(A, px, C, group->meth));
-        MP_CHECKOK(group->meth->field_sub(B, py, D, group->meth));
-
-        /* C2 = C^2, C3 = C^3 */
-        MP_CHECKOK(group->meth->field_sqr(C, C2, group->meth));
-        MP_CHECKOK(group->meth->field_mul(C, C2, C3, group->meth));
-
-        /* rz = pz * C */
-        MP_CHECKOK(group->meth->field_mul(pz, C, rz, group->meth));
-
-        /* C = px * C^2 */
-        MP_CHECKOK(group->meth->field_mul(px, C2, C, group->meth));
-        /* A = D^2 */
-        MP_CHECKOK(group->meth->field_sqr(D, A, group->meth));
-
-        /* rx = D^2 - (C^3 + 2 * (px * C^2)) */
-        MP_CHECKOK(group->meth->field_add(C, C, rx, group->meth));
-        MP_CHECKOK(group->meth->field_add(C3, rx, rx, group->meth));
-        MP_CHECKOK(group->meth->field_sub(A, rx, rx, group->meth));
-
-        /* C3 = py * C^3 */
-        MP_CHECKOK(group->meth->field_mul(py, C3, C3, group->meth));
-
-        /* ry = D * (px * C^2 - rx) - py * C^3 */
-        MP_CHECKOK(group->meth->field_sub(C, rx, ry, group->meth));
-        MP_CHECKOK(group->meth->field_mul(D, ry, ry, group->meth));
-        MP_CHECKOK(group->meth->field_sub(ry, C3, ry, group->meth));
-
-        /* raz4 = a * rz^4 */
-        MP_CHECKOK(group->meth->field_sqr(rz, raz4, group->meth));
-        MP_CHECKOK(group->meth->field_sqr(raz4, raz4, group->meth));
-        MP_CHECKOK(group->meth->
-                           field_mul(raz4, &group->curvea, raz4, group->meth));
-CLEANUP:
-        return res;
-}
-
-/* Computes R = nP where R is (rx, ry) and P is the base point. Elliptic
- * curve points P and R can be identical. Uses mixed Modified-Jacobian
- * co-ordinates for doubling and Chudnovsky Jacobian coordinates for
- * additions. Assumes input is already field-encoded using field_enc, and
- * returns output that is still field-encoded. Uses 5-bit window NAF
- * method (algorithm 11) for scalar-point multiplication from Brown,
- * Hankerson, Lopez, Menezes. Software Implementation of the NIST Elliptic
- * Curves Over Prime Fields. */
-mp_err
-ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py,
-                                          mp_int *rx, mp_int *ry, const ECGroup *group)
-{
-        mp_err res = MP_OKAY;
-        mp_int precomp[16][2], rz, tpx, tpy;
-        mp_int raz4;
-        mp_int scratch[MAX_SCRATCH];
-        signed char *naf = NULL;
-        int i, orderBitSize;
-
-        MP_DIGITS(&rz) = 0;
-        MP_DIGITS(&raz4) = 0;
-        MP_DIGITS(&tpx) = 0;
-        MP_DIGITS(&tpy) = 0;
-        for (i = 0; i < 16; i++) {
-                MP_DIGITS(&precomp[i][0]) = 0;
-                MP_DIGITS(&precomp[i][1]) = 0;
-        }
-        for (i = 0; i < MAX_SCRATCH; i++) {
-                MP_DIGITS(&scratch[i]) = 0;
-        }
-
-        ARGCHK(group != NULL, MP_BADARG);
-        ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG);
-
-        /* initialize precomputation table */
-        MP_CHECKOK(mp_init(&tpx, FLAG(n)));
-        MP_CHECKOK(mp_init(&tpy, FLAG(n)));;
-        MP_CHECKOK(mp_init(&rz, FLAG(n)));
-        MP_CHECKOK(mp_init(&raz4, FLAG(n)));
-
-        for (i = 0; i < 16; i++) {
-                MP_CHECKOK(mp_init(&precomp[i][0], FLAG(n)));
-                MP_CHECKOK(mp_init(&precomp[i][1], FLAG(n)));
-        }
-        for (i = 0; i < MAX_SCRATCH; i++) {
-                MP_CHECKOK(mp_init(&scratch[i], FLAG(n)));
-        }
-
-        /* Set out[8] = P */
-        MP_CHECKOK(mp_copy(px, &precomp[8][0]));
-        MP_CHECKOK(mp_copy(py, &precomp[8][1]));
-
-        /* Set (tpx, tpy) = 2P */
-        MP_CHECKOK(group->
-                           point_dbl(&precomp[8][0], &precomp[8][1], &tpx, &tpy,
-                                                 group));
-
-        /* Set 3P, 5P, ..., 15P */
-        for (i = 8; i < 15; i++) {
-                MP_CHECKOK(group->
-                                   point_add(&precomp[i][0], &precomp[i][1], &tpx, &tpy,
-                                                         &precomp[i + 1][0], &precomp[i + 1][1],
-                                                         group));
-        }
-
-        /* Set -15P, -13P, ..., -P */
-        for (i = 0; i < 8; i++) {
-                MP_CHECKOK(mp_copy(&precomp[15 - i][0], &precomp[i][0]));
-                MP_CHECKOK(group->meth->
-                                   field_neg(&precomp[15 - i][1], &precomp[i][1],
-                                                         group->meth));
-        }
-
-        /* R = inf */
-        MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz));
-
-        orderBitSize = mpl_significant_bits(&group->order);
-
-        /* Allocate memory for NAF */
-#ifdef _KERNEL
-        naf = (signed char *) kmem_alloc((orderBitSize + 1), FLAG(n));
-#else
-        naf = (signed char *) malloc(sizeof(signed char) * (orderBitSize + 1));
-        if (naf == NULL) {
-                res = MP_MEM;
-                goto CLEANUP;
-        }
-#endif
-
-        /* Compute 5NAF */
-        ec_compute_wNAF(naf, orderBitSize, n, 5);
-
-        /* wNAF method */
-        for (i = orderBitSize; i >= 0; i--) {
-                /* R = 2R */
-                ec_GFp_pt_dbl_jm(rx, ry, &rz, &raz4, rx, ry, &rz,
-                                             &raz4, scratch, group);
-                if (naf[i] != 0) {
-                        ec_GFp_pt_add_jm_aff(rx, ry, &rz, &raz4,
-                                                                 &precomp[(naf[i] + 15) / 2][0],
-                                                                 &precomp[(naf[i] + 15) / 2][1], rx, ry,
-                                                                 &rz, &raz4, scratch, group);
-                }
-        }
-
-        /* convert result S to affine coordinates */
-        MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
-
-  CLEANUP:
-        for (i = 0; i < MAX_SCRATCH; i++) {
-                mp_clear(&scratch[i]);
-        }
-        for (i = 0; i < 16; i++) {
-                mp_clear(&precomp[i][0]);
-                mp_clear(&precomp[i][1]);
-        }
-        mp_clear(&tpx);
-        mp_clear(&tpy);
-        mp_clear(&rz);
-        mp_clear(&raz4);
-#ifdef _KERNEL
-        kmem_free(naf, (orderBitSize + 1));
-#else
-        free(naf);
-#endif
-        return res;
-}
--- a/jdk/src/share/native/sun/security/ec/ecp_mont.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* Uses Montgomery reduction for field arithmetic.  See mpi/mpmontg.c for
- * code implementation. */
-
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#include "ecl-priv.h"
-#include "ecp.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <stdio.h>
-#endif
-
-/* Construct a generic GFMethod for arithmetic over prime fields with
- * irreducible irr. */
-GFMethod *
-GFMethod_consGFp_mont(const mp_int *irr)
-{
-        mp_err res = MP_OKAY;
-        int i;
-        GFMethod *meth = NULL;
-        mp_mont_modulus *mmm;
-
-        meth = GFMethod_consGFp(irr);
-        if (meth == NULL)
-                return NULL;
-
-#ifdef _KERNEL
-        mmm = (mp_mont_modulus *) kmem_alloc(sizeof(mp_mont_modulus),
-            FLAG(irr));
-#else
-        mmm = (mp_mont_modulus *) malloc(sizeof(mp_mont_modulus));
-#endif
-        if (mmm == NULL) {
-                res = MP_MEM;
-                goto CLEANUP;
-        }
-
-        meth->field_mul = &ec_GFp_mul_mont;
-        meth->field_sqr = &ec_GFp_sqr_mont;
-        meth->field_div = &ec_GFp_div_mont;
-        meth->field_enc = &ec_GFp_enc_mont;
-        meth->field_dec = &ec_GFp_dec_mont;
-        meth->extra1 = mmm;
-        meth->extra2 = NULL;
-        meth->extra_free = &ec_GFp_extra_free_mont;
-
-        mmm->N = meth->irr;
-        i = mpl_significant_bits(&meth->irr);
-        i += MP_DIGIT_BIT - 1;
-        mmm->b = i - i % MP_DIGIT_BIT;
-        mmm->n0prime = 0 - s_mp_invmod_radix(MP_DIGIT(&meth->irr, 0));
-
-  CLEANUP:
-        if (res != MP_OKAY) {
-                GFMethod_free(meth);
-                return NULL;
-        }
-        return meth;
-}
-
-/* Wrapper functions for generic prime field arithmetic. */
-
-/* Field multiplication using Montgomery reduction. */
-mp_err
-ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r,
-                                const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-#ifdef MP_MONT_USE_MP_MUL
-        /* if MP_MONT_USE_MP_MUL is defined, then the function s_mp_mul_mont
-         * is not implemented and we have to use mp_mul and s_mp_redc directly
-         */
-        MP_CHECKOK(mp_mul(a, b, r));
-        MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1));
-#else
-        mp_int s;
-
-        MP_DIGITS(&s) = 0;
-        /* s_mp_mul_mont doesn't allow source and destination to be the same */
-        if ((a == r) || (b == r)) {
-                MP_CHECKOK(mp_init(&s, FLAG(a)));
-                MP_CHECKOK(s_mp_mul_mont
-                                   (a, b, &s, (mp_mont_modulus *) meth->extra1));
-                MP_CHECKOK(mp_copy(&s, r));
-                mp_clear(&s);
-        } else {
-                return s_mp_mul_mont(a, b, r, (mp_mont_modulus *) meth->extra1);
-        }
-#endif
-  CLEANUP:
-        return res;
-}
-
-/* Field squaring using Montgomery reduction. */
-mp_err
-ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        return ec_GFp_mul_mont(a, a, r, meth);
-}
-
-/* Field division using Montgomery reduction. */
-mp_err
-ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r,
-                                const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        /* if A=aZ represents a encoded in montgomery coordinates with Z and #
-         * and \ respectively represent multiplication and division in
-         * montgomery coordinates, then A\B = (a/b)Z = (A/B)Z and Binv =
-         * (1/b)Z = (1/B)(Z^2) where B # Binv = Z */
-        MP_CHECKOK(ec_GFp_div(a, b, r, meth));
-        MP_CHECKOK(ec_GFp_enc_mont(r, r, meth));
-        if (a == NULL) {
-                MP_CHECKOK(ec_GFp_enc_mont(r, r, meth));
-        }
-  CLEANUP:
-        return res;
-}
-
-/* Encode a field element in Montgomery form. See s_mp_to_mont in
- * mpi/mpmontg.c */
-mp_err
-ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_mont_modulus *mmm;
-        mp_err res = MP_OKAY;
-
-        mmm = (mp_mont_modulus *) meth->extra1;
-        MP_CHECKOK(mpl_lsh(a, r, mmm->b));
-        MP_CHECKOK(mp_mod(r, &mmm->N, r));
-  CLEANUP:
-        return res;
-}
-
-/* Decode a field element from Montgomery form. */
-mp_err
-ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
-        mp_err res = MP_OKAY;
-
-        if (a != r) {
-                MP_CHECKOK(mp_copy(a, r));
-        }
-        MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1));
-  CLEANUP:
-        return res;
-}
-
-/* Free the memory allocated to the extra fields of Montgomery GFMethod
- * object. */
-void
-ec_GFp_extra_free_mont(GFMethod *meth)
-{
-        if (meth->extra1 != NULL) {
-#ifdef _KERNEL
-                kmem_free(meth->extra1, sizeof(mp_mont_modulus));
-#else
-                free(meth->extra1);
-#endif
-                meth->extra1 = NULL;
-        }
-}
--- a/jdk/src/share/native/sun/security/ec/logtab.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LOGTAB_H
-#define _LOGTAB_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-const float s_logv_2[] = {
-   0.000000000f, 0.000000000f, 1.000000000f, 0.630929754f,  /*  0  1  2  3 */
-   0.500000000f, 0.430676558f, 0.386852807f, 0.356207187f,  /*  4  5  6  7 */
-   0.333333333f, 0.315464877f, 0.301029996f, 0.289064826f,  /*  8  9 10 11 */
-   0.278942946f, 0.270238154f, 0.262649535f, 0.255958025f,  /* 12 13 14 15 */
-   0.250000000f, 0.244650542f, 0.239812467f, 0.235408913f,  /* 16 17 18 19 */
-   0.231378213f, 0.227670249f, 0.224243824f, 0.221064729f,  /* 20 21 22 23 */
-   0.218104292f, 0.215338279f, 0.212746054f, 0.210309918f,  /* 24 25 26 27 */
-   0.208014598f, 0.205846832f, 0.203795047f, 0.201849087f,  /* 28 29 30 31 */
-   0.200000000f, 0.198239863f, 0.196561632f, 0.194959022f,  /* 32 33 34 35 */
-   0.193426404f, 0.191958720f, 0.190551412f, 0.189200360f,  /* 36 37 38 39 */
-   0.187901825f, 0.186652411f, 0.185449023f, 0.184288833f,  /* 40 41 42 43 */
-   0.183169251f, 0.182087900f, 0.181042597f, 0.180031327f,  /* 44 45 46 47 */
-   0.179052232f, 0.178103594f, 0.177183820f, 0.176291434f,  /* 48 49 50 51 */
-   0.175425064f, 0.174583430f, 0.173765343f, 0.172969690f,  /* 52 53 54 55 */
-   0.172195434f, 0.171441601f, 0.170707280f, 0.169991616f,  /* 56 57 58 59 */
-   0.169293808f, 0.168613099f, 0.167948779f, 0.167300179f,  /* 60 61 62 63 */
-   0.166666667f
-};
-
-#endif /* _LOGTAB_H */
--- a/jdk/src/share/native/sun/security/ec/mp_gf2m-priv.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang Shantz <sheueling.chang@sun.com> and
- *   Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MP_GF2M_PRIV_H_
-#define _MP_GF2M_PRIV_H_
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mpi-priv.h"
-
-extern const mp_digit mp_gf2m_sqr_tb[16];
-
-#if defined(MP_USE_UINT_DIGIT)
-#define MP_DIGIT_BITS 32
-#else
-#define MP_DIGIT_BITS 64
-#endif
-
-/* Platform-specific macros for fast binary polynomial squaring. */
-#if MP_DIGIT_BITS == 32
-#define gf2m_SQR1(w) \
-    mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 16 | \
-    mp_gf2m_sqr_tb[(w) >> 20 & 0xF] <<  8 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF]
-#define gf2m_SQR0(w) \
-    mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >>  8 & 0xF] << 16 | \
-    mp_gf2m_sqr_tb[(w) >>  4 & 0xF] <<  8 | mp_gf2m_sqr_tb[(w)       & 0xF]
-#else
-#define gf2m_SQR1(w) \
-    mp_gf2m_sqr_tb[(w) >> 60 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 56 & 0xF] << 48 | \
-    mp_gf2m_sqr_tb[(w) >> 52 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 48 & 0xF] << 32 | \
-    mp_gf2m_sqr_tb[(w) >> 44 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 40 & 0xF] << 16 | \
-    mp_gf2m_sqr_tb[(w) >> 36 & 0xF] <<  8 | mp_gf2m_sqr_tb[(w) >> 32 & 0xF]
-#define gf2m_SQR0(w) \
-    mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 48 | \
-    mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF] << 32 | \
-    mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >>  8 & 0xF] << 16 | \
-    mp_gf2m_sqr_tb[(w) >>  4 & 0xF] <<  8 | mp_gf2m_sqr_tb[(w)       & 0xF]
-#endif
-
-/* Multiply two binary polynomials mp_digits a, b.
- * Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1.
- * Output in two mp_digits rh, rl.
- */
-void s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b);
-
-/* Compute xor-multiply of two binary polynomials  (a1, a0) x (b1, b0)
- * result is a binary polynomial in 4 mp_digits r[4].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1,
-        const mp_digit b0);
-
-/* Compute xor-multiply of two binary polynomials  (a2, a1, a0) x (b2, b1, b0)
- * result is a binary polynomial in 6 mp_digits r[6].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0,
-        const mp_digit b2, const mp_digit b1, const mp_digit b0);
-
-/* Compute xor-multiply of two binary polynomials  (a3, a2, a1, a0) x (b3, b2, b1, b0)
- * result is a binary polynomial in 8 mp_digits r[8].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1,
-        const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1,
-        const mp_digit b0);
-
-#endif /* _MP_GF2M_PRIV_H_ */
--- a/jdk/src/share/native/sun/security/ec/mp_gf2m.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,624 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang Shantz <sheueling.chang@sun.com> and
- *   Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-
-const mp_digit mp_gf2m_sqr_tb[16] =
-{
-      0,     1,     4,     5,    16,    17,    20,    21,
-     64,    65,    68,    69,    80,    81,    84,    85
-};
-
-/* Multiply two binary polynomials mp_digits a, b.
- * Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1.
- * Output in two mp_digits rh, rl.
- */
-#if MP_DIGIT_BITS == 32
-void
-s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
-{
-    register mp_digit h, l, s;
-    mp_digit tab[8], top2b = a >> 30;
-    register mp_digit a1, a2, a4;
-
-    a1 = a & (0x3FFFFFFF); a2 = a1 << 1; a4 = a2 << 1;
-
-    tab[0] =  0; tab[1] = a1;    tab[2] = a2;    tab[3] = a1^a2;
-    tab[4] = a4; tab[5] = a1^a4; tab[6] = a2^a4; tab[7] = a1^a2^a4;
-
-    s = tab[b       & 0x7]; l  = s;
-    s = tab[b >>  3 & 0x7]; l ^= s <<  3; h  = s >> 29;
-    s = tab[b >>  6 & 0x7]; l ^= s <<  6; h ^= s >> 26;
-    s = tab[b >>  9 & 0x7]; l ^= s <<  9; h ^= s >> 23;
-    s = tab[b >> 12 & 0x7]; l ^= s << 12; h ^= s >> 20;
-    s = tab[b >> 15 & 0x7]; l ^= s << 15; h ^= s >> 17;
-    s = tab[b >> 18 & 0x7]; l ^= s << 18; h ^= s >> 14;
-    s = tab[b >> 21 & 0x7]; l ^= s << 21; h ^= s >> 11;
-    s = tab[b >> 24 & 0x7]; l ^= s << 24; h ^= s >>  8;
-    s = tab[b >> 27 & 0x7]; l ^= s << 27; h ^= s >>  5;
-    s = tab[b >> 30      ]; l ^= s << 30; h ^= s >>  2;
-
-    /* compensate for the top two bits of a */
-
-    if (top2b & 01) { l ^= b << 30; h ^= b >> 2; }
-    if (top2b & 02) { l ^= b << 31; h ^= b >> 1; }
-
-    *rh = h; *rl = l;
-}
-#else
-void
-s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
-{
-    register mp_digit h, l, s;
-    mp_digit tab[16], top3b = a >> 61;
-    register mp_digit a1, a2, a4, a8;
-
-    a1 = a & (0x1FFFFFFFFFFFFFFFULL); a2 = a1 << 1;
-    a4 = a2 << 1; a8 = a4 << 1;
-    tab[ 0] = 0;     tab[ 1] = a1;       tab[ 2] = a2;       tab[ 3] = a1^a2;
-    tab[ 4] = a4;    tab[ 5] = a1^a4;    tab[ 6] = a2^a4;    tab[ 7] = a1^a2^a4;
-    tab[ 8] = a8;    tab[ 9] = a1^a8;    tab[10] = a2^a8;    tab[11] = a1^a2^a8;
-    tab[12] = a4^a8; tab[13] = a1^a4^a8; tab[14] = a2^a4^a8; tab[15] = a1^a2^a4^a8;
-
-    s = tab[b       & 0xF]; l  = s;
-    s = tab[b >>  4 & 0xF]; l ^= s <<  4; h  = s >> 60;
-    s = tab[b >>  8 & 0xF]; l ^= s <<  8; h ^= s >> 56;
-    s = tab[b >> 12 & 0xF]; l ^= s << 12; h ^= s >> 52;
-    s = tab[b >> 16 & 0xF]; l ^= s << 16; h ^= s >> 48;
-    s = tab[b >> 20 & 0xF]; l ^= s << 20; h ^= s >> 44;
-    s = tab[b >> 24 & 0xF]; l ^= s << 24; h ^= s >> 40;
-    s = tab[b >> 28 & 0xF]; l ^= s << 28; h ^= s >> 36;
-    s = tab[b >> 32 & 0xF]; l ^= s << 32; h ^= s >> 32;
-    s = tab[b >> 36 & 0xF]; l ^= s << 36; h ^= s >> 28;
-    s = tab[b >> 40 & 0xF]; l ^= s << 40; h ^= s >> 24;
-    s = tab[b >> 44 & 0xF]; l ^= s << 44; h ^= s >> 20;
-    s = tab[b >> 48 & 0xF]; l ^= s << 48; h ^= s >> 16;
-    s = tab[b >> 52 & 0xF]; l ^= s << 52; h ^= s >> 12;
-    s = tab[b >> 56 & 0xF]; l ^= s << 56; h ^= s >>  8;
-    s = tab[b >> 60      ]; l ^= s << 60; h ^= s >>  4;
-
-    /* compensate for the top three bits of a */
-
-    if (top3b & 01) { l ^= b << 61; h ^= b >> 3; }
-    if (top3b & 02) { l ^= b << 62; h ^= b >> 2; }
-    if (top3b & 04) { l ^= b << 63; h ^= b >> 1; }
-
-    *rh = h; *rl = l;
-}
-#endif
-
-/* Compute xor-multiply of two binary polynomials  (a1, a0) x (b1, b0)
- * result is a binary polynomial in 4 mp_digits r[4].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void
-s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1,
-           const mp_digit b0)
-{
-    mp_digit m1, m0;
-    /* r[3] = h1, r[2] = h0; r[1] = l1; r[0] = l0 */
-    s_bmul_1x1(r+3, r+2, a1, b1);
-    s_bmul_1x1(r+1, r, a0, b0);
-    s_bmul_1x1(&m1, &m0, a0 ^ a1, b0 ^ b1);
-    /* Correction on m1 ^= l1 ^ h1; m0 ^= l0 ^ h0; */
-    r[2] ^= m1 ^ r[1] ^ r[3];  /* h0 ^= m1 ^ l1 ^ h1; */
-    r[1]  = r[3] ^ r[2] ^ r[0] ^ m1 ^ m0;  /* l1 ^= l0 ^ h0 ^ m0; */
-}
-
-/* Compute xor-multiply of two binary polynomials  (a2, a1, a0) x (b2, b1, b0)
- * result is a binary polynomial in 6 mp_digits r[6].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void
-s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0,
-        const mp_digit b2, const mp_digit b1, const mp_digit b0)
-{
-        mp_digit zm[4];
-
-        s_bmul_1x1(r+5, r+4, a2, b2);         /* fill top 2 words */
-        s_bmul_2x2(zm, a1, a2^a0, b1, b2^b0); /* fill middle 4 words */
-        s_bmul_2x2(r, a1, a0, b1, b0);        /* fill bottom 4 words */
-
-        zm[3] ^= r[3];
-        zm[2] ^= r[2];
-        zm[1] ^= r[1] ^ r[5];
-        zm[0] ^= r[0] ^ r[4];
-
-        r[5]  ^= zm[3];
-        r[4]  ^= zm[2];
-        r[3]  ^= zm[1];
-        r[2]  ^= zm[0];
-}
-
-/* Compute xor-multiply of two binary polynomials  (a3, a2, a1, a0) x (b3, b2, b1, b0)
- * result is a binary polynomial in 8 mp_digits r[8].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1,
-        const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1,
-        const mp_digit b0)
-{
-        mp_digit zm[4];
-
-        s_bmul_2x2(r+4, a3, a2, b3, b2);            /* fill top 4 words */
-        s_bmul_2x2(zm, a3^a1, a2^a0, b3^b1, b2^b0); /* fill middle 4 words */
-        s_bmul_2x2(r, a1, a0, b1, b0);              /* fill bottom 4 words */
-
-        zm[3] ^= r[3] ^ r[7];
-        zm[2] ^= r[2] ^ r[6];
-        zm[1] ^= r[1] ^ r[5];
-        zm[0] ^= r[0] ^ r[4];
-
-        r[5]  ^= zm[3];
-        r[4]  ^= zm[2];
-        r[3]  ^= zm[1];
-        r[2]  ^= zm[0];
-}
-
-/* Compute addition of two binary polynomials a and b,
- * store result in c; c could be a or b, a and b could be equal;
- * c is the bitwise XOR of a and b.
- */
-mp_err
-mp_badd(const mp_int *a, const mp_int *b, mp_int *c)
-{
-    mp_digit *pa, *pb, *pc;
-    mp_size ix;
-    mp_size used_pa, used_pb;
-    mp_err res = MP_OKAY;
-
-    /* Add all digits up to the precision of b.  If b had more
-     * precision than a initially, swap a, b first
-     */
-    if (MP_USED(a) >= MP_USED(b)) {
-        pa = MP_DIGITS(a);
-        pb = MP_DIGITS(b);
-        used_pa = MP_USED(a);
-        used_pb = MP_USED(b);
-    } else {
-        pa = MP_DIGITS(b);
-        pb = MP_DIGITS(a);
-        used_pa = MP_USED(b);
-        used_pb = MP_USED(a);
-    }
-
-    /* Make sure c has enough precision for the output value */
-    MP_CHECKOK( s_mp_pad(c, used_pa) );
-
-    /* Do word-by-word xor */
-    pc = MP_DIGITS(c);
-    for (ix = 0; ix < used_pb; ix++) {
-        (*pc++) = (*pa++) ^ (*pb++);
-    }
-
-    /* Finish the rest of digits until we're actually done */
-    for (; ix < used_pa; ++ix) {
-        *pc++ = *pa++;
-    }
-
-    MP_USED(c) = used_pa;
-    MP_SIGN(c) = ZPOS;
-    s_mp_clamp(c);
-
-CLEANUP:
-    return res;
-}
-
-#define s_mp_div2(a) MP_CHECKOK( mpl_rsh((a), (a), 1) );
-
-/* Compute binary polynomial multiply d = a * b */
-static void
-s_bmul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
-{
-    mp_digit a_i, a0b0, a1b1, carry = 0;
-    while (a_len--) {
-        a_i = *a++;
-        s_bmul_1x1(&a1b1, &a0b0, a_i, b);
-        *d++ = a0b0 ^ carry;
-        carry = a1b1;
-    }
-    *d = carry;
-}
-
-/* Compute binary polynomial xor multiply accumulate d ^= a * b */
-static void
-s_bmul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
-{
-    mp_digit a_i, a0b0, a1b1, carry = 0;
-    while (a_len--) {
-        a_i = *a++;
-        s_bmul_1x1(&a1b1, &a0b0, a_i, b);
-        *d++ ^= a0b0 ^ carry;
-        carry = a1b1;
-    }
-    *d ^= carry;
-}
-
-/* Compute binary polynomial xor multiply c = a * b.
- * All parameters may be identical.
- */
-mp_err
-mp_bmul(const mp_int *a, const mp_int *b, mp_int *c)
-{
-    mp_digit *pb, b_i;
-    mp_int tmp;
-    mp_size ib, a_used, b_used;
-    mp_err res = MP_OKAY;
-
-    MP_DIGITS(&tmp) = 0;
-
-    ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-    if (a == c) {
-        MP_CHECKOK( mp_init_copy(&tmp, a) );
-        if (a == b)
-            b = &tmp;
-        a = &tmp;
-    } else if (b == c) {
-        MP_CHECKOK( mp_init_copy(&tmp, b) );
-        b = &tmp;
-    }
-
-    if (MP_USED(a) < MP_USED(b)) {
-        const mp_int *xch = b;      /* switch a and b if b longer */
-        b = a;
-        a = xch;
-    }
-
-    MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
-    MP_CHECKOK( s_mp_pad(c, USED(a) + USED(b)) );
-
-    pb = MP_DIGITS(b);
-    s_bmul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c));
-
-    /* Outer loop:  Digits of b */
-    a_used = MP_USED(a);
-    b_used = MP_USED(b);
-        MP_USED(c) = a_used + b_used;
-    for (ib = 1; ib < b_used; ib++) {
-        b_i = *pb++;
-
-        /* Inner product:  Digits of a */
-        if (b_i)
-            s_bmul_d_add(MP_DIGITS(a), a_used, b_i, MP_DIGITS(c) + ib);
-        else
-            MP_DIGIT(c, ib + a_used) = b_i;
-    }
-
-    s_mp_clamp(c);
-
-    SIGN(c) = ZPOS;
-
-CLEANUP:
-    mp_clear(&tmp);
-    return res;
-}
-
-
-/* Compute modular reduction of a and store result in r.
- * r could be a.
- * For modular arithmetic, the irreducible polynomial f(t) is represented
- * as an array of int[], where f(t) is of the form:
- *     f(t) = t^p[0] + t^p[1] + ... + t^p[k]
- * where m = p[0] > p[1] > ... > p[k] = 0.
- */
-mp_err
-mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r)
-{
-    int j, k;
-    int n, dN, d0, d1;
-    mp_digit zz, *z, tmp;
-    mp_size used;
-    mp_err res = MP_OKAY;
-
-    /* The algorithm does the reduction in place in r,
-     * if a != r, copy a into r first so reduction can be done in r
-     */
-    if (a != r) {
-        MP_CHECKOK( mp_copy(a, r) );
-    }
-    z = MP_DIGITS(r);
-
-    /* start reduction */
-    dN = p[0] / MP_DIGIT_BITS;
-    used = MP_USED(r);
-
-    for (j = used - 1; j > dN;) {
-
-        zz = z[j];
-        if (zz == 0) {
-            j--; continue;
-        }
-        z[j] = 0;
-
-        for (k = 1; p[k] > 0; k++) {
-            /* reducing component t^p[k] */
-            n = p[0] - p[k];
-            d0 = n % MP_DIGIT_BITS;
-            d1 = MP_DIGIT_BITS - d0;
-            n /= MP_DIGIT_BITS;
-            z[j-n] ^= (zz>>d0);
-            if (d0)
-                z[j-n-1] ^= (zz<<d1);
-        }
-
-        /* reducing component t^0 */
-        n = dN;
-        d0 = p[0] % MP_DIGIT_BITS;
-        d1 = MP_DIGIT_BITS - d0;
-        z[j-n] ^= (zz >> d0);
-        if (d0)
-            z[j-n-1] ^= (zz << d1);
-
-    }
-
-    /* final round of reduction */
-    while (j == dN) {
-
-        d0 = p[0] % MP_DIGIT_BITS;
-        zz = z[dN] >> d0;
-        if (zz == 0) break;
-        d1 = MP_DIGIT_BITS - d0;
-
-        /* clear up the top d1 bits */
-        if (d0) z[dN] = (z[dN] << d1) >> d1;
-        *z ^= zz; /* reduction t^0 component */
-
-        for (k = 1; p[k] > 0; k++) {
-            /* reducing component t^p[k]*/
-            n = p[k] / MP_DIGIT_BITS;
-            d0 = p[k] % MP_DIGIT_BITS;
-            d1 = MP_DIGIT_BITS - d0;
-            z[n] ^= (zz << d0);
-            tmp = zz >> d1;
-            if (d0 && tmp)
-                z[n+1] ^= tmp;
-        }
-    }
-
-    s_mp_clamp(r);
-CLEANUP:
-    return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p,
- * Store the result in r.  r could be a or b; a could be b.
- */
-mp_err
-mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], mp_int *r)
-{
-    mp_err res;
-
-    if (a == b) return mp_bsqrmod(a, p, r);
-    if ((res = mp_bmul(a, b, r) ) != MP_OKAY)
-        return res;
-    return mp_bmod(r, p, r);
-}
-
-/* Compute binary polynomial squaring c = a*a mod p .
- * Parameter r and a can be identical.
- */
-
-mp_err
-mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r)
-{
-    mp_digit *pa, *pr, a_i;
-    mp_int tmp;
-    mp_size ia, a_used;
-    mp_err res;
-
-    ARGCHK(a != NULL && r != NULL, MP_BADARG);
-    MP_DIGITS(&tmp) = 0;
-
-    if (a == r) {
-        MP_CHECKOK( mp_init_copy(&tmp, a) );
-        a = &tmp;
-    }
-
-    MP_USED(r) = 1; MP_DIGIT(r, 0) = 0;
-    MP_CHECKOK( s_mp_pad(r, 2*USED(a)) );
-
-    pa = MP_DIGITS(a);
-    pr = MP_DIGITS(r);
-    a_used = MP_USED(a);
-        MP_USED(r) = 2 * a_used;
-
-    for (ia = 0; ia < a_used; ia++) {
-        a_i = *pa++;
-        *pr++ = gf2m_SQR0(a_i);
-        *pr++ = gf2m_SQR1(a_i);
-    }
-
-    MP_CHECKOK( mp_bmod(r, p, r) );
-    s_mp_clamp(r);
-    SIGN(r) = ZPOS;
-
-CLEANUP:
-    mp_clear(&tmp);
-    return res;
-}
-
-/* Compute binary polynomial y/x mod p, y divided by x, reduce modulo p.
- * Store the result in r. r could be x or y, and x could equal y.
- * Uses algorithm Modular_Division_GF(2^m) from
- *     Chang-Shantz, S.  "From Euclid's GCD to Montgomery Multiplication to
- *     the Great Divide".
- */
-int
-mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
-    const unsigned int p[], mp_int *r)
-{
-    mp_int aa, bb, uu;
-    mp_int *a, *b, *u, *v;
-    mp_err res = MP_OKAY;
-
-    MP_DIGITS(&aa) = 0;
-    MP_DIGITS(&bb) = 0;
-    MP_DIGITS(&uu) = 0;
-
-    MP_CHECKOK( mp_init_copy(&aa, x) );
-    MP_CHECKOK( mp_init_copy(&uu, y) );
-    MP_CHECKOK( mp_init_copy(&bb, pp) );
-    MP_CHECKOK( s_mp_pad(r, USED(pp)) );
-    MP_USED(r) = 1; MP_DIGIT(r, 0) = 0;
-
-    a = &aa; b= &bb; u=&uu; v=r;
-    /* reduce x and y mod p */
-    MP_CHECKOK( mp_bmod(a, p, a) );
-    MP_CHECKOK( mp_bmod(u, p, u) );
-
-    while (!mp_isodd(a)) {
-        s_mp_div2(a);
-        if (mp_isodd(u)) {
-            MP_CHECKOK( mp_badd(u, pp, u) );
-        }
-        s_mp_div2(u);
-    }
-
-    do {
-        if (mp_cmp_mag(b, a) > 0) {
-            MP_CHECKOK( mp_badd(b, a, b) );
-            MP_CHECKOK( mp_badd(v, u, v) );
-            do {
-                s_mp_div2(b);
-                if (mp_isodd(v)) {
-                    MP_CHECKOK( mp_badd(v, pp, v) );
-                }
-                s_mp_div2(v);
-            } while (!mp_isodd(b));
-        }
-        else if ((MP_DIGIT(a,0) == 1) && (MP_USED(a) == 1))
-            break;
-        else {
-            MP_CHECKOK( mp_badd(a, b, a) );
-            MP_CHECKOK( mp_badd(u, v, u) );
-            do {
-                s_mp_div2(a);
-                if (mp_isodd(u)) {
-                    MP_CHECKOK( mp_badd(u, pp, u) );
-                }
-                s_mp_div2(u);
-            } while (!mp_isodd(a));
-        }
-    } while (1);
-
-    MP_CHECKOK( mp_copy(u, r) );
-
-CLEANUP:
-    /* XXX this appears to be a memory leak in the NSS code */
-    mp_clear(&aa);
-    mp_clear(&bb);
-    mp_clear(&uu);
-    return res;
-
-}
-
-/* Convert the bit-string representation of a polynomial a into an array
- * of integers corresponding to the bits with non-zero coefficient.
- * Up to max elements of the array will be filled.  Return value is total
- * number of coefficients that would be extracted if array was large enough.
- */
-int
-mp_bpoly2arr(const mp_int *a, unsigned int p[], int max)
-{
-    int i, j, k;
-    mp_digit top_bit, mask;
-
-    top_bit = 1;
-    top_bit <<= MP_DIGIT_BIT - 1;
-
-    for (k = 0; k < max; k++) p[k] = 0;
-    k = 0;
-
-    for (i = MP_USED(a) - 1; i >= 0; i--) {
-        mask = top_bit;
-        for (j = MP_DIGIT_BIT - 1; j >= 0; j--) {
-            if (MP_DIGITS(a)[i] & mask) {
-                if (k < max) p[k] = MP_DIGIT_BIT * i + j;
-                k++;
-            }
-            mask >>= 1;
-        }
-    }
-
-    return k;
-}
-
-/* Convert the coefficient array representation of a polynomial to a
- * bit-string.  The array must be terminated by 0.
- */
-mp_err
-mp_barr2poly(const unsigned int p[], mp_int *a)
-{
-
-    mp_err res = MP_OKAY;
-    int i;
-
-    mp_zero(a);
-    for (i = 0; p[i] > 0; i++) {
-        MP_CHECKOK( mpl_set_bit(a, p[i], 1) );
-    }
-    MP_CHECKOK( mpl_set_bit(a, 0, 1) );
-
-CLEANUP:
-    return res;
-}
--- a/jdk/src/share/native/sun/security/ec/mp_gf2m.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang Shantz <sheueling.chang@sun.com> and
- *   Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MP_GF2M_H_
-#define _MP_GF2M_H_
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mpi.h"
-
-mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c);
-
-/* For modular arithmetic, the irreducible polynomial f(t) is represented
- * as an array of int[], where f(t) is of the form:
- *     f(t) = t^p[0] + t^p[1] + ... + t^p[k]
- * where m = p[0] > p[1] > ... > p[k] = 0.
- */
-mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r);
-mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[],
-    mp_int *r);
-mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r);
-mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
-    const unsigned int p[], mp_int *r);
-
-int mp_bpoly2arr(const mp_int *a, unsigned int p[], int max);
-mp_err mp_barr2poly(const unsigned int p[], mp_int *a);
-
-#endif /* _MP_GF2M_H_ */
--- a/jdk/src/share/native/sun/security/ec/mpi-config.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1997
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Netscape Communications Corporation
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPI_CONFIG_H
-#define _MPI_CONFIG_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mpi-config.h,v 1.5 2004/04/25 15:03:10 gerv%gerv.net Exp $ */
-
-/*
-  For boolean options,
-  0 = no
-  1 = yes
-
-  Other options are documented individually.
-
- */
-
-#ifndef MP_IOFUNC
-#define MP_IOFUNC     0  /* include mp_print() ?                */
-#endif
-
-#ifndef MP_MODARITH
-#define MP_MODARITH   1  /* include modular arithmetic ?        */
-#endif
-
-#ifndef MP_NUMTH
-#define MP_NUMTH      1  /* include number theoretic functions? */
-#endif
-
-#ifndef MP_LOGTAB
-#define MP_LOGTAB     1  /* use table of logs instead of log()? */
-#endif
-
-#ifndef MP_MEMSET
-#define MP_MEMSET     1  /* use memset() to zero buffers?       */
-#endif
-
-#ifndef MP_MEMCPY
-#define MP_MEMCPY     1  /* use memcpy() to copy buffers?       */
-#endif
-
-#ifndef MP_CRYPTO
-#define MP_CRYPTO     1  /* erase memory on free?               */
-#endif
-
-#ifndef MP_ARGCHK
-/*
-  0 = no parameter checks
-  1 = runtime checks, continue execution and return an error to caller
-  2 = assertions; dump core on parameter errors
- */
-#ifdef DEBUG
-#define MP_ARGCHK     2  /* how to check input arguments        */
-#else
-#define MP_ARGCHK     1  /* how to check input arguments        */
-#endif
-#endif
-
-#ifndef MP_DEBUG
-#define MP_DEBUG      0  /* print diagnostic output?            */
-#endif
-
-#ifndef MP_DEFPREC
-#define MP_DEFPREC    64 /* default precision, in digits        */
-#endif
-
-#ifndef MP_MACRO
-#define MP_MACRO      0  /* use macros for frequent calls?      */
-#endif
-
-#ifndef MP_SQUARE
-#define MP_SQUARE     1  /* use separate squaring code?         */
-#endif
-
-#endif /* _MPI_CONFIG_H */
--- a/jdk/src/share/native/sun/security/ec/mpi-priv.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *  Arbitrary precision integer arithmetic library
- *
- *  NOTE WELL: the content of this header file is NOT part of the "public"
- *  API for the MPI library, and may change at any time.
- *  Application programs that use libmpi should NOT include this header file.
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Netscape Communications Corporation
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPI_PRIV_H
-#define _MPI_PRIV_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mpi-priv.h,v 1.20 2005/11/22 07:16:43 relyea%netscape.com Exp $ */
-
-#include "mpi.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#endif /* _KERNEL */
-
-#if MP_DEBUG
-#include <stdio.h>
-
-#define DIAG(T,V) {fprintf(stderr,T);mp_print(V,stderr);fputc('\n',stderr);}
-#else
-#define DIAG(T,V)
-#endif
-
-/* If we aren't using a wired-in logarithm table, we need to include
-   the math library to get the log() function
- */
-
-/* {{{ s_logv_2[] - log table for 2 in various bases */
-
-#if MP_LOGTAB
-/*
-  A table of the logs of 2 for various bases (the 0 and 1 entries of
-  this table are meaningless and should not be referenced).
-
-  This table is used to compute output lengths for the mp_toradix()
-  function.  Since a number n in radix r takes up about log_r(n)
-  digits, we estimate the output size by taking the least integer
-  greater than log_r(n), where:
-
-  log_r(n) = log_2(n) * log_r(2)
-
-  This table, therefore, is a table of log_r(2) for 2 <= r <= 36,
-  which are the output bases supported.
- */
-
-extern const float s_logv_2[];
-#define LOG_V_2(R)  s_logv_2[(R)]
-
-#else
-
-/*
-   If MP_LOGTAB is not defined, use the math library to compute the
-   logarithms on the fly.  Otherwise, use the table.
-   Pick which works best for your system.
- */
-
-#include <math.h>
-#define LOG_V_2(R)  (log(2.0)/log(R))
-
-#endif /* if MP_LOGTAB */
-
-/* }}} */
-
-/* {{{ Digit arithmetic macros */
-
-/*
-  When adding and multiplying digits, the results can be larger than
-  can be contained in an mp_digit.  Thus, an mp_word is used.  These
-  macros mask off the upper and lower digits of the mp_word (the
-  mp_word may be more than 2 mp_digits wide, but we only concern
-  ourselves with the low-order 2 mp_digits)
- */
-
-#define  CARRYOUT(W)  (mp_digit)((W)>>DIGIT_BIT)
-#define  ACCUM(W)     (mp_digit)(W)
-
-#define MP_MIN(a,b)   (((a) < (b)) ? (a) : (b))
-#define MP_MAX(a,b)   (((a) > (b)) ? (a) : (b))
-#define MP_HOWMANY(a,b) (((a) + (b) - 1)/(b))
-#define MP_ROUNDUP(a,b) (MP_HOWMANY(a,b) * (b))
-
-/* }}} */
-
-/* {{{ Comparison constants */
-
-#define  MP_LT       -1
-#define  MP_EQ        0
-#define  MP_GT        1
-
-/* }}} */
-
-/* {{{ private function declarations */
-
-/*
-   If MP_MACRO is false, these will be defined as actual functions;
-   otherwise, suitable macro definitions will be used.  This works
-   around the fact that ANSI C89 doesn't support an 'inline' keyword
-   (although I hear C9x will ... about bloody time).  At present, the
-   macro definitions are identical to the function bodies, but they'll
-   expand in place, instead of generating a function call.
-
-   I chose these particular functions to be made into macros because
-   some profiling showed they are called a lot on a typical workload,
-   and yet they are primarily housekeeping.
- */
-#if MP_MACRO == 0
- void     s_mp_setz(mp_digit *dp, mp_size count); /* zero digits           */
- void     s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count); /* copy */
- void    *s_mp_alloc(size_t nb, size_t ni, int flag); /* general allocator    */
- void     s_mp_free(void *ptr, mp_size);          /* general free function */
-extern unsigned long mp_allocs;
-extern unsigned long mp_frees;
-extern unsigned long mp_copies;
-#else
-
- /* Even if these are defined as macros, we need to respect the settings
-    of the MP_MEMSET and MP_MEMCPY configuration options...
-  */
- #if MP_MEMSET == 0
-  #define  s_mp_setz(dp, count) \
-       {int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=0;}
- #else
-  #define  s_mp_setz(dp, count) memset(dp, 0, (count) * sizeof(mp_digit))
- #endif /* MP_MEMSET */
-
- #if MP_MEMCPY == 0
-  #define  s_mp_copy(sp, dp, count) \
-       {int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=(sp)[ix];}
- #else
-  #define  s_mp_copy(sp, dp, count) memcpy(dp, sp, (count) * sizeof(mp_digit))
- #endif /* MP_MEMCPY */
-
- #define  s_mp_alloc(nb, ni)  calloc(nb, ni)
- #define  s_mp_free(ptr) {if(ptr) free(ptr);}
-#endif /* MP_MACRO */
-
-mp_err   s_mp_grow(mp_int *mp, mp_size min);   /* increase allocated size */
-mp_err   s_mp_pad(mp_int *mp, mp_size min);    /* left pad with zeroes    */
-
-#if MP_MACRO == 0
- void     s_mp_clamp(mp_int *mp);               /* clip leading zeroes     */
-#else
- #define  s_mp_clamp(mp)\
-  { mp_size used = MP_USED(mp); \
-    while (used > 1 && DIGIT(mp, used - 1) == 0) --used; \
-    MP_USED(mp) = used; \
-  }
-#endif /* MP_MACRO */
-
-void     s_mp_exch(mp_int *a, mp_int *b);      /* swap a and b in place   */
-
-mp_err   s_mp_lshd(mp_int *mp, mp_size p);     /* left-shift by p digits  */
-void     s_mp_rshd(mp_int *mp, mp_size p);     /* right-shift by p digits */
-mp_err   s_mp_mul_2d(mp_int *mp, mp_digit d);  /* multiply by 2^d in place */
-void     s_mp_div_2d(mp_int *mp, mp_digit d);  /* divide by 2^d in place  */
-void     s_mp_mod_2d(mp_int *mp, mp_digit d);  /* modulo 2^d in place     */
-void     s_mp_div_2(mp_int *mp);               /* divide by 2 in place    */
-mp_err   s_mp_mul_2(mp_int *mp);               /* multiply by 2 in place  */
-mp_err   s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd);
-                                               /* normalize for division  */
-mp_err   s_mp_add_d(mp_int *mp, mp_digit d);   /* unsigned digit addition */
-mp_err   s_mp_sub_d(mp_int *mp, mp_digit d);   /* unsigned digit subtract */
-mp_err   s_mp_mul_d(mp_int *mp, mp_digit d);   /* unsigned digit multiply */
-mp_err   s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r);
-                                               /* unsigned digit divide   */
-mp_err   s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu);
-                                               /* Barrett reduction       */
-mp_err   s_mp_add(mp_int *a, const mp_int *b); /* magnitude addition      */
-mp_err   s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err   s_mp_sub(mp_int *a, const mp_int *b); /* magnitude subtract      */
-mp_err   s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err   s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset);
-                                               /* a += b * RADIX^offset   */
-mp_err   s_mp_mul(mp_int *a, const mp_int *b); /* magnitude multiply      */
-#if MP_SQUARE
-mp_err   s_mp_sqr(mp_int *a);                  /* magnitude square        */
-#else
-#define  s_mp_sqr(a) s_mp_mul(a, a)
-#endif
-mp_err   s_mp_div(mp_int *rem, mp_int *div, mp_int *quot); /* magnitude div */
-mp_err   s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err   s_mp_2expt(mp_int *a, mp_digit k);    /* a = 2^k                 */
-int      s_mp_cmp(const mp_int *a, const mp_int *b); /* magnitude comparison */
-int      s_mp_cmp_d(const mp_int *a, mp_digit d); /* magnitude digit compare */
-int      s_mp_ispow2(const mp_int *v);         /* is v a power of 2?      */
-int      s_mp_ispow2d(mp_digit d);             /* is d a power of 2?      */
-
-int      s_mp_tovalue(char ch, int r);          /* convert ch to value    */
-char     s_mp_todigit(mp_digit val, int r, int low); /* convert val to digit */
-int      s_mp_outlen(int bits, int r);          /* output length in bytes */
-mp_digit s_mp_invmod_radix(mp_digit P);   /* returns (P ** -1) mod RADIX */
-mp_err   s_mp_invmod_odd_m( const mp_int *a, const mp_int *m, mp_int *c);
-mp_err   s_mp_invmod_2d(    const mp_int *a, mp_size k,       mp_int *c);
-mp_err   s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c);
-
-#ifdef NSS_USE_COMBA
-
-#define IS_POWER_OF_2(a) ((a) && !((a) & ((a)-1)))
-
-void s_mp_mul_comba_4(const mp_int *A, const mp_int *B, mp_int *C);
-void s_mp_mul_comba_8(const mp_int *A, const mp_int *B, mp_int *C);
-void s_mp_mul_comba_16(const mp_int *A, const mp_int *B, mp_int *C);
-void s_mp_mul_comba_32(const mp_int *A, const mp_int *B, mp_int *C);
-
-void s_mp_sqr_comba_4(const mp_int *A, mp_int *B);
-void s_mp_sqr_comba_8(const mp_int *A, mp_int *B);
-void s_mp_sqr_comba_16(const mp_int *A, mp_int *B);
-void s_mp_sqr_comba_32(const mp_int *A, mp_int *B);
-
-#endif /* end NSS_USE_COMBA */
-
-/* ------ mpv functions, operate on arrays of digits, not on mp_int's ------ */
-#if defined (__OS2__) && defined (__IBMC__)
-#define MPI_ASM_DECL __cdecl
-#else
-#define MPI_ASM_DECL
-#endif
-
-#ifdef MPI_AMD64
-
-mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit);
-mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit);
-
-/* c = a * b */
-#define s_mpv_mul_d(a, a_len, b, c) \
-        ((unsigned long*)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
-
-/* c += a * b */
-#define s_mpv_mul_d_add(a, a_len, b, c) \
-        ((unsigned long*)c)[a_len] = s_mpv_mul_add_vec64(c, a, a_len, b)
-
-#else
-
-void     MPI_ASM_DECL s_mpv_mul_d(const mp_digit *a, mp_size a_len,
-                                        mp_digit b, mp_digit *c);
-void     MPI_ASM_DECL s_mpv_mul_d_add(const mp_digit *a, mp_size a_len,
-                                            mp_digit b, mp_digit *c);
-
-#endif
-
-void     MPI_ASM_DECL s_mpv_mul_d_add_prop(const mp_digit *a,
-                                                mp_size a_len, mp_digit b,
-                                                mp_digit *c);
-void     MPI_ASM_DECL s_mpv_sqr_add_prop(const mp_digit *a,
-                                                mp_size a_len,
-                                                mp_digit *sqrs);
-
-mp_err   MPI_ASM_DECL s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo,
-                            mp_digit divisor, mp_digit *quot, mp_digit *rem);
-
-/* c += a * b * (MP_RADIX ** offset);  */
-#define s_mp_mul_d_add_offset(a, b, c, off) \
-(s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off), MP_OKAY)
-
-typedef struct {
-  mp_int       N;       /* modulus N */
-  mp_digit     n0prime; /* n0' = - (n0 ** -1) mod MP_RADIX */
-  mp_size      b;       /* R == 2 ** b,  also b = # significant bits in N */
-} mp_mont_modulus;
-
-mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c,
-                       mp_mont_modulus *mmm);
-mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm);
-
-/*
- * s_mpi_getProcessorLineSize() returns the size in bytes of the cache line
- * if a cache exists, or zero if there is no cache. If more than one
- * cache line exists, it should return the smallest line size (which is
- * usually the L1 cache).
- *
- * mp_modexp uses this information to make sure that private key information
- * isn't being leaked through the cache.
- *
- * see mpcpucache.c for the implementation.
- */
-unsigned long s_mpi_getProcessorLineSize();
-
-/* }}} */
-#endif /* _MPI_PRIV_H */
--- a/jdk/src/share/native/sun/security/ec/mpi.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4886 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- *  Arbitrary precision integer arithmetic library
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Netscape Communications Corporation
- *   Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mpi.c,v 1.45 2006/09/29 20:12:21 alexei.volkov.bugs%sun.com Exp $ */
-
-#include "mpi-priv.h"
-#if defined(OSF1)
-#include <c_asm.h>
-#endif
-
-#if MP_LOGTAB
-/*
-  A table of the logs of 2 for various bases (the 0 and 1 entries of
-  this table are meaningless and should not be referenced).
-
-  This table is used to compute output lengths for the mp_toradix()
-  function.  Since a number n in radix r takes up about log_r(n)
-  digits, we estimate the output size by taking the least integer
-  greater than log_r(n), where:
-
-  log_r(n) = log_2(n) * log_r(2)
-
-  This table, therefore, is a table of log_r(2) for 2 <= r <= 36,
-  which are the output bases supported.
- */
-#include "logtab.h"
-#endif
-
-/* {{{ Constant strings */
-
-/* Constant strings returned by mp_strerror() */
-static const char *mp_err_string[] = {
-  "unknown result code",     /* say what?            */
-  "boolean true",            /* MP_OKAY, MP_YES      */
-  "boolean false",           /* MP_NO                */
-  "out of memory",           /* MP_MEM               */
-  "argument out of range",   /* MP_RANGE             */
-  "invalid input parameter", /* MP_BADARG            */
-  "result is undefined"      /* MP_UNDEF             */
-};
-
-/* Value to digit maps for radix conversion   */
-
-/* s_dmap_1 - standard digits and letters */
-static const char *s_dmap_1 =
-  "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
-
-/* }}} */
-
-unsigned long mp_allocs;
-unsigned long mp_frees;
-unsigned long mp_copies;
-
-/* {{{ Default precision manipulation */
-
-/* Default precision for newly created mp_int's      */
-static mp_size s_mp_defprec = MP_DEFPREC;
-
-mp_size mp_get_prec(void)
-{
-  return s_mp_defprec;
-
-} /* end mp_get_prec() */
-
-void         mp_set_prec(mp_size prec)
-{
-  if(prec == 0)
-    s_mp_defprec = MP_DEFPREC;
-  else
-    s_mp_defprec = prec;
-
-} /* end mp_set_prec() */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ mp_init(mp, kmflag) */
-
-/*
-  mp_init(mp, kmflag)
-
-  Initialize a new zero-valued mp_int.  Returns MP_OKAY if successful,
-  MP_MEM if memory could not be allocated for the structure.
- */
-
-mp_err mp_init(mp_int *mp, int kmflag)
-{
-  return mp_init_size(mp, s_mp_defprec, kmflag);
-
-} /* end mp_init() */
-
-/* }}} */
-
-/* {{{ mp_init_size(mp, prec, kmflag) */
-
-/*
-  mp_init_size(mp, prec, kmflag)
-
-  Initialize a new zero-valued mp_int with at least the given
-  precision; returns MP_OKAY if successful, or MP_MEM if memory could
-  not be allocated for the structure.
- */
-
-mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag)
-{
-  ARGCHK(mp != NULL && prec > 0, MP_BADARG);
-
-  prec = MP_ROUNDUP(prec, s_mp_defprec);
-  if((DIGITS(mp) = s_mp_alloc(prec, sizeof(mp_digit), kmflag)) == NULL)
-    return MP_MEM;
-
-  SIGN(mp) = ZPOS;
-  USED(mp) = 1;
-  ALLOC(mp) = prec;
-
-  return MP_OKAY;
-
-} /* end mp_init_size() */
-
-/* }}} */
-
-/* {{{ mp_init_copy(mp, from) */
-
-/*
-  mp_init_copy(mp, from)
-
-  Initialize mp as an exact copy of from.  Returns MP_OKAY if
-  successful, MP_MEM if memory could not be allocated for the new
-  structure.
- */
-
-mp_err mp_init_copy(mp_int *mp, const mp_int *from)
-{
-  ARGCHK(mp != NULL && from != NULL, MP_BADARG);
-
-  if(mp == from)
-    return MP_OKAY;
-
-  if((DIGITS(mp) = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL)
-    return MP_MEM;
-
-  s_mp_copy(DIGITS(from), DIGITS(mp), USED(from));
-  USED(mp) = USED(from);
-  ALLOC(mp) = ALLOC(from);
-  SIGN(mp) = SIGN(from);
-
-#ifndef _WIN32
-  FLAG(mp) = FLAG(from);
-#endif /* _WIN32 */
-
-  return MP_OKAY;
-
-} /* end mp_init_copy() */
-
-/* }}} */
-
-/* {{{ mp_copy(from, to) */
-
-/*
-  mp_copy(from, to)
-
-  Copies the mp_int 'from' to the mp_int 'to'.  It is presumed that
-  'to' has already been initialized (if not, use mp_init_copy()
-  instead). If 'from' and 'to' are identical, nothing happens.
- */
-
-mp_err mp_copy(const mp_int *from, mp_int *to)
-{
-  ARGCHK(from != NULL && to != NULL, MP_BADARG);
-
-  if(from == to)
-    return MP_OKAY;
-
-  ++mp_copies;
-  { /* copy */
-    mp_digit   *tmp;
-
-    /*
-      If the allocated buffer in 'to' already has enough space to hold
-      all the used digits of 'from', we'll re-use it to avoid hitting
-      the memory allocater more than necessary; otherwise, we'd have
-      to grow anyway, so we just allocate a hunk and make the copy as
-      usual
-     */
-    if(ALLOC(to) >= USED(from)) {
-      s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from));
-      s_mp_copy(DIGITS(from), DIGITS(to), USED(from));
-
-    } else {
-      if((tmp = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL)
-        return MP_MEM;
-
-      s_mp_copy(DIGITS(from), tmp, USED(from));
-
-      if(DIGITS(to) != NULL) {
-#if MP_CRYPTO
-        s_mp_setz(DIGITS(to), ALLOC(to));
-#endif
-        s_mp_free(DIGITS(to), ALLOC(to));
-      }
-
-      DIGITS(to) = tmp;
-      ALLOC(to) = ALLOC(from);
-    }
-
-    /* Copy the precision and sign from the original */
-    USED(to) = USED(from);
-    SIGN(to) = SIGN(from);
-  } /* end copy */
-
-  return MP_OKAY;
-
-} /* end mp_copy() */
-
-/* }}} */
-
-/* {{{ mp_exch(mp1, mp2) */
-
-/*
-  mp_exch(mp1, mp2)
-
-  Exchange mp1 and mp2 without allocating any intermediate memory
-  (well, unless you count the stack space needed for this call and the
-  locals it creates...).  This cannot fail.
- */
-
-void mp_exch(mp_int *mp1, mp_int *mp2)
-{
-#if MP_ARGCHK == 2
-  assert(mp1 != NULL && mp2 != NULL);
-#else
-  if(mp1 == NULL || mp2 == NULL)
-    return;
-#endif
-
-  s_mp_exch(mp1, mp2);
-
-} /* end mp_exch() */
-
-/* }}} */
-
-/* {{{ mp_clear(mp) */
-
-/*
-  mp_clear(mp)
-
-  Release the storage used by an mp_int, and void its fields so that
-  if someone calls mp_clear() again for the same int later, we won't
-  get tollchocked.
- */
-
-void   mp_clear(mp_int *mp)
-{
-  if(mp == NULL)
-    return;
-
-  if(DIGITS(mp) != NULL) {
-#if MP_CRYPTO
-    s_mp_setz(DIGITS(mp), ALLOC(mp));
-#endif
-    s_mp_free(DIGITS(mp), ALLOC(mp));
-    DIGITS(mp) = NULL;
-  }
-
-  USED(mp) = 0;
-  ALLOC(mp) = 0;
-
-} /* end mp_clear() */
-
-/* }}} */
-
-/* {{{ mp_zero(mp) */
-
-/*
-  mp_zero(mp)
-
-  Set mp to zero.  Does not change the allocated size of the structure,
-  and therefore cannot fail (except on a bad argument, which we ignore)
- */
-void   mp_zero(mp_int *mp)
-{
-  if(mp == NULL)
-    return;
-
-  s_mp_setz(DIGITS(mp), ALLOC(mp));
-  USED(mp) = 1;
-  SIGN(mp) = ZPOS;
-
-} /* end mp_zero() */
-
-/* }}} */
-
-/* {{{ mp_set(mp, d) */
-
-void   mp_set(mp_int *mp, mp_digit d)
-{
-  if(mp == NULL)
-    return;
-
-  mp_zero(mp);
-  DIGIT(mp, 0) = d;
-
-} /* end mp_set() */
-
-/* }}} */
-
-/* {{{ mp_set_int(mp, z) */
-
-mp_err mp_set_int(mp_int *mp, long z)
-{
-  int            ix;
-  unsigned long  v = labs(z);
-  mp_err         res;
-
-  ARGCHK(mp != NULL, MP_BADARG);
-
-  mp_zero(mp);
-  if(z == 0)
-    return MP_OKAY;  /* shortcut for zero */
-
-  if (sizeof v <= sizeof(mp_digit)) {
-    DIGIT(mp,0) = v;
-  } else {
-    for (ix = sizeof(long) - 1; ix >= 0; ix--) {
-      if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY)
-        return res;
-
-      res = s_mp_add_d(mp, (mp_digit)((v >> (ix * CHAR_BIT)) & UCHAR_MAX));
-      if (res != MP_OKAY)
-        return res;
-    }
-  }
-  if(z < 0)
-    SIGN(mp) = NEG;
-
-  return MP_OKAY;
-
-} /* end mp_set_int() */
-
-/* }}} */
-
-/* {{{ mp_set_ulong(mp, z) */
-
-mp_err mp_set_ulong(mp_int *mp, unsigned long z)
-{
-  int            ix;
-  mp_err         res;
-
-  ARGCHK(mp != NULL, MP_BADARG);
-
-  mp_zero(mp);
-  if(z == 0)
-    return MP_OKAY;  /* shortcut for zero */
-
-  if (sizeof z <= sizeof(mp_digit)) {
-    DIGIT(mp,0) = z;
-  } else {
-    for (ix = sizeof(long) - 1; ix >= 0; ix--) {
-      if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY)
-        return res;
-
-      res = s_mp_add_d(mp, (mp_digit)((z >> (ix * CHAR_BIT)) & UCHAR_MAX));
-      if (res != MP_OKAY)
-        return res;
-    }
-  }
-  return MP_OKAY;
-} /* end mp_set_ulong() */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Digit arithmetic */
-
-/* {{{ mp_add_d(a, d, b) */
-
-/*
-  mp_add_d(a, d, b)
-
-  Compute the sum b = a + d, for a single digit d.  Respects the sign of
-  its primary addend (single digits are unsigned anyway).
- */
-
-mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b)
-{
-  mp_int   tmp;
-  mp_err   res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
-    return res;
-
-  if(SIGN(&tmp) == ZPOS) {
-    if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
-      goto CLEANUP;
-  } else if(s_mp_cmp_d(&tmp, d) >= 0) {
-    if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
-      goto CLEANUP;
-  } else {
-    mp_neg(&tmp, &tmp);
-
-    DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0);
-  }
-
-  if(s_mp_cmp_d(&tmp, 0) == 0)
-    SIGN(&tmp) = ZPOS;
-
-  s_mp_exch(&tmp, b);
-
-CLEANUP:
-  mp_clear(&tmp);
-  return res;
-
-} /* end mp_add_d() */
-
-/* }}} */
-
-/* {{{ mp_sub_d(a, d, b) */
-
-/*
-  mp_sub_d(a, d, b)
-
-  Compute the difference b = a - d, for a single digit d.  Respects the
-  sign of its subtrahend (single digits are unsigned anyway).
- */
-
-mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b)
-{
-  mp_int   tmp;
-  mp_err   res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
-    return res;
-
-  if(SIGN(&tmp) == NEG) {
-    if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
-      goto CLEANUP;
-  } else if(s_mp_cmp_d(&tmp, d) >= 0) {
-    if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
-      goto CLEANUP;
-  } else {
-    mp_neg(&tmp, &tmp);
-
-    DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0);
-    SIGN(&tmp) = NEG;
-  }
-
-  if(s_mp_cmp_d(&tmp, 0) == 0)
-    SIGN(&tmp) = ZPOS;
-
-  s_mp_exch(&tmp, b);
-
-CLEANUP:
-  mp_clear(&tmp);
-  return res;
-
-} /* end mp_sub_d() */
-
-/* }}} */
-
-/* {{{ mp_mul_d(a, d, b) */
-
-/*
-  mp_mul_d(a, d, b)
-
-  Compute the product b = a * d, for a single digit d.  Respects the sign
-  of its multiplicand (single digits are unsigned anyway)
- */
-
-mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if(d == 0) {
-    mp_zero(b);
-    return MP_OKAY;
-  }
-
-  if((res = mp_copy(a, b)) != MP_OKAY)
-    return res;
-
-  res = s_mp_mul_d(b, d);
-
-  return res;
-
-} /* end mp_mul_d() */
-
-/* }}} */
-
-/* {{{ mp_mul_2(a, c) */
-
-mp_err mp_mul_2(const mp_int *a, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_copy(a, c)) != MP_OKAY)
-    return res;
-
-  return s_mp_mul_2(c);
-
-} /* end mp_mul_2() */
-
-/* }}} */
-
-/* {{{ mp_div_d(a, d, q, r) */
-
-/*
-  mp_div_d(a, d, q, r)
-
-  Compute the quotient q = a / d and remainder r = a mod d, for a
-  single digit d.  Respects the sign of its divisor (single digits are
-  unsigned anyway).
- */
-
-mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r)
-{
-  mp_err   res;
-  mp_int   qp;
-  mp_digit rem;
-  int      pow;
-
-  ARGCHK(a != NULL, MP_BADARG);
-
-  if(d == 0)
-    return MP_RANGE;
-
-  /* Shortcut for powers of two ... */
-  if((pow = s_mp_ispow2d(d)) >= 0) {
-    mp_digit  mask;
-
-    mask = ((mp_digit)1 << pow) - 1;
-    rem = DIGIT(a, 0) & mask;
-
-    if(q) {
-      mp_copy(a, q);
-      s_mp_div_2d(q, pow);
-    }
-
-    if(r)
-      *r = rem;
-
-    return MP_OKAY;
-  }
-
-  if((res = mp_init_copy(&qp, a)) != MP_OKAY)
-    return res;
-
-  res = s_mp_div_d(&qp, d, &rem);
-
-  if(s_mp_cmp_d(&qp, 0) == 0)
-    SIGN(q) = ZPOS;
-
-  if(r)
-    *r = rem;
-
-  if(q)
-    s_mp_exch(&qp, q);
-
-  mp_clear(&qp);
-  return res;
-
-} /* end mp_div_d() */
-
-/* }}} */
-
-/* {{{ mp_div_2(a, c) */
-
-/*
-  mp_div_2(a, c)
-
-  Compute c = a / 2, disregarding the remainder.
- */
-
-mp_err mp_div_2(const mp_int *a, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_copy(a, c)) != MP_OKAY)
-    return res;
-
-  s_mp_div_2(c);
-
-  return MP_OKAY;
-
-} /* end mp_div_2() */
-
-/* }}} */
-
-/* {{{ mp_expt_d(a, d, b) */
-
-mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c)
-{
-  mp_int   s, x;
-  mp_err   res;
-
-  ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
-    return res;
-  if((res = mp_init_copy(&x, a)) != MP_OKAY)
-    goto X;
-
-  DIGIT(&s, 0) = 1;
-
-  while(d != 0) {
-    if(d & 1) {
-      if((res = s_mp_mul(&s, &x)) != MP_OKAY)
-        goto CLEANUP;
-    }
-
-    d /= 2;
-
-    if((res = s_mp_sqr(&x)) != MP_OKAY)
-      goto CLEANUP;
-  }
-
-  s_mp_exch(&s, c);
-
-CLEANUP:
-  mp_clear(&x);
-X:
-  mp_clear(&s);
-
-  return res;
-
-} /* end mp_expt_d() */
-
-/* }}} */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Full arithmetic */
-
-/* {{{ mp_abs(a, b) */
-
-/*
-  mp_abs(a, b)
-
-  Compute b = |a|.  'a' and 'b' may be identical.
- */
-
-mp_err mp_abs(const mp_int *a, mp_int *b)
-{
-  mp_err   res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if((res = mp_copy(a, b)) != MP_OKAY)
-    return res;
-
-  SIGN(b) = ZPOS;
-
-  return MP_OKAY;
-
-} /* end mp_abs() */
-
-/* }}} */
-
-/* {{{ mp_neg(a, b) */
-
-/*
-  mp_neg(a, b)
-
-  Compute b = -a.  'a' and 'b' may be identical.
- */
-
-mp_err mp_neg(const mp_int *a, mp_int *b)
-{
-  mp_err   res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if((res = mp_copy(a, b)) != MP_OKAY)
-    return res;
-
-  if(s_mp_cmp_d(b, 0) == MP_EQ)
-    SIGN(b) = ZPOS;
-  else
-    SIGN(b) = (SIGN(b) == NEG) ? ZPOS : NEG;
-
-  return MP_OKAY;
-
-} /* end mp_neg() */
-
-/* }}} */
-
-/* {{{ mp_add(a, b, c) */
-
-/*
-  mp_add(a, b, c)
-
-  Compute c = a + b.  All parameters may be identical.
- */
-
-mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if(SIGN(a) == SIGN(b)) { /* same sign:  add values, keep sign */
-    MP_CHECKOK( s_mp_add_3arg(a, b, c) );
-  } else if(s_mp_cmp(a, b) >= 0) {  /* different sign: |a| >= |b|   */
-    MP_CHECKOK( s_mp_sub_3arg(a, b, c) );
-  } else {                          /* different sign: |a|  < |b|   */
-    MP_CHECKOK( s_mp_sub_3arg(b, a, c) );
-  }
-
-  if (s_mp_cmp_d(c, 0) == MP_EQ)
-    SIGN(c) = ZPOS;
-
-CLEANUP:
-  return res;
-
-} /* end mp_add() */
-
-/* }}} */
-
-/* {{{ mp_sub(a, b, c) */
-
-/*
-  mp_sub(a, b, c)
-
-  Compute c = a - b.  All parameters may be identical.
- */
-
-mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c)
-{
-  mp_err  res;
-  int     magDiff;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if (a == b) {
-    mp_zero(c);
-    return MP_OKAY;
-  }
-
-  if (MP_SIGN(a) != MP_SIGN(b)) {
-    MP_CHECKOK( s_mp_add_3arg(a, b, c) );
-  } else if (!(magDiff = s_mp_cmp(a, b))) {
-    mp_zero(c);
-    res = MP_OKAY;
-  } else if (magDiff > 0) {
-    MP_CHECKOK( s_mp_sub_3arg(a, b, c) );
-  } else {
-    MP_CHECKOK( s_mp_sub_3arg(b, a, c) );
-    MP_SIGN(c) = !MP_SIGN(a);
-  }
-
-  if (s_mp_cmp_d(c, 0) == MP_EQ)
-    MP_SIGN(c) = MP_ZPOS;
-
-CLEANUP:
-  return res;
-
-} /* end mp_sub() */
-
-/* }}} */
-
-/* {{{ mp_mul(a, b, c) */
-
-/*
-  mp_mul(a, b, c)
-
-  Compute c = a * b.  All parameters may be identical.
- */
-mp_err   mp_mul(const mp_int *a, const mp_int *b, mp_int * c)
-{
-  mp_digit *pb;
-  mp_int   tmp;
-  mp_err   res;
-  mp_size  ib;
-  mp_size  useda, usedb;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if (a == c) {
-    if ((res = mp_init_copy(&tmp, a)) != MP_OKAY)
-      return res;
-    if (a == b)
-      b = &tmp;
-    a = &tmp;
-  } else if (b == c) {
-    if ((res = mp_init_copy(&tmp, b)) != MP_OKAY)
-      return res;
-    b = &tmp;
-  } else {
-    MP_DIGITS(&tmp) = 0;
-  }
-
-  if (MP_USED(a) < MP_USED(b)) {
-    const mp_int *xch = b;      /* switch a and b, to do fewer outer loops */
-    b = a;
-    a = xch;
-  }
-
-  MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
-  if((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY)
-    goto CLEANUP;
-
-#ifdef NSS_USE_COMBA
-  if ((MP_USED(a) == MP_USED(b)) && IS_POWER_OF_2(MP_USED(b))) {
-      if (MP_USED(a) == 4) {
-          s_mp_mul_comba_4(a, b, c);
-          goto CLEANUP;
-      }
-      if (MP_USED(a) == 8) {
-          s_mp_mul_comba_8(a, b, c);
-          goto CLEANUP;
-      }
-      if (MP_USED(a) == 16) {
-          s_mp_mul_comba_16(a, b, c);
-          goto CLEANUP;
-      }
-      if (MP_USED(a) == 32) {
-          s_mp_mul_comba_32(a, b, c);
-          goto CLEANUP;
-      }
-  }
-#endif
-
-  pb = MP_DIGITS(b);
-  s_mpv_mul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c));
-
-  /* Outer loop:  Digits of b */
-  useda = MP_USED(a);
-  usedb = MP_USED(b);
-  for (ib = 1; ib < usedb; ib++) {
-    mp_digit b_i    = *pb++;
-
-    /* Inner product:  Digits of a */
-    if (b_i)
-      s_mpv_mul_d_add(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
-    else
-      MP_DIGIT(c, ib + useda) = b_i;
-  }
-
-  s_mp_clamp(c);
-
-  if(SIGN(a) == SIGN(b) || s_mp_cmp_d(c, 0) == MP_EQ)
-    SIGN(c) = ZPOS;
-  else
-    SIGN(c) = NEG;
-
-CLEANUP:
-  mp_clear(&tmp);
-  return res;
-} /* end mp_mul() */
-
-/* }}} */
-
-/* {{{ mp_sqr(a, sqr) */
-
-#if MP_SQUARE
-/*
-  Computes the square of a.  This can be done more
-  efficiently than a general multiplication, because many of the
-  computation steps are redundant when squaring.  The inner product
-  step is a bit more complicated, but we save a fair number of
-  iterations of the multiplication loop.
- */
-
-/* sqr = a^2;   Caller provides both a and tmp; */
-mp_err   mp_sqr(const mp_int *a, mp_int *sqr)
-{
-  mp_digit *pa;
-  mp_digit d;
-  mp_err   res;
-  mp_size  ix;
-  mp_int   tmp;
-  int      count;
-
-  ARGCHK(a != NULL && sqr != NULL, MP_BADARG);
-
-  if (a == sqr) {
-    if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
-      return res;
-    a = &tmp;
-  } else {
-    DIGITS(&tmp) = 0;
-    res = MP_OKAY;
-  }
-
-  ix = 2 * MP_USED(a);
-  if (ix > MP_ALLOC(sqr)) {
-    MP_USED(sqr) = 1;
-    MP_CHECKOK( s_mp_grow(sqr, ix) );
-  }
-  MP_USED(sqr) = ix;
-  MP_DIGIT(sqr, 0) = 0;
-
-#ifdef NSS_USE_COMBA
-  if (IS_POWER_OF_2(MP_USED(a))) {
-      if (MP_USED(a) == 4) {
-          s_mp_sqr_comba_4(a, sqr);
-          goto CLEANUP;
-      }
-      if (MP_USED(a) == 8) {
-          s_mp_sqr_comba_8(a, sqr);
-          goto CLEANUP;
-      }
-      if (MP_USED(a) == 16) {
-          s_mp_sqr_comba_16(a, sqr);
-          goto CLEANUP;
-      }
-      if (MP_USED(a) == 32) {
-          s_mp_sqr_comba_32(a, sqr);
-          goto CLEANUP;
-      }
-  }
-#endif
-
-  pa = MP_DIGITS(a);
-  count = MP_USED(a) - 1;
-  if (count > 0) {
-    d = *pa++;
-    s_mpv_mul_d(pa, count, d, MP_DIGITS(sqr) + 1);
-    for (ix = 3; --count > 0; ix += 2) {
-      d = *pa++;
-      s_mpv_mul_d_add(pa, count, d, MP_DIGITS(sqr) + ix);
-    } /* for(ix ...) */
-    MP_DIGIT(sqr, MP_USED(sqr)-1) = 0; /* above loop stopped short of this. */
-
-    /* now sqr *= 2 */
-    s_mp_mul_2(sqr);
-  } else {
-    MP_DIGIT(sqr, 1) = 0;
-  }
-
-  /* now add the squares of the digits of a to sqr. */
-  s_mpv_sqr_add_prop(MP_DIGITS(a), MP_USED(a), MP_DIGITS(sqr));
-
-  SIGN(sqr) = ZPOS;
-  s_mp_clamp(sqr);
-
-CLEANUP:
-  mp_clear(&tmp);
-  return res;
-
-} /* end mp_sqr() */
-#endif
-
-/* }}} */
-
-/* {{{ mp_div(a, b, q, r) */
-
-/*
-  mp_div(a, b, q, r)
-
-  Compute q = a / b and r = a mod b.  Input parameters may be re-used
-  as output parameters.  If q or r is NULL, that portion of the
-  computation will be discarded (although it will still be computed)
- */
-mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r)
-{
-  mp_err   res;
-  mp_int   *pQ, *pR;
-  mp_int   qtmp, rtmp, btmp;
-  int      cmp;
-  mp_sign  signA;
-  mp_sign  signB;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  signA = MP_SIGN(a);
-  signB = MP_SIGN(b);
-
-  if(mp_cmp_z(b) == MP_EQ)
-    return MP_RANGE;
-
-  DIGITS(&qtmp) = 0;
-  DIGITS(&rtmp) = 0;
-  DIGITS(&btmp) = 0;
-
-  /* Set up some temporaries... */
-  if (!r || r == a || r == b) {
-    MP_CHECKOK( mp_init_copy(&rtmp, a) );
-    pR = &rtmp;
-  } else {
-    MP_CHECKOK( mp_copy(a, r) );
-    pR = r;
-  }
-
-  if (!q || q == a || q == b) {
-    MP_CHECKOK( mp_init_size(&qtmp, MP_USED(a), FLAG(a)) );
-    pQ = &qtmp;
-  } else {
-    MP_CHECKOK( s_mp_pad(q, MP_USED(a)) );
-    pQ = q;
-    mp_zero(pQ);
-  }
-
-  /*
-    If |a| <= |b|, we can compute the solution without division;
-    otherwise, we actually do the work required.
-   */
-  if ((cmp = s_mp_cmp(a, b)) <= 0) {
-    if (cmp) {
-      /* r was set to a above. */
-      mp_zero(pQ);
-    } else {
-      mp_set(pQ, 1);
-      mp_zero(pR);
-    }
-  } else {
-    MP_CHECKOK( mp_init_copy(&btmp, b) );
-    MP_CHECKOK( s_mp_div(pR, &btmp, pQ) );
-  }
-
-  /* Compute the signs for the output  */
-  MP_SIGN(pR) = signA;   /* Sr = Sa              */
-  /* Sq = ZPOS if Sa == Sb */ /* Sq = NEG if Sa != Sb */
-  MP_SIGN(pQ) = (signA == signB) ? ZPOS : NEG;
-
-  if(s_mp_cmp_d(pQ, 0) == MP_EQ)
-    SIGN(pQ) = ZPOS;
-  if(s_mp_cmp_d(pR, 0) == MP_EQ)
-    SIGN(pR) = ZPOS;
-
-  /* Copy output, if it is needed      */
-  if(q && q != pQ)
-    s_mp_exch(pQ, q);
-
-  if(r && r != pR)
-    s_mp_exch(pR, r);
-
-CLEANUP:
-  mp_clear(&btmp);
-  mp_clear(&rtmp);
-  mp_clear(&qtmp);
-
-  return res;
-
-} /* end mp_div() */
-
-/* }}} */
-
-/* {{{ mp_div_2d(a, d, q, r) */
-
-mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL, MP_BADARG);
-
-  if(q) {
-    if((res = mp_copy(a, q)) != MP_OKAY)
-      return res;
-  }
-  if(r) {
-    if((res = mp_copy(a, r)) != MP_OKAY)
-      return res;
-  }
-  if(q) {
-    s_mp_div_2d(q, d);
-  }
-  if(r) {
-    s_mp_mod_2d(r, d);
-  }
-
-  return MP_OKAY;
-
-} /* end mp_div_2d() */
-
-/* }}} */
-
-/* {{{ mp_expt(a, b, c) */
-
-/*
-  mp_expt(a, b, c)
-
-  Compute c = a ** b, that is, raise a to the b power.  Uses a
-  standard iterative square-and-multiply technique.
- */
-
-mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c)
-{
-  mp_int   s, x;
-  mp_err   res;
-  mp_digit d;
-  int      dig, bit;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if(mp_cmp_z(b) < 0)
-    return MP_RANGE;
-
-  if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
-    return res;
-
-  mp_set(&s, 1);
-
-  if((res = mp_init_copy(&x, a)) != MP_OKAY)
-    goto X;
-
-  /* Loop over low-order digits in ascending order */
-  for(dig = 0; dig < (USED(b) - 1); dig++) {
-    d = DIGIT(b, dig);
-
-    /* Loop over bits of each non-maximal digit */
-    for(bit = 0; bit < DIGIT_BIT; bit++) {
-      if(d & 1) {
-        if((res = s_mp_mul(&s, &x)) != MP_OKAY)
-          goto CLEANUP;
-      }
-
-      d >>= 1;
-
-      if((res = s_mp_sqr(&x)) != MP_OKAY)
-        goto CLEANUP;
-    }
-  }
-
-  /* Consider now the last digit... */
-  d = DIGIT(b, dig);
-
-  while(d) {
-    if(d & 1) {
-      if((res = s_mp_mul(&s, &x)) != MP_OKAY)
-        goto CLEANUP;
-    }
-
-    d >>= 1;
-
-    if((res = s_mp_sqr(&x)) != MP_OKAY)
-      goto CLEANUP;
-  }
-
-  if(mp_iseven(b))
-    SIGN(&s) = SIGN(a);
-
-  res = mp_copy(&s, c);
-
-CLEANUP:
-  mp_clear(&x);
-X:
-  mp_clear(&s);
-
-  return res;
-
-} /* end mp_expt() */
-
-/* }}} */
-
-/* {{{ mp_2expt(a, k) */
-
-/* Compute a = 2^k */
-
-mp_err mp_2expt(mp_int *a, mp_digit k)
-{
-  ARGCHK(a != NULL, MP_BADARG);
-
-  return s_mp_2expt(a, k);
-
-} /* end mp_2expt() */
-
-/* }}} */
-
-/* {{{ mp_mod(a, m, c) */
-
-/*
-  mp_mod(a, m, c)
-
-  Compute c = a (mod m).  Result will always be 0 <= c < m.
- */
-
-mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c)
-{
-  mp_err  res;
-  int     mag;
-
-  ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
-
-  if(SIGN(m) == NEG)
-    return MP_RANGE;
-
-  /*
-     If |a| > m, we need to divide to get the remainder and take the
-     absolute value.
-
-     If |a| < m, we don't need to do any division, just copy and adjust
-     the sign (if a is negative).
-
-     If |a| == m, we can simply set the result to zero.
-
-     This order is intended to minimize the average path length of the
-     comparison chain on common workloads -- the most frequent cases are
-     that |a| != m, so we do those first.
-   */
-  if((mag = s_mp_cmp(a, m)) > 0) {
-    if((res = mp_div(a, m, NULL, c)) != MP_OKAY)
-      return res;
-
-    if(SIGN(c) == NEG) {
-      if((res = mp_add(c, m, c)) != MP_OKAY)
-        return res;
-    }
-
-  } else if(mag < 0) {
-    if((res = mp_copy(a, c)) != MP_OKAY)
-      return res;
-
-    if(mp_cmp_z(a) < 0) {
-      if((res = mp_add(c, m, c)) != MP_OKAY)
-        return res;
-
-    }
-
-  } else {
-    mp_zero(c);
-
-  }
-
-  return MP_OKAY;
-
-} /* end mp_mod() */
-
-/* }}} */
-
-/* {{{ mp_mod_d(a, d, c) */
-
-/*
-  mp_mod_d(a, d, c)
-
-  Compute c = a (mod d).  Result will always be 0 <= c < d
- */
-mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c)
-{
-  mp_err   res;
-  mp_digit rem;
-
-  ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
-  if(s_mp_cmp_d(a, d) > 0) {
-    if((res = mp_div_d(a, d, NULL, &rem)) != MP_OKAY)
-      return res;
-
-  } else {
-    if(SIGN(a) == NEG)
-      rem = d - DIGIT(a, 0);
-    else
-      rem = DIGIT(a, 0);
-  }
-
-  if(c)
-    *c = rem;
-
-  return MP_OKAY;
-
-} /* end mp_mod_d() */
-
-/* }}} */
-
-/* {{{ mp_sqrt(a, b) */
-
-/*
-  mp_sqrt(a, b)
-
-  Compute the integer square root of a, and store the result in b.
-  Uses an integer-arithmetic version of Newton's iterative linear
-  approximation technique to determine this value; the result has the
-  following two properties:
-
-     b^2 <= a
-     (b+1)^2 >= a
-
-  It is a range error to pass a negative value.
- */
-mp_err mp_sqrt(const mp_int *a, mp_int *b)
-{
-  mp_int   x, t;
-  mp_err   res;
-  mp_size  used;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  /* Cannot take square root of a negative value */
-  if(SIGN(a) == NEG)
-    return MP_RANGE;
-
-  /* Special cases for zero and one, trivial     */
-  if(mp_cmp_d(a, 1) <= 0)
-    return mp_copy(a, b);
-
-  /* Initialize the temporaries we'll use below  */
-  if((res = mp_init_size(&t, USED(a), FLAG(a))) != MP_OKAY)
-    return res;
-
-  /* Compute an initial guess for the iteration as a itself */
-  if((res = mp_init_copy(&x, a)) != MP_OKAY)
-    goto X;
-
-  used = MP_USED(&x);
-  if (used > 1) {
-    s_mp_rshd(&x, used / 2);
-  }
-
-  for(;;) {
-    /* t = (x * x) - a */
-    mp_copy(&x, &t);      /* can't fail, t is big enough for original x */
-    if((res = mp_sqr(&t, &t)) != MP_OKAY ||
-       (res = mp_sub(&t, a, &t)) != MP_OKAY)
-      goto CLEANUP;
-
-    /* t = t / 2x       */
-    s_mp_mul_2(&x);
-    if((res = mp_div(&t, &x, &t, NULL)) != MP_OKAY)
-      goto CLEANUP;
-    s_mp_div_2(&x);
-
-    /* Terminate the loop, if the quotient is zero */
-    if(mp_cmp_z(&t) == MP_EQ)
-      break;
-
-    /* x = x - t       */
-    if((res = mp_sub(&x, &t, &x)) != MP_OKAY)
-      goto CLEANUP;
-
-  }
-
-  /* Copy result to output parameter */
-  mp_sub_d(&x, 1, &x);
-  s_mp_exch(&x, b);
-
- CLEANUP:
-  mp_clear(&x);
- X:
-  mp_clear(&t);
-
-  return res;
-
-} /* end mp_sqrt() */
-
-/* }}} */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Modular arithmetic */
-
-#if MP_MODARITH
-/* {{{ mp_addmod(a, b, m, c) */
-
-/*
-  mp_addmod(a, b, m, c)
-
-  Compute c = (a + b) mod m
- */
-
-mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_add(a, b, c)) != MP_OKAY)
-    return res;
-  if((res = mp_mod(c, m, c)) != MP_OKAY)
-    return res;
-
-  return MP_OKAY;
-
-}
-
-/* }}} */
-
-/* {{{ mp_submod(a, b, m, c) */
-
-/*
-  mp_submod(a, b, m, c)
-
-  Compute c = (a - b) mod m
- */
-
-mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_sub(a, b, c)) != MP_OKAY)
-    return res;
-  if((res = mp_mod(c, m, c)) != MP_OKAY)
-    return res;
-
-  return MP_OKAY;
-
-}
-
-/* }}} */
-
-/* {{{ mp_mulmod(a, b, m, c) */
-
-/*
-  mp_mulmod(a, b, m, c)
-
-  Compute c = (a * b) mod m
- */
-
-mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_mul(a, b, c)) != MP_OKAY)
-    return res;
-  if((res = mp_mod(c, m, c)) != MP_OKAY)
-    return res;
-
-  return MP_OKAY;
-
-}
-
-/* }}} */
-
-/* {{{ mp_sqrmod(a, m, c) */
-
-#if MP_SQUARE
-mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c)
-{
-  mp_err  res;
-
-  ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_sqr(a, c)) != MP_OKAY)
-    return res;
-  if((res = mp_mod(c, m, c)) != MP_OKAY)
-    return res;
-
-  return MP_OKAY;
-
-} /* end mp_sqrmod() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_exptmod(a, b, m, c) */
-
-/*
-  s_mp_exptmod(a, b, m, c)
-
-  Compute c = (a ** b) mod m.  Uses a standard square-and-multiply
-  method with modular reductions at each step. (This is basically the
-  same code as mp_expt(), except for the addition of the reductions)
-
-  The modular reductions are done using Barrett's algorithm (see
-  s_mp_reduce() below for details)
- */
-
-mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
-  mp_int   s, x, mu;
-  mp_err   res;
-  mp_digit d;
-  int      dig, bit;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if(mp_cmp_z(b) < 0 || mp_cmp_z(m) <= 0)
-    return MP_RANGE;
-
-  if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
-    return res;
-  if((res = mp_init_copy(&x, a)) != MP_OKAY ||
-     (res = mp_mod(&x, m, &x)) != MP_OKAY)
-    goto X;
-  if((res = mp_init(&mu, FLAG(a))) != MP_OKAY)
-    goto MU;
-
-  mp_set(&s, 1);
-
-  /* mu = b^2k / m */
-  s_mp_add_d(&mu, 1);
-  s_mp_lshd(&mu, 2 * USED(m));
-  if((res = mp_div(&mu, m, &mu, NULL)) != MP_OKAY)
-    goto CLEANUP;
-
-  /* Loop over digits of b in ascending order, except highest order */
-  for(dig = 0; dig < (USED(b) - 1); dig++) {
-    d = DIGIT(b, dig);
-
-    /* Loop over the bits of the lower-order digits */
-    for(bit = 0; bit < DIGIT_BIT; bit++) {
-      if(d & 1) {
-        if((res = s_mp_mul(&s, &x)) != MP_OKAY)
-          goto CLEANUP;
-        if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
-          goto CLEANUP;
-      }
-
-      d >>= 1;
-
-      if((res = s_mp_sqr(&x)) != MP_OKAY)
-        goto CLEANUP;
-      if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
-        goto CLEANUP;
-    }
-  }
-
-  /* Now do the last digit... */
-  d = DIGIT(b, dig);
-
-  while(d) {
-    if(d & 1) {
-      if((res = s_mp_mul(&s, &x)) != MP_OKAY)
-        goto CLEANUP;
-      if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
-        goto CLEANUP;
-    }
-
-    d >>= 1;
-
-    if((res = s_mp_sqr(&x)) != MP_OKAY)
-      goto CLEANUP;
-    if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
-      goto CLEANUP;
-  }
-
-  s_mp_exch(&s, c);
-
- CLEANUP:
-  mp_clear(&mu);
- MU:
-  mp_clear(&x);
- X:
-  mp_clear(&s);
-
-  return res;
-
-} /* end s_mp_exptmod() */
-
-/* }}} */
-
-/* {{{ mp_exptmod_d(a, d, m, c) */
-
-mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c)
-{
-  mp_int   s, x;
-  mp_err   res;
-
-  ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
-  if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
-    return res;
-  if((res = mp_init_copy(&x, a)) != MP_OKAY)
-    goto X;
-
-  mp_set(&s, 1);
-
-  while(d != 0) {
-    if(d & 1) {
-      if((res = s_mp_mul(&s, &x)) != MP_OKAY ||
-         (res = mp_mod(&s, m, &s)) != MP_OKAY)
-        goto CLEANUP;
-    }
-
-    d /= 2;
-
-    if((res = s_mp_sqr(&x)) != MP_OKAY ||
-       (res = mp_mod(&x, m, &x)) != MP_OKAY)
-      goto CLEANUP;
-  }
-
-  s_mp_exch(&s, c);
-
-CLEANUP:
-  mp_clear(&x);
-X:
-  mp_clear(&s);
-
-  return res;
-
-} /* end mp_exptmod_d() */
-
-/* }}} */
-#endif /* if MP_MODARITH */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Comparison functions */
-
-/* {{{ mp_cmp_z(a) */
-
-/*
-  mp_cmp_z(a)
-
-  Compare a <=> 0.  Returns <0 if a<0, 0 if a=0, >0 if a>0.
- */
-
-int    mp_cmp_z(const mp_int *a)
-{
-  if(SIGN(a) == NEG)
-    return MP_LT;
-  else if(USED(a) == 1 && DIGIT(a, 0) == 0)
-    return MP_EQ;
-  else
-    return MP_GT;
-
-} /* end mp_cmp_z() */
-
-/* }}} */
-
-/* {{{ mp_cmp_d(a, d) */
-
-/*
-  mp_cmp_d(a, d)
-
-  Compare a <=> d.  Returns <0 if a<d, 0 if a=d, >0 if a>d
- */
-
-int    mp_cmp_d(const mp_int *a, mp_digit d)
-{
-  ARGCHK(a != NULL, MP_EQ);
-
-  if(SIGN(a) == NEG)
-    return MP_LT;
-
-  return s_mp_cmp_d(a, d);
-
-} /* end mp_cmp_d() */
-
-/* }}} */
-
-/* {{{ mp_cmp(a, b) */
-
-int    mp_cmp(const mp_int *a, const mp_int *b)
-{
-  ARGCHK(a != NULL && b != NULL, MP_EQ);
-
-  if(SIGN(a) == SIGN(b)) {
-    int  mag;
-
-    if((mag = s_mp_cmp(a, b)) == MP_EQ)
-      return MP_EQ;
-
-    if(SIGN(a) == ZPOS)
-      return mag;
-    else
-      return -mag;
-
-  } else if(SIGN(a) == ZPOS) {
-    return MP_GT;
-  } else {
-    return MP_LT;
-  }
-
-} /* end mp_cmp() */
-
-/* }}} */
-
-/* {{{ mp_cmp_mag(a, b) */
-
-/*
-  mp_cmp_mag(a, b)
-
-  Compares |a| <=> |b|, and returns an appropriate comparison result
- */
-
-int    mp_cmp_mag(mp_int *a, mp_int *b)
-{
-  ARGCHK(a != NULL && b != NULL, MP_EQ);
-
-  return s_mp_cmp(a, b);
-
-} /* end mp_cmp_mag() */
-
-/* }}} */
-
-/* {{{ mp_cmp_int(a, z, kmflag) */
-
-/*
-  This just converts z to an mp_int, and uses the existing comparison
-  routines.  This is sort of inefficient, but it's not clear to me how
-  frequently this wil get used anyway.  For small positive constants,
-  you can always use mp_cmp_d(), and for zero, there is mp_cmp_z().
- */
-int    mp_cmp_int(const mp_int *a, long z, int kmflag)
-{
-  mp_int  tmp;
-  int     out;
-
-  ARGCHK(a != NULL, MP_EQ);
-
-  mp_init(&tmp, kmflag); mp_set_int(&tmp, z);
-  out = mp_cmp(a, &tmp);
-  mp_clear(&tmp);
-
-  return out;
-
-} /* end mp_cmp_int() */
-
-/* }}} */
-
-/* {{{ mp_isodd(a) */
-
-/*
-  mp_isodd(a)
-
-  Returns a true (non-zero) value if a is odd, false (zero) otherwise.
- */
-int    mp_isodd(const mp_int *a)
-{
-  ARGCHK(a != NULL, 0);
-
-  return (int)(DIGIT(a, 0) & 1);
-
-} /* end mp_isodd() */
-
-/* }}} */
-
-/* {{{ mp_iseven(a) */
-
-int    mp_iseven(const mp_int *a)
-{
-  return !mp_isodd(a);
-
-} /* end mp_iseven() */
-
-/* }}} */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Number theoretic functions */
-
-#if MP_NUMTH
-/* {{{ mp_gcd(a, b, c) */
-
-/*
-  Like the old mp_gcd() function, except computes the GCD using the
-  binary algorithm due to Josef Stein in 1961 (via Knuth).
- */
-mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c)
-{
-  mp_err   res;
-  mp_int   u, v, t;
-  mp_size  k = 0;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if(mp_cmp_z(a) == MP_EQ && mp_cmp_z(b) == MP_EQ)
-      return MP_RANGE;
-  if(mp_cmp_z(a) == MP_EQ) {
-    return mp_copy(b, c);
-  } else if(mp_cmp_z(b) == MP_EQ) {
-    return mp_copy(a, c);
-  }
-
-  if((res = mp_init(&t, FLAG(a))) != MP_OKAY)
-    return res;
-  if((res = mp_init_copy(&u, a)) != MP_OKAY)
-    goto U;
-  if((res = mp_init_copy(&v, b)) != MP_OKAY)
-    goto V;
-
-  SIGN(&u) = ZPOS;
-  SIGN(&v) = ZPOS;
-
-  /* Divide out common factors of 2 until at least 1 of a, b is even */
-  while(mp_iseven(&u) && mp_iseven(&v)) {
-    s_mp_div_2(&u);
-    s_mp_div_2(&v);
-    ++k;
-  }
-
-  /* Initialize t */
-  if(mp_isodd(&u)) {
-    if((res = mp_copy(&v, &t)) != MP_OKAY)
-      goto CLEANUP;
-
-    /* t = -v */
-    if(SIGN(&v) == ZPOS)
-      SIGN(&t) = NEG;
-    else
-      SIGN(&t) = ZPOS;
-
-  } else {
-    if((res = mp_copy(&u, &t)) != MP_OKAY)
-      goto CLEANUP;
-
-  }
-
-  for(;;) {
-    while(mp_iseven(&t)) {
-      s_mp_div_2(&t);
-    }
-
-    if(mp_cmp_z(&t) == MP_GT) {
-      if((res = mp_copy(&t, &u)) != MP_OKAY)
-        goto CLEANUP;
-
-    } else {
-      if((res = mp_copy(&t, &v)) != MP_OKAY)
-        goto CLEANUP;
-
-      /* v = -t */
-      if(SIGN(&t) == ZPOS)
-        SIGN(&v) = NEG;
-      else
-        SIGN(&v) = ZPOS;
-    }
-
-    if((res = mp_sub(&u, &v, &t)) != MP_OKAY)
-      goto CLEANUP;
-
-    if(s_mp_cmp_d(&t, 0) == MP_EQ)
-      break;
-  }
-
-  s_mp_2expt(&v, k);       /* v = 2^k   */
-  res = mp_mul(&u, &v, c); /* c = u * v */
-
- CLEANUP:
-  mp_clear(&v);
- V:
-  mp_clear(&u);
- U:
-  mp_clear(&t);
-
-  return res;
-
-} /* end mp_gcd() */
-
-/* }}} */
-
-/* {{{ mp_lcm(a, b, c) */
-
-/* We compute the least common multiple using the rule:
-
-   ab = [a, b](a, b)
-
-   ... by computing the product, and dividing out the gcd.
- */
-
-mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c)
-{
-  mp_int  gcd, prod;
-  mp_err  res;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  /* Set up temporaries */
-  if((res = mp_init(&gcd, FLAG(a))) != MP_OKAY)
-    return res;
-  if((res = mp_init(&prod, FLAG(a))) != MP_OKAY)
-    goto GCD;
-
-  if((res = mp_mul(a, b, &prod)) != MP_OKAY)
-    goto CLEANUP;
-  if((res = mp_gcd(a, b, &gcd)) != MP_OKAY)
-    goto CLEANUP;
-
-  res = mp_div(&prod, &gcd, c, NULL);
-
- CLEANUP:
-  mp_clear(&prod);
- GCD:
-  mp_clear(&gcd);
-
-  return res;
-
-} /* end mp_lcm() */
-
-/* }}} */
-
-/* {{{ mp_xgcd(a, b, g, x, y) */
-
-/*
-  mp_xgcd(a, b, g, x, y)
-
-  Compute g = (a, b) and values x and y satisfying Bezout's identity
-  (that is, ax + by = g).  This uses the binary extended GCD algorithm
-  based on the Stein algorithm used for mp_gcd()
-  See algorithm 14.61 in Handbook of Applied Cryptogrpahy.
- */
-
-mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y)
-{
-  mp_int   gx, xc, yc, u, v, A, B, C, D;
-  mp_int  *clean[9];
-  mp_err   res;
-  int      last = -1;
-
-  if(mp_cmp_z(b) == 0)
-    return MP_RANGE;
-
-  /* Initialize all these variables we need */
-  MP_CHECKOK( mp_init(&u, FLAG(a)) );
-  clean[++last] = &u;
-  MP_CHECKOK( mp_init(&v, FLAG(a)) );
-  clean[++last] = &v;
-  MP_CHECKOK( mp_init(&gx, FLAG(a)) );
-  clean[++last] = &gx;
-  MP_CHECKOK( mp_init(&A, FLAG(a)) );
-  clean[++last] = &A;
-  MP_CHECKOK( mp_init(&B, FLAG(a)) );
-  clean[++last] = &B;
-  MP_CHECKOK( mp_init(&C, FLAG(a)) );
-  clean[++last] = &C;
-  MP_CHECKOK( mp_init(&D, FLAG(a)) );
-  clean[++last] = &D;
-  MP_CHECKOK( mp_init_copy(&xc, a) );
-  clean[++last] = &xc;
-  mp_abs(&xc, &xc);
-  MP_CHECKOK( mp_init_copy(&yc, b) );
-  clean[++last] = &yc;
-  mp_abs(&yc, &yc);
-
-  mp_set(&gx, 1);
-
-  /* Divide by two until at least one of them is odd */
-  while(mp_iseven(&xc) && mp_iseven(&yc)) {
-    mp_size nx = mp_trailing_zeros(&xc);
-    mp_size ny = mp_trailing_zeros(&yc);
-    mp_size n  = MP_MIN(nx, ny);
-    s_mp_div_2d(&xc,n);
-    s_mp_div_2d(&yc,n);
-    MP_CHECKOK( s_mp_mul_2d(&gx,n) );
-  }
-
-  mp_copy(&xc, &u);
-  mp_copy(&yc, &v);
-  mp_set(&A, 1); mp_set(&D, 1);
-
-  /* Loop through binary GCD algorithm */
-  do {
-    while(mp_iseven(&u)) {
-      s_mp_div_2(&u);
-
-      if(mp_iseven(&A) && mp_iseven(&B)) {
-        s_mp_div_2(&A); s_mp_div_2(&B);
-      } else {
-        MP_CHECKOK( mp_add(&A, &yc, &A) );
-        s_mp_div_2(&A);
-        MP_CHECKOK( mp_sub(&B, &xc, &B) );
-        s_mp_div_2(&B);
-      }
-    }
-
-    while(mp_iseven(&v)) {
-      s_mp_div_2(&v);
-
-      if(mp_iseven(&C) && mp_iseven(&D)) {
-        s_mp_div_2(&C); s_mp_div_2(&D);
-      } else {
-        MP_CHECKOK( mp_add(&C, &yc, &C) );
-        s_mp_div_2(&C);
-        MP_CHECKOK( mp_sub(&D, &xc, &D) );
-        s_mp_div_2(&D);
-      }
-    }
-
-    if(mp_cmp(&u, &v) >= 0) {
-      MP_CHECKOK( mp_sub(&u, &v, &u) );
-      MP_CHECKOK( mp_sub(&A, &C, &A) );
-      MP_CHECKOK( mp_sub(&B, &D, &B) );
-    } else {
-      MP_CHECKOK( mp_sub(&v, &u, &v) );
-      MP_CHECKOK( mp_sub(&C, &A, &C) );
-      MP_CHECKOK( mp_sub(&D, &B, &D) );
-    }
-  } while (mp_cmp_z(&u) != 0);
-
-  /* copy results to output */
-  if(x)
-    MP_CHECKOK( mp_copy(&C, x) );
-
-  if(y)
-    MP_CHECKOK( mp_copy(&D, y) );
-
-  if(g)
-    MP_CHECKOK( mp_mul(&gx, &v, g) );
-
- CLEANUP:
-  while(last >= 0)
-    mp_clear(clean[last--]);
-
-  return res;
-
-} /* end mp_xgcd() */
-
-/* }}} */
-
-mp_size mp_trailing_zeros(const mp_int *mp)
-{
-  mp_digit d;
-  mp_size  n = 0;
-  int      ix;
-
-  if (!mp || !MP_DIGITS(mp) || !mp_cmp_z(mp))
-    return n;
-
-  for (ix = 0; !(d = MP_DIGIT(mp,ix)) && (ix < MP_USED(mp)); ++ix)
-    n += MP_DIGIT_BIT;
-  if (!d)
-    return 0;   /* shouldn't happen, but ... */
-#if !defined(MP_USE_UINT_DIGIT)
-  if (!(d & 0xffffffffU)) {
-    d >>= 32;
-    n  += 32;
-  }
-#endif
-  if (!(d & 0xffffU)) {
-    d >>= 16;
-    n  += 16;
-  }
-  if (!(d & 0xffU)) {
-    d >>= 8;
-    n  += 8;
-  }
-  if (!(d & 0xfU)) {
-    d >>= 4;
-    n  += 4;
-  }
-  if (!(d & 0x3U)) {
-    d >>= 2;
-    n  += 2;
-  }
-  if (!(d & 0x1U)) {
-    d >>= 1;
-    n  += 1;
-  }
-#if MP_ARGCHK == 2
-  assert(0 != (d & 1));
-#endif
-  return n;
-}
-
-/* Given a and prime p, computes c and k such that a*c == 2**k (mod p).
-** Returns k (positive) or error (negative).
-** This technique from the paper "Fast Modular Reciprocals" (unpublished)
-** by Richard Schroeppel (a.k.a. Captain Nemo).
-*/
-mp_err s_mp_almost_inverse(const mp_int *a, const mp_int *p, mp_int *c)
-{
-  mp_err res;
-  mp_err k    = 0;
-  mp_int d, f, g;
-
-  ARGCHK(a && p && c, MP_BADARG);
-
-  MP_DIGITS(&d) = 0;
-  MP_DIGITS(&f) = 0;
-  MP_DIGITS(&g) = 0;
-  MP_CHECKOK( mp_init(&d, FLAG(a)) );
-  MP_CHECKOK( mp_init_copy(&f, a) );    /* f = a */
-  MP_CHECKOK( mp_init_copy(&g, p) );    /* g = p */
-
-  mp_set(c, 1);
-  mp_zero(&d);
-
-  if (mp_cmp_z(&f) == 0) {
-    res = MP_UNDEF;
-  } else
-  for (;;) {
-    int diff_sign;
-    while (mp_iseven(&f)) {
-      mp_size n = mp_trailing_zeros(&f);
-      if (!n) {
-        res = MP_UNDEF;
-        goto CLEANUP;
-      }
-      s_mp_div_2d(&f, n);
-      MP_CHECKOK( s_mp_mul_2d(&d, n) );
-      k += n;
-    }
-    if (mp_cmp_d(&f, 1) == MP_EQ) {     /* f == 1 */
-      res = k;
-      break;
-    }
-    diff_sign = mp_cmp(&f, &g);
-    if (diff_sign < 0) {                /* f < g */
-      s_mp_exch(&f, &g);
-      s_mp_exch(c, &d);
-    } else if (diff_sign == 0) {                /* f == g */
-      res = MP_UNDEF;           /* a and p are not relatively prime */
-      break;
-    }
-    if ((MP_DIGIT(&f,0) % 4) == (MP_DIGIT(&g,0) % 4)) {
-      MP_CHECKOK( mp_sub(&f, &g, &f) ); /* f = f - g */
-      MP_CHECKOK( mp_sub(c,  &d,  c) ); /* c = c - d */
-    } else {
-      MP_CHECKOK( mp_add(&f, &g, &f) ); /* f = f + g */
-      MP_CHECKOK( mp_add(c,  &d,  c) ); /* c = c + d */
-    }
-  }
-  if (res >= 0) {
-    while (MP_SIGN(c) != MP_ZPOS) {
-      MP_CHECKOK( mp_add(c, p, c) );
-    }
-    res = k;
-  }
-
-CLEANUP:
-  mp_clear(&d);
-  mp_clear(&f);
-  mp_clear(&g);
-  return res;
-}
-
-/* Compute T = (P ** -1) mod MP_RADIX.  Also works for 16-bit mp_digits.
-** This technique from the paper "Fast Modular Reciprocals" (unpublished)
-** by Richard Schroeppel (a.k.a. Captain Nemo).
-*/
-mp_digit  s_mp_invmod_radix(mp_digit P)
-{
-  mp_digit T = P;
-  T *= 2 - (P * T);
-  T *= 2 - (P * T);
-  T *= 2 - (P * T);
-  T *= 2 - (P * T);
-#if !defined(MP_USE_UINT_DIGIT)
-  T *= 2 - (P * T);
-  T *= 2 - (P * T);
-#endif
-  return T;
-}
-
-/* Given c, k, and prime p, where a*c == 2**k (mod p),
-** Compute x = (a ** -1) mod p.  This is similar to Montgomery reduction.
-** This technique from the paper "Fast Modular Reciprocals" (unpublished)
-** by Richard Schroeppel (a.k.a. Captain Nemo).
-*/
-mp_err  s_mp_fixup_reciprocal(const mp_int *c, const mp_int *p, int k, mp_int *x)
-{
-  int      k_orig = k;
-  mp_digit r;
-  mp_size  ix;
-  mp_err   res;
-
-  if (mp_cmp_z(c) < 0) {                /* c < 0 */
-    MP_CHECKOK( mp_add(c, p, x) );      /* x = c + p */
-  } else {
-    MP_CHECKOK( mp_copy(c, x) );        /* x = c */
-  }
-
-  /* make sure x is large enough */
-  ix = MP_HOWMANY(k, MP_DIGIT_BIT) + MP_USED(p) + 1;
-  ix = MP_MAX(ix, MP_USED(x));
-  MP_CHECKOK( s_mp_pad(x, ix) );
-
-  r = 0 - s_mp_invmod_radix(MP_DIGIT(p,0));
-
-  for (ix = 0; k > 0; ix++) {
-    int      j = MP_MIN(k, MP_DIGIT_BIT);
-    mp_digit v = r * MP_DIGIT(x, ix);
-    if (j < MP_DIGIT_BIT) {
-      v &= ((mp_digit)1 << j) - 1;      /* v = v mod (2 ** j) */
-    }
-    s_mp_mul_d_add_offset(p, v, x, ix); /* x += p * v * (RADIX ** ix) */
-    k -= j;
-  }
-  s_mp_clamp(x);
-  s_mp_div_2d(x, k_orig);
-  res = MP_OKAY;
-
-CLEANUP:
-  return res;
-}
-
-/* compute mod inverse using Schroeppel's method, only if m is odd */
-mp_err s_mp_invmod_odd_m(const mp_int *a, const mp_int *m, mp_int *c)
-{
-  int k;
-  mp_err  res;
-  mp_int  x;
-
-  ARGCHK(a && m && c, MP_BADARG);
-
-  if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
-    return MP_RANGE;
-  if (mp_iseven(m))
-    return MP_UNDEF;
-
-  MP_DIGITS(&x) = 0;
-
-  if (a == c) {
-    if ((res = mp_init_copy(&x, a)) != MP_OKAY)
-      return res;
-    if (a == m)
-      m = &x;
-    a = &x;
-  } else if (m == c) {
-    if ((res = mp_init_copy(&x, m)) != MP_OKAY)
-      return res;
-    m = &x;
-  } else {
-    MP_DIGITS(&x) = 0;
-  }
-
-  MP_CHECKOK( s_mp_almost_inverse(a, m, c) );
-  k = res;
-  MP_CHECKOK( s_mp_fixup_reciprocal(c, m, k, c) );
-CLEANUP:
-  mp_clear(&x);
-  return res;
-}
-
-/* Known good algorithm for computing modular inverse.  But slow. */
-mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c)
-{
-  mp_int  g, x;
-  mp_err  res;
-
-  ARGCHK(a && m && c, MP_BADARG);
-
-  if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
-    return MP_RANGE;
-
-  MP_DIGITS(&g) = 0;
-  MP_DIGITS(&x) = 0;
-  MP_CHECKOK( mp_init(&x, FLAG(a)) );
-  MP_CHECKOK( mp_init(&g, FLAG(a)) );
-
-  MP_CHECKOK( mp_xgcd(a, m, &g, &x, NULL) );
-
-  if (mp_cmp_d(&g, 1) != MP_EQ) {
-    res = MP_UNDEF;
-    goto CLEANUP;
-  }
-
-  res = mp_mod(&x, m, c);
-  SIGN(c) = SIGN(a);
-
-CLEANUP:
-  mp_clear(&x);
-  mp_clear(&g);
-
-  return res;
-}
-
-/* modular inverse where modulus is 2**k. */
-/* c = a**-1 mod 2**k */
-mp_err s_mp_invmod_2d(const mp_int *a, mp_size k, mp_int *c)
-{
-  mp_err res;
-  mp_size ix = k + 4;
-  mp_int t0, t1, val, tmp, two2k;
-
-  static const mp_digit d2 = 2;
-  static const mp_int two = { 0, MP_ZPOS, 1, 1, (mp_digit *)&d2 };
-
-  if (mp_iseven(a))
-    return MP_UNDEF;
-  if (k <= MP_DIGIT_BIT) {
-    mp_digit i = s_mp_invmod_radix(MP_DIGIT(a,0));
-    if (k < MP_DIGIT_BIT)
-      i &= ((mp_digit)1 << k) - (mp_digit)1;
-    mp_set(c, i);
-    return MP_OKAY;
-  }
-  MP_DIGITS(&t0) = 0;
-  MP_DIGITS(&t1) = 0;
-  MP_DIGITS(&val) = 0;
-  MP_DIGITS(&tmp) = 0;
-  MP_DIGITS(&two2k) = 0;
-  MP_CHECKOK( mp_init_copy(&val, a) );
-  s_mp_mod_2d(&val, k);
-  MP_CHECKOK( mp_init_copy(&t0, &val) );
-  MP_CHECKOK( mp_init_copy(&t1, &t0)  );
-  MP_CHECKOK( mp_init(&tmp, FLAG(a)) );
-  MP_CHECKOK( mp_init(&two2k, FLAG(a)) );
-  MP_CHECKOK( s_mp_2expt(&two2k, k) );
-  do {
-    MP_CHECKOK( mp_mul(&val, &t1, &tmp)  );
-    MP_CHECKOK( mp_sub(&two, &tmp, &tmp) );
-    MP_CHECKOK( mp_mul(&t1, &tmp, &t1)   );
-    s_mp_mod_2d(&t1, k);
-    while (MP_SIGN(&t1) != MP_ZPOS) {
-      MP_CHECKOK( mp_add(&t1, &two2k, &t1) );
-    }
-    if (mp_cmp(&t1, &t0) == MP_EQ)
-      break;
-    MP_CHECKOK( mp_copy(&t1, &t0) );
-  } while (--ix > 0);
-  if (!ix) {
-    res = MP_UNDEF;
-  } else {
-    mp_exch(c, &t1);
-  }
-
-CLEANUP:
-  mp_clear(&t0);
-  mp_clear(&t1);
-  mp_clear(&val);
-  mp_clear(&tmp);
-  mp_clear(&two2k);
-  return res;
-}
-
-mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c)
-{
-  mp_err res;
-  mp_size k;
-  mp_int oddFactor, evenFactor; /* factors of the modulus */
-  mp_int oddPart, evenPart;     /* parts to combine via CRT. */
-  mp_int C2, tmp1, tmp2;
-
-  /*static const mp_digit d1 = 1; */
-  /*static const mp_int one = { MP_ZPOS, 1, 1, (mp_digit *)&d1 }; */
-
-  if ((res = s_mp_ispow2(m)) >= 0) {
-    k = res;
-    return s_mp_invmod_2d(a, k, c);
-  }
-  MP_DIGITS(&oddFactor) = 0;
-  MP_DIGITS(&evenFactor) = 0;
-  MP_DIGITS(&oddPart) = 0;
-  MP_DIGITS(&evenPart) = 0;
-  MP_DIGITS(&C2)     = 0;
-  MP_DIGITS(&tmp1)   = 0;
-  MP_DIGITS(&tmp2)   = 0;
-
-  MP_CHECKOK( mp_init_copy(&oddFactor, m) );    /* oddFactor = m */
-  MP_CHECKOK( mp_init(&evenFactor, FLAG(m)) );
-  MP_CHECKOK( mp_init(&oddPart, FLAG(m)) );
-  MP_CHECKOK( mp_init(&evenPart, FLAG(m)) );
-  MP_CHECKOK( mp_init(&C2, FLAG(m))     );
-  MP_CHECKOK( mp_init(&tmp1, FLAG(m))   );
-  MP_CHECKOK( mp_init(&tmp2, FLAG(m))   );
-
-  k = mp_trailing_zeros(m);
-  s_mp_div_2d(&oddFactor, k);
-  MP_CHECKOK( s_mp_2expt(&evenFactor, k) );
-
-  /* compute a**-1 mod oddFactor. */
-  MP_CHECKOK( s_mp_invmod_odd_m(a, &oddFactor, &oddPart) );
-  /* compute a**-1 mod evenFactor, where evenFactor == 2**k. */
-  MP_CHECKOK( s_mp_invmod_2d(   a,       k,    &evenPart) );
-
-  /* Use Chinese Remainer theorem to compute a**-1 mod m. */
-  /* let m1 = oddFactor,  v1 = oddPart,
-   * let m2 = evenFactor, v2 = evenPart.
-   */
-
-  /* Compute C2 = m1**-1 mod m2. */
-  MP_CHECKOK( s_mp_invmod_2d(&oddFactor, k,    &C2) );
-
-  /* compute u = (v2 - v1)*C2 mod m2 */
-  MP_CHECKOK( mp_sub(&evenPart, &oddPart,   &tmp1) );
-  MP_CHECKOK( mp_mul(&tmp1,     &C2,        &tmp2) );
-  s_mp_mod_2d(&tmp2, k);
-  while (MP_SIGN(&tmp2) != MP_ZPOS) {
-    MP_CHECKOK( mp_add(&tmp2, &evenFactor, &tmp2) );
-  }
-
-  /* compute answer = v1 + u*m1 */
-  MP_CHECKOK( mp_mul(&tmp2,     &oddFactor, c) );
-  MP_CHECKOK( mp_add(&oddPart,  c,          c) );
-  /* not sure this is necessary, but it's low cost if not. */
-  MP_CHECKOK( mp_mod(c,         m,          c) );
-
-CLEANUP:
-  mp_clear(&oddFactor);
-  mp_clear(&evenFactor);
-  mp_clear(&oddPart);
-  mp_clear(&evenPart);
-  mp_clear(&C2);
-  mp_clear(&tmp1);
-  mp_clear(&tmp2);
-  return res;
-}
-
-
-/* {{{ mp_invmod(a, m, c) */
-
-/*
-  mp_invmod(a, m, c)
-
-  Compute c = a^-1 (mod m), if there is an inverse for a (mod m).
-  This is equivalent to the question of whether (a, m) = 1.  If not,
-  MP_UNDEF is returned, and there is no inverse.
- */
-
-mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c)
-{
-
-  ARGCHK(a && m && c, MP_BADARG);
-
-  if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
-    return MP_RANGE;
-
-  if (mp_isodd(m)) {
-    return s_mp_invmod_odd_m(a, m, c);
-  }
-  if (mp_iseven(a))
-    return MP_UNDEF;    /* not invertable */
-
-  return s_mp_invmod_even_m(a, m, c);
-
-} /* end mp_invmod() */
-
-/* }}} */
-#endif /* if MP_NUMTH */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ mp_print(mp, ofp) */
-
-#if MP_IOFUNC
-/*
-  mp_print(mp, ofp)
-
-  Print a textual representation of the given mp_int on the output
-  stream 'ofp'.  Output is generated using the internal radix.
- */
-
-void   mp_print(mp_int *mp, FILE *ofp)
-{
-  int   ix;
-
-  if(mp == NULL || ofp == NULL)
-    return;
-
-  fputc((SIGN(mp) == NEG) ? '-' : '+', ofp);
-
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    fprintf(ofp, DIGIT_FMT, DIGIT(mp, ix));
-  }
-
-} /* end mp_print() */
-
-#endif /* if MP_IOFUNC */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ More I/O Functions */
-
-/* {{{ mp_read_raw(mp, str, len) */
-
-/*
-   mp_read_raw(mp, str, len)
-
-   Read in a raw value (base 256) into the given mp_int
- */
-
-mp_err  mp_read_raw(mp_int *mp, char *str, int len)
-{
-  int            ix;
-  mp_err         res;
-  unsigned char *ustr = (unsigned char *)str;
-
-  ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
-
-  mp_zero(mp);
-
-  /* Get sign from first byte */
-  if(ustr[0])
-    SIGN(mp) = NEG;
-  else
-    SIGN(mp) = ZPOS;
-
-  /* Read the rest of the digits */
-  for(ix = 1; ix < len; ix++) {
-    if((res = mp_mul_d(mp, 256, mp)) != MP_OKAY)
-      return res;
-    if((res = mp_add_d(mp, ustr[ix], mp)) != MP_OKAY)
-      return res;
-  }
-
-  return MP_OKAY;
-
-} /* end mp_read_raw() */
-
-/* }}} */
-
-/* {{{ mp_raw_size(mp) */
-
-int    mp_raw_size(mp_int *mp)
-{
-  ARGCHK(mp != NULL, 0);
-
-  return (USED(mp) * sizeof(mp_digit)) + 1;
-
-} /* end mp_raw_size() */
-
-/* }}} */
-
-/* {{{ mp_toraw(mp, str) */
-
-mp_err mp_toraw(mp_int *mp, char *str)
-{
-  int  ix, jx, pos = 1;
-
-  ARGCHK(mp != NULL && str != NULL, MP_BADARG);
-
-  str[0] = (char)SIGN(mp);
-
-  /* Iterate over each digit... */
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    mp_digit  d = DIGIT(mp, ix);
-
-    /* Unpack digit bytes, high order first */
-    for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
-      str[pos++] = (char)(d >> (jx * CHAR_BIT));
-    }
-  }
-
-  return MP_OKAY;
-
-} /* end mp_toraw() */
-
-/* }}} */
-
-/* {{{ mp_read_radix(mp, str, radix) */
-
-/*
-  mp_read_radix(mp, str, radix)
-
-  Read an integer from the given string, and set mp to the resulting
-  value.  The input is presumed to be in base 10.  Leading non-digit
-  characters are ignored, and the function reads until a non-digit
-  character or the end of the string.
- */
-
-mp_err  mp_read_radix(mp_int *mp, const char *str, int radix)
-{
-  int     ix = 0, val = 0;
-  mp_err  res;
-  mp_sign sig = ZPOS;
-
-  ARGCHK(mp != NULL && str != NULL && radix >= 2 && radix <= MAX_RADIX,
-         MP_BADARG);
-
-  mp_zero(mp);
-
-  /* Skip leading non-digit characters until a digit or '-' or '+' */
-  while(str[ix] &&
-        (s_mp_tovalue(str[ix], radix) < 0) &&
-        str[ix] != '-' &&
-        str[ix] != '+') {
-    ++ix;
-  }
-
-  if(str[ix] == '-') {
-    sig = NEG;
-    ++ix;
-  } else if(str[ix] == '+') {
-    sig = ZPOS; /* this is the default anyway... */
-    ++ix;
-  }
-
-  while((val = s_mp_tovalue(str[ix], radix)) >= 0) {
-    if((res = s_mp_mul_d(mp, radix)) != MP_OKAY)
-      return res;
-    if((res = s_mp_add_d(mp, val)) != MP_OKAY)
-      return res;
-    ++ix;
-  }
-
-  if(s_mp_cmp_d(mp, 0) == MP_EQ)
-    SIGN(mp) = ZPOS;
-  else
-    SIGN(mp) = sig;
-
-  return MP_OKAY;
-
-} /* end mp_read_radix() */
-
-mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix)
-{
-  int     radix = default_radix;
-  int     cx;
-  mp_sign sig   = ZPOS;
-  mp_err  res;
-
-  /* Skip leading non-digit characters until a digit or '-' or '+' */
-  while ((cx = *str) != 0 &&
-        (s_mp_tovalue(cx, radix) < 0) &&
-        cx != '-' &&
-        cx != '+') {
-    ++str;
-  }
-
-  if (cx == '-') {
-    sig = NEG;
-    ++str;
-  } else if (cx == '+') {
-    sig = ZPOS; /* this is the default anyway... */
-    ++str;
-  }
-
-  if (str[0] == '0') {
-    if ((str[1] | 0x20) == 'x') {
-      radix = 16;
-      str += 2;
-    } else {
-      radix = 8;
-      str++;
-    }
-  }
-  res = mp_read_radix(a, str, radix);
-  if (res == MP_OKAY) {
-    MP_SIGN(a) = (s_mp_cmp_d(a, 0) == MP_EQ) ? ZPOS : sig;
-  }
-  return res;
-}
-
-/* }}} */
-
-/* {{{ mp_radix_size(mp, radix) */
-
-int    mp_radix_size(mp_int *mp, int radix)
-{
-  int  bits;
-
-  if(!mp || radix < 2 || radix > MAX_RADIX)
-    return 0;
-
-  bits = USED(mp) * DIGIT_BIT - 1;
-
-  return s_mp_outlen(bits, radix);
-
-} /* end mp_radix_size() */
-
-/* }}} */
-
-/* {{{ mp_toradix(mp, str, radix) */
-
-mp_err mp_toradix(mp_int *mp, char *str, int radix)
-{
-  int  ix, pos = 0;
-
-  ARGCHK(mp != NULL && str != NULL, MP_BADARG);
-  ARGCHK(radix > 1 && radix <= MAX_RADIX, MP_RANGE);
-
-  if(mp_cmp_z(mp) == MP_EQ) {
-    str[0] = '0';
-    str[1] = '\0';
-  } else {
-    mp_err   res;
-    mp_int   tmp;
-    mp_sign  sgn;
-    mp_digit rem, rdx = (mp_digit)radix;
-    char     ch;
-
-    if((res = mp_init_copy(&tmp, mp)) != MP_OKAY)
-      return res;
-
-    /* Save sign for later, and take absolute value */
-    sgn = SIGN(&tmp); SIGN(&tmp) = ZPOS;
-
-    /* Generate output digits in reverse order      */
-    while(mp_cmp_z(&tmp) != 0) {
-      if((res = mp_div_d(&tmp, rdx, &tmp, &rem)) != MP_OKAY) {
-        mp_clear(&tmp);
-        return res;
-      }
-
-      /* Generate digits, use capital letters */
-      ch = s_mp_todigit(rem, radix, 0);
-
-      str[pos++] = ch;
-    }
-
-    /* Add - sign if original value was negative */
-    if(sgn == NEG)
-      str[pos++] = '-';
-
-    /* Add trailing NUL to end the string        */
-    str[pos--] = '\0';
-
-    /* Reverse the digits and sign indicator     */
-    ix = 0;
-    while(ix < pos) {
-      char tmp = str[ix];
-
-      str[ix] = str[pos];
-      str[pos] = tmp;
-      ++ix;
-      --pos;
-    }
-
-    mp_clear(&tmp);
-  }
-
-  return MP_OKAY;
-
-} /* end mp_toradix() */
-
-/* }}} */
-
-/* {{{ mp_tovalue(ch, r) */
-
-int    mp_tovalue(char ch, int r)
-{
-  return s_mp_tovalue(ch, r);
-
-} /* end mp_tovalue() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ mp_strerror(ec) */
-
-/*
-  mp_strerror(ec)
-
-  Return a string describing the meaning of error code 'ec'.  The
-  string returned is allocated in static memory, so the caller should
-  not attempt to modify or free the memory associated with this
-  string.
- */
-const char  *mp_strerror(mp_err ec)
-{
-  int   aec = (ec < 0) ? -ec : ec;
-
-  /* Code values are negative, so the senses of these comparisons
-     are accurate */
-  if(ec < MP_LAST_CODE || ec > MP_OKAY) {
-    return mp_err_string[0];  /* unknown error code */
-  } else {
-    return mp_err_string[aec + 1];
-  }
-
-} /* end mp_strerror() */
-
-/* }}} */
-
-/*========================================================================*/
-/*------------------------------------------------------------------------*/
-/* Static function definitions (internal use only)                        */
-
-/* {{{ Memory management */
-
-/* {{{ s_mp_grow(mp, min) */
-
-/* Make sure there are at least 'min' digits allocated to mp              */
-mp_err   s_mp_grow(mp_int *mp, mp_size min)
-{
-  if(min > ALLOC(mp)) {
-    mp_digit   *tmp;
-
-    /* Set min to next nearest default precision block size */
-    min = MP_ROUNDUP(min, s_mp_defprec);
-
-    if((tmp = s_mp_alloc(min, sizeof(mp_digit), FLAG(mp))) == NULL)
-      return MP_MEM;
-
-    s_mp_copy(DIGITS(mp), tmp, USED(mp));
-
-#if MP_CRYPTO
-    s_mp_setz(DIGITS(mp), ALLOC(mp));
-#endif
-    s_mp_free(DIGITS(mp), ALLOC(mp));
-    DIGITS(mp) = tmp;
-    ALLOC(mp) = min;
-  }
-
-  return MP_OKAY;
-
-} /* end s_mp_grow() */
-
-/* }}} */
-
-/* {{{ s_mp_pad(mp, min) */
-
-/* Make sure the used size of mp is at least 'min', growing if needed     */
-mp_err   s_mp_pad(mp_int *mp, mp_size min)
-{
-  if(min > USED(mp)) {
-    mp_err  res;
-
-    /* Make sure there is room to increase precision  */
-    if (min > ALLOC(mp)) {
-      if ((res = s_mp_grow(mp, min)) != MP_OKAY)
-        return res;
-    } else {
-      s_mp_setz(DIGITS(mp) + USED(mp), min - USED(mp));
-    }
-
-    /* Increase precision; should already be 0-filled */
-    USED(mp) = min;
-  }
-
-  return MP_OKAY;
-
-} /* end s_mp_pad() */
-
-/* }}} */
-
-/* {{{ s_mp_setz(dp, count) */
-
-#if MP_MACRO == 0
-/* Set 'count' digits pointed to by dp to be zeroes                       */
-void s_mp_setz(mp_digit *dp, mp_size count)
-{
-#if MP_MEMSET == 0
-  int  ix;
-
-  for(ix = 0; ix < count; ix++)
-    dp[ix] = 0;
-#else
-  memset(dp, 0, count * sizeof(mp_digit));
-#endif
-
-} /* end s_mp_setz() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_copy(sp, dp, count) */
-
-#if MP_MACRO == 0
-/* Copy 'count' digits from sp to dp                                      */
-void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count)
-{
-#if MP_MEMCPY == 0
-  int  ix;
-
-  for(ix = 0; ix < count; ix++)
-    dp[ix] = sp[ix];
-#else
-  memcpy(dp, sp, count * sizeof(mp_digit));
-#endif
-
-} /* end s_mp_copy() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_alloc(nb, ni, kmflag) */
-
-#if MP_MACRO == 0
-/* Allocate ni records of nb bytes each, and return a pointer to that     */
-void    *s_mp_alloc(size_t nb, size_t ni, int kmflag)
-{
-  mp_int *mp;
-  ++mp_allocs;
-#ifdef _KERNEL
-  mp = kmem_zalloc(nb * ni, kmflag);
-  if (mp != NULL)
-    FLAG(mp) = kmflag;
-  return (mp);
-#else
-  return calloc(nb, ni);
-#endif
-
-} /* end s_mp_alloc() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_free(ptr) */
-
-#if MP_MACRO == 0
-/* Free the memory pointed to by ptr                                      */
-void     s_mp_free(void *ptr, mp_size alloc)
-{
-  if(ptr) {
-    ++mp_frees;
-#ifdef _KERNEL
-    kmem_free(ptr, alloc * sizeof (mp_digit));
-#else
-    free(ptr);
-#endif
-  }
-} /* end s_mp_free() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_clamp(mp) */
-
-#if MP_MACRO == 0
-/* Remove leading zeroes from the given value                             */
-void     s_mp_clamp(mp_int *mp)
-{
-  mp_size used = MP_USED(mp);
-  while (used > 1 && DIGIT(mp, used - 1) == 0)
-    --used;
-  MP_USED(mp) = used;
-} /* end s_mp_clamp() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_exch(a, b) */
-
-/* Exchange the data for a and b; (b, a) = (a, b)                         */
-void     s_mp_exch(mp_int *a, mp_int *b)
-{
-  mp_int   tmp;
-
-  tmp = *a;
-  *a = *b;
-  *b = tmp;
-
-} /* end s_mp_exch() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Arithmetic helpers */
-
-/* {{{ s_mp_lshd(mp, p) */
-
-/*
-   Shift mp leftward by p digits, growing if needed, and zero-filling
-   the in-shifted digits at the right end.  This is a convenient
-   alternative to multiplication by powers of the radix
-   The value of USED(mp) must already have been set to the value for
-   the shifted result.
- */
-
-mp_err   s_mp_lshd(mp_int *mp, mp_size p)
-{
-  mp_err  res;
-  mp_size pos;
-  int     ix;
-
-  if(p == 0)
-    return MP_OKAY;
-
-  if (MP_USED(mp) == 1 && MP_DIGIT(mp, 0) == 0)
-    return MP_OKAY;
-
-  if((res = s_mp_pad(mp, USED(mp) + p)) != MP_OKAY)
-    return res;
-
-  pos = USED(mp) - 1;
-
-  /* Shift all the significant figures over as needed */
-  for(ix = pos - p; ix >= 0; ix--)
-    DIGIT(mp, ix + p) = DIGIT(mp, ix);
-
-  /* Fill the bottom digits with zeroes */
-  for(ix = 0; ix < p; ix++)
-    DIGIT(mp, ix) = 0;
-
-  return MP_OKAY;
-
-} /* end s_mp_lshd() */
-
-/* }}} */
-
-/* {{{ s_mp_mul_2d(mp, d) */
-
-/*
-  Multiply the integer by 2^d, where d is a number of bits.  This
-  amounts to a bitwise shift of the value.
- */
-mp_err   s_mp_mul_2d(mp_int *mp, mp_digit d)
-{
-  mp_err   res;
-  mp_digit dshift, bshift;
-  mp_digit mask;
-
-  ARGCHK(mp != NULL,  MP_BADARG);
-
-  dshift = d / MP_DIGIT_BIT;
-  bshift = d % MP_DIGIT_BIT;
-  /* bits to be shifted out of the top word */
-  mask   = ((mp_digit)~0 << (MP_DIGIT_BIT - bshift));
-  mask  &= MP_DIGIT(mp, MP_USED(mp) - 1);
-
-  if (MP_OKAY != (res = s_mp_pad(mp, MP_USED(mp) + dshift + (mask != 0) )))
-    return res;
-
-  if (dshift && MP_OKAY != (res = s_mp_lshd(mp, dshift)))
-    return res;
-
-  if (bshift) {
-    mp_digit *pa = MP_DIGITS(mp);
-    mp_digit *alim = pa + MP_USED(mp);
-    mp_digit  prev = 0;
-
-    for (pa += dshift; pa < alim; ) {
-      mp_digit x = *pa;
-      *pa++ = (x << bshift) | prev;
-      prev = x >> (DIGIT_BIT - bshift);
-    }
-  }
-
-  s_mp_clamp(mp);
-  return MP_OKAY;
-} /* end s_mp_mul_2d() */
-
-/* {{{ s_mp_rshd(mp, p) */
-
-/*
-   Shift mp rightward by p digits.  Maintains the invariant that
-   digits above the precision are all zero.  Digits shifted off the
-   end are lost.  Cannot fail.
- */
-
-void     s_mp_rshd(mp_int *mp, mp_size p)
-{
-  mp_size  ix;
-  mp_digit *src, *dst;
-
-  if(p == 0)
-    return;
-
-  /* Shortcut when all digits are to be shifted off */
-  if(p >= USED(mp)) {
-    s_mp_setz(DIGITS(mp), ALLOC(mp));
-    USED(mp) = 1;
-    SIGN(mp) = ZPOS;
-    return;
-  }
-
-  /* Shift all the significant figures over as needed */
-  dst = MP_DIGITS(mp);
-  src = dst + p;
-  for (ix = USED(mp) - p; ix > 0; ix--)
-    *dst++ = *src++;
-
-  MP_USED(mp) -= p;
-  /* Fill the top digits with zeroes */
-  while (p-- > 0)
-    *dst++ = 0;
-
-#if 0
-  /* Strip off any leading zeroes    */
-  s_mp_clamp(mp);
-#endif
-
-} /* end s_mp_rshd() */
-
-/* }}} */
-
-/* {{{ s_mp_div_2(mp) */
-
-/* Divide by two -- take advantage of radix properties to do it fast      */
-void     s_mp_div_2(mp_int *mp)
-{
-  s_mp_div_2d(mp, 1);
-
-} /* end s_mp_div_2() */
-
-/* }}} */
-
-/* {{{ s_mp_mul_2(mp) */
-
-mp_err s_mp_mul_2(mp_int *mp)
-{
-  mp_digit *pd;
-  int      ix, used;
-  mp_digit kin = 0;
-
-  /* Shift digits leftward by 1 bit */
-  used = MP_USED(mp);
-  pd = MP_DIGITS(mp);
-  for (ix = 0; ix < used; ix++) {
-    mp_digit d = *pd;
-    *pd++ = (d << 1) | kin;
-    kin = (d >> (DIGIT_BIT - 1));
-  }
-
-  /* Deal with rollover from last digit */
-  if (kin) {
-    if (ix >= ALLOC(mp)) {
-      mp_err res;
-      if((res = s_mp_grow(mp, ALLOC(mp) + 1)) != MP_OKAY)
-        return res;
-    }
-
-    DIGIT(mp, ix) = kin;
-    USED(mp) += 1;
-  }
-
-  return MP_OKAY;
-
-} /* end s_mp_mul_2() */
-
-/* }}} */
-
-/* {{{ s_mp_mod_2d(mp, d) */
-
-/*
-  Remainder the integer by 2^d, where d is a number of bits.  This
-  amounts to a bitwise AND of the value, and does not require the full
-  division code
- */
-void     s_mp_mod_2d(mp_int *mp, mp_digit d)
-{
-  mp_size  ndig = (d / DIGIT_BIT), nbit = (d % DIGIT_BIT);
-  mp_size  ix;
-  mp_digit dmask;
-
-  if(ndig >= USED(mp))
-    return;
-
-  /* Flush all the bits above 2^d in its digit */
-  dmask = ((mp_digit)1 << nbit) - 1;
-  DIGIT(mp, ndig) &= dmask;
-
-  /* Flush all digits above the one with 2^d in it */
-  for(ix = ndig + 1; ix < USED(mp); ix++)
-    DIGIT(mp, ix) = 0;
-
-  s_mp_clamp(mp);
-
-} /* end s_mp_mod_2d() */
-
-/* }}} */
-
-/* {{{ s_mp_div_2d(mp, d) */
-
-/*
-  Divide the integer by 2^d, where d is a number of bits.  This
-  amounts to a bitwise shift of the value, and does not require the
-  full division code (used in Barrett reduction, see below)
- */
-void     s_mp_div_2d(mp_int *mp, mp_digit d)
-{
-  int       ix;
-  mp_digit  save, next, mask;
-
-  s_mp_rshd(mp, d / DIGIT_BIT);
-  d %= DIGIT_BIT;
-  if (d) {
-    mask = ((mp_digit)1 << d) - 1;
-    save = 0;
-    for(ix = USED(mp) - 1; ix >= 0; ix--) {
-      next = DIGIT(mp, ix) & mask;
-      DIGIT(mp, ix) = (DIGIT(mp, ix) >> d) | (save << (DIGIT_BIT - d));
-      save = next;
-    }
-  }
-  s_mp_clamp(mp);
-
-} /* end s_mp_div_2d() */
-
-/* }}} */
-
-/* {{{ s_mp_norm(a, b, *d) */
-
-/*
-  s_mp_norm(a, b, *d)
-
-  Normalize a and b for division, where b is the divisor.  In order
-  that we might make good guesses for quotient digits, we want the
-  leading digit of b to be at least half the radix, which we
-  accomplish by multiplying a and b by a power of 2.  The exponent
-  (shift count) is placed in *pd, so that the remainder can be shifted
-  back at the end of the division process.
- */
-
-mp_err   s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd)
-{
-  mp_digit  d;
-  mp_digit  mask;
-  mp_digit  b_msd;
-  mp_err    res    = MP_OKAY;
-
-  d = 0;
-  mask  = DIGIT_MAX & ~(DIGIT_MAX >> 1);        /* mask is msb of digit */
-  b_msd = DIGIT(b, USED(b) - 1);
-  while (!(b_msd & mask)) {
-    b_msd <<= 1;
-    ++d;
-  }
-
-  if (d) {
-    MP_CHECKOK( s_mp_mul_2d(a, d) );
-    MP_CHECKOK( s_mp_mul_2d(b, d) );
-  }
-
-  *pd = d;
-CLEANUP:
-  return res;
-
-} /* end s_mp_norm() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Primitive digit arithmetic */
-
-/* {{{ s_mp_add_d(mp, d) */
-
-/* Add d to |mp| in place                                                 */
-mp_err   s_mp_add_d(mp_int *mp, mp_digit d)    /* unsigned digit addition */
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  mp_word   w, k = 0;
-  mp_size   ix = 1;
-
-  w = (mp_word)DIGIT(mp, 0) + d;
-  DIGIT(mp, 0) = ACCUM(w);
-  k = CARRYOUT(w);
-
-  while(ix < USED(mp) && k) {
-    w = (mp_word)DIGIT(mp, ix) + k;
-    DIGIT(mp, ix) = ACCUM(w);
-    k = CARRYOUT(w);
-    ++ix;
-  }
-
-  if(k != 0) {
-    mp_err  res;
-
-    if((res = s_mp_pad(mp, USED(mp) + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(mp, ix) = (mp_digit)k;
-  }
-
-  return MP_OKAY;
-#else
-  mp_digit * pmp = MP_DIGITS(mp);
-  mp_digit sum, mp_i, carry = 0;
-  mp_err   res = MP_OKAY;
-  int used = (int)MP_USED(mp);
-
-  mp_i = *pmp;
-  *pmp++ = sum = d + mp_i;
-  carry = (sum < d);
-  while (carry && --used > 0) {
-    mp_i = *pmp;
-    *pmp++ = sum = carry + mp_i;
-    carry = !sum;
-  }
-  if (carry && !used) {
-    /* mp is growing */
-    used = MP_USED(mp);
-    MP_CHECKOK( s_mp_pad(mp, used + 1) );
-    MP_DIGIT(mp, used) = carry;
-  }
-CLEANUP:
-  return res;
-#endif
-} /* end s_mp_add_d() */
-
-/* }}} */
-
-/* {{{ s_mp_sub_d(mp, d) */
-
-/* Subtract d from |mp| in place, assumes |mp| > d                        */
-mp_err   s_mp_sub_d(mp_int *mp, mp_digit d)    /* unsigned digit subtract */
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-  mp_word   w, b = 0;
-  mp_size   ix = 1;
-
-  /* Compute initial subtraction    */
-  w = (RADIX + (mp_word)DIGIT(mp, 0)) - d;
-  b = CARRYOUT(w) ? 0 : 1;
-  DIGIT(mp, 0) = ACCUM(w);
-
-  /* Propagate borrows leftward     */
-  while(b && ix < USED(mp)) {
-    w = (RADIX + (mp_word)DIGIT(mp, ix)) - b;
-    b = CARRYOUT(w) ? 0 : 1;
-    DIGIT(mp, ix) = ACCUM(w);
-    ++ix;
-  }
-
-  /* Remove leading zeroes          */
-  s_mp_clamp(mp);
-
-  /* If we have a borrow out, it's a violation of the input invariant */
-  if(b)
-    return MP_RANGE;
-  else
-    return MP_OKAY;
-#else
-  mp_digit *pmp = MP_DIGITS(mp);
-  mp_digit mp_i, diff, borrow;
-  mp_size  used = MP_USED(mp);
-
-  mp_i = *pmp;
-  *pmp++ = diff = mp_i - d;
-  borrow = (diff > mp_i);
-  while (borrow && --used) {
-    mp_i = *pmp;
-    *pmp++ = diff = mp_i - borrow;
-    borrow = (diff > mp_i);
-  }
-  s_mp_clamp(mp);
-  return (borrow && !used) ? MP_RANGE : MP_OKAY;
-#endif
-} /* end s_mp_sub_d() */
-
-/* }}} */
-
-/* {{{ s_mp_mul_d(a, d) */
-
-/* Compute a = a * d, single digit multiplication                         */
-mp_err   s_mp_mul_d(mp_int *a, mp_digit d)
-{
-  mp_err  res;
-  mp_size used;
-  int     pow;
-
-  if (!d) {
-    mp_zero(a);
-    return MP_OKAY;
-  }
-  if (d == 1)
-    return MP_OKAY;
-  if (0 <= (pow = s_mp_ispow2d(d))) {
-    return s_mp_mul_2d(a, (mp_digit)pow);
-  }
-
-  used = MP_USED(a);
-  MP_CHECKOK( s_mp_pad(a, used + 1) );
-
-  s_mpv_mul_d(MP_DIGITS(a), used, d, MP_DIGITS(a));
-
-  s_mp_clamp(a);
-
-CLEANUP:
-  return res;
-
-} /* end s_mp_mul_d() */
-
-/* }}} */
-
-/* {{{ s_mp_div_d(mp, d, r) */
-
-/*
-  s_mp_div_d(mp, d, r)
-
-  Compute the quotient mp = mp / d and remainder r = mp mod d, for a
-  single digit d.  If r is null, the remainder will be discarded.
- */
-
-mp_err   s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
-  mp_word   w = 0, q;
-#else
-  mp_digit  w, q;
-#endif
-  int       ix;
-  mp_err    res;
-  mp_int    quot;
-  mp_int    rem;
-
-  if(d == 0)
-    return MP_RANGE;
-  if (d == 1) {
-    if (r)
-      *r = 0;
-    return MP_OKAY;
-  }
-  /* could check for power of 2 here, but mp_div_d does that. */
-  if (MP_USED(mp) == 1) {
-    mp_digit n   = MP_DIGIT(mp,0);
-    mp_digit rem;
-
-    q   = n / d;
-    rem = n % d;
-    MP_DIGIT(mp,0) = q;
-    if (r)
-      *r = rem;
-    return MP_OKAY;
-  }
-
-  MP_DIGITS(&rem)  = 0;
-  MP_DIGITS(&quot) = 0;
-  /* Make room for the quotient */
-  MP_CHECKOK( mp_init_size(&quot, USED(mp), FLAG(mp)) );
-
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    w = (w << DIGIT_BIT) | DIGIT(mp, ix);
-
-    if(w >= d) {
-      q = w / d;
-      w = w % d;
-    } else {
-      q = 0;
-    }
-
-    s_mp_lshd(&quot, 1);
-    DIGIT(&quot, 0) = (mp_digit)q;
-  }
-#else
-  {
-    mp_digit p;
-#if !defined(MP_ASSEMBLY_DIV_2DX1D)
-    mp_digit norm;
-#endif
-
-    MP_CHECKOK( mp_init_copy(&rem, mp) );
-
-#if !defined(MP_ASSEMBLY_DIV_2DX1D)
-    MP_DIGIT(&quot, 0) = d;
-    MP_CHECKOK( s_mp_norm(&rem, &quot, &norm) );
-    if (norm)
-      d <<= norm;
-    MP_DIGIT(&quot, 0) = 0;
-#endif
-
-    p = 0;
-    for (ix = USED(&rem) - 1; ix >= 0; ix--) {
-      w = DIGIT(&rem, ix);
-
-      if (p) {
-        MP_CHECKOK( s_mpv_div_2dx1d(p, w, d, &q, &w) );
-      } else if (w >= d) {
-        q = w / d;
-        w = w % d;
-      } else {
-        q = 0;
-      }
-
-      MP_CHECKOK( s_mp_lshd(&quot, 1) );
-      DIGIT(&quot, 0) = q;
-      p = w;
-    }
-#if !defined(MP_ASSEMBLY_DIV_2DX1D)
-    if (norm)
-      w >>= norm;
-#endif
-  }
-#endif
-
-  /* Deliver the remainder, if desired */
-  if(r)
-    *r = (mp_digit)w;
-
-  s_mp_clamp(&quot);
-  mp_exch(&quot, mp);
-CLEANUP:
-  mp_clear(&quot);
-  mp_clear(&rem);
-
-  return res;
-} /* end s_mp_div_d() */
-
-/* }}} */
-
-
-/* }}} */
-
-/* {{{ Primitive full arithmetic */
-
-/* {{{ s_mp_add(a, b) */
-
-/* Compute a = |a| + |b|                                                  */
-mp_err   s_mp_add(mp_int *a, const mp_int *b)  /* magnitude addition      */
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  mp_word   w = 0;
-#else
-  mp_digit  d, sum, carry = 0;
-#endif
-  mp_digit *pa, *pb;
-  mp_size   ix;
-  mp_size   used;
-  mp_err    res;
-
-  /* Make sure a has enough precision for the output value */
-  if((USED(b) > USED(a)) && (res = s_mp_pad(a, USED(b))) != MP_OKAY)
-    return res;
-
-  /*
-    Add up all digits up to the precision of b.  If b had initially
-    the same precision as a, or greater, we took care of it by the
-    padding step above, so there is no problem.  If b had initially
-    less precision, we'll have to make sure the carry out is duly
-    propagated upward among the higher-order digits of the sum.
-   */
-  pa = MP_DIGITS(a);
-  pb = MP_DIGITS(b);
-  used = MP_USED(b);
-  for(ix = 0; ix < used; ix++) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-    w = w + *pa + *pb++;
-    *pa++ = ACCUM(w);
-    w = CARRYOUT(w);
-#else
-    d = *pa;
-    sum = d + *pb++;
-    d = (sum < d);                      /* detect overflow */
-    *pa++ = sum += carry;
-    carry = d + (sum < carry);          /* detect overflow */
-#endif
-  }
-
-  /* If we run out of 'b' digits before we're actually done, make
-     sure the carries get propagated upward...
-   */
-  used = MP_USED(a);
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  while (w && ix < used) {
-    w = w + *pa;
-    *pa++ = ACCUM(w);
-    w = CARRYOUT(w);
-    ++ix;
-  }
-#else
-  while (carry && ix < used) {
-    sum = carry + *pa;
-    *pa++ = sum;
-    carry = !sum;
-    ++ix;
-  }
-#endif
-
-  /* If there's an overall carry out, increase precision and include
-     it.  We could have done this initially, but why touch the memory
-     allocator unless we're sure we have to?
-   */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  if (w) {
-    if((res = s_mp_pad(a, used + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(a, ix) = (mp_digit)w;
-  }
-#else
-  if (carry) {
-    if((res = s_mp_pad(a, used + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(a, used) = carry;
-  }
-#endif
-
-  return MP_OKAY;
-} /* end s_mp_add() */
-
-/* }}} */
-
-/* Compute c = |a| + |b|         */ /* magnitude addition      */
-mp_err   s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c)
-{
-  mp_digit *pa, *pb, *pc;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  mp_word   w = 0;
-#else
-  mp_digit  sum, carry = 0, d;
-#endif
-  mp_size   ix;
-  mp_size   used;
-  mp_err    res;
-
-  MP_SIGN(c) = MP_SIGN(a);
-  if (MP_USED(a) < MP_USED(b)) {
-    const mp_int *xch = a;
-    a = b;
-    b = xch;
-  }
-
-  /* Make sure a has enough precision for the output value */
-  if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
-    return res;
-
-  /*
-    Add up all digits up to the precision of b.  If b had initially
-    the same precision as a, or greater, we took care of it by the
-    exchange step above, so there is no problem.  If b had initially
-    less precision, we'll have to make sure the carry out is duly
-    propagated upward among the higher-order digits of the sum.
-   */
-  pa = MP_DIGITS(a);
-  pb = MP_DIGITS(b);
-  pc = MP_DIGITS(c);
-  used = MP_USED(b);
-  for (ix = 0; ix < used; ix++) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-    w = w + *pa++ + *pb++;
-    *pc++ = ACCUM(w);
-    w = CARRYOUT(w);
-#else
-    d = *pa++;
-    sum = d + *pb++;
-    d = (sum < d);                      /* detect overflow */
-    *pc++ = sum += carry;
-    carry = d + (sum < carry);          /* detect overflow */
-#endif
-  }
-
-  /* If we run out of 'b' digits before we're actually done, make
-     sure the carries get propagated upward...
-   */
-  for (used = MP_USED(a); ix < used; ++ix) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-    w = w + *pa++;
-    *pc++ = ACCUM(w);
-    w = CARRYOUT(w);
-#else
-    *pc++ = sum = carry + *pa++;
-    carry = (sum < carry);
-#endif
-  }
-
-  /* If there's an overall carry out, increase precision and include
-     it.  We could have done this initially, but why touch the memory
-     allocator unless we're sure we have to?
-   */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  if (w) {
-    if((res = s_mp_pad(c, used + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(c, used) = (mp_digit)w;
-    ++used;
-  }
-#else
-  if (carry) {
-    if((res = s_mp_pad(c, used + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(c, used) = carry;
-    ++used;
-  }
-#endif
-  MP_USED(c) = used;
-  return MP_OKAY;
-}
-/* {{{ s_mp_add_offset(a, b, offset) */
-
-/* Compute a = |a| + ( |b| * (RADIX ** offset) )             */
-mp_err   s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  mp_word   w, k = 0;
-#else
-  mp_digit  d, sum, carry = 0;
-#endif
-  mp_size   ib;
-  mp_size   ia;
-  mp_size   lim;
-  mp_err    res;
-
-  /* Make sure a has enough precision for the output value */
-  lim = MP_USED(b) + offset;
-  if((lim > USED(a)) && (res = s_mp_pad(a, lim)) != MP_OKAY)
-    return res;
-
-  /*
-    Add up all digits up to the precision of b.  If b had initially
-    the same precision as a, or greater, we took care of it by the
-    padding step above, so there is no problem.  If b had initially
-    less precision, we'll have to make sure the carry out is duly
-    propagated upward among the higher-order digits of the sum.
-   */
-  lim = USED(b);
-  for(ib = 0, ia = offset; ib < lim; ib++, ia++) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-    w = (mp_word)DIGIT(a, ia) + DIGIT(b, ib) + k;
-    DIGIT(a, ia) = ACCUM(w);
-    k = CARRYOUT(w);
-#else
-    d = MP_DIGIT(a, ia);
-    sum = d + MP_DIGIT(b, ib);
-    d = (sum < d);
-    MP_DIGIT(a,ia) = sum += carry;
-    carry = d + (sum < carry);
-#endif
-  }
-
-  /* If we run out of 'b' digits before we're actually done, make
-     sure the carries get propagated upward...
-   */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  for (lim = MP_USED(a); k && (ia < lim); ++ia) {
-    w = (mp_word)DIGIT(a, ia) + k;
-    DIGIT(a, ia) = ACCUM(w);
-    k = CARRYOUT(w);
-  }
-#else
-  for (lim = MP_USED(a); carry && (ia < lim); ++ia) {
-    d = MP_DIGIT(a, ia);
-    MP_DIGIT(a,ia) = sum = d + carry;
-    carry = (sum < d);
-  }
-#endif
-
-  /* If there's an overall carry out, increase precision and include
-     it.  We could have done this initially, but why touch the memory
-     allocator unless we're sure we have to?
-   */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-  if(k) {
-    if((res = s_mp_pad(a, USED(a) + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(a, ia) = (mp_digit)k;
-  }
-#else
-  if (carry) {
-    if((res = s_mp_pad(a, lim + 1)) != MP_OKAY)
-      return res;
-
-    DIGIT(a, lim) = carry;
-  }
-#endif
-  s_mp_clamp(a);
-
-  return MP_OKAY;
-
-} /* end s_mp_add_offset() */
-
-/* }}} */
-
-/* {{{ s_mp_sub(a, b) */
-
-/* Compute a = |a| - |b|, assumes |a| >= |b|                              */
-mp_err   s_mp_sub(mp_int *a, const mp_int *b)  /* magnitude subtract      */
-{
-  mp_digit *pa, *pb, *limit;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-  mp_sword  w = 0;
-#else
-  mp_digit  d, diff, borrow = 0;
-#endif
-
-  /*
-    Subtract and propagate borrow.  Up to the precision of b, this
-    accounts for the digits of b; after that, we just make sure the
-    carries get to the right place.  This saves having to pad b out to
-    the precision of a just to make the loops work right...
-   */
-  pa = MP_DIGITS(a);
-  pb = MP_DIGITS(b);
-  limit = pb + MP_USED(b);
-  while (pb < limit) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-    w = w + *pa - *pb++;
-    *pa++ = ACCUM(w);
-    w >>= MP_DIGIT_BIT;
-#else
-    d = *pa;
-    diff = d - *pb++;
-    d = (diff > d);                             /* detect borrow */
-    if (borrow && --diff == MP_DIGIT_MAX)
-      ++d;
-    *pa++ = diff;
-    borrow = d;
-#endif
-  }
-  limit = MP_DIGITS(a) + MP_USED(a);
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-  while (w && pa < limit) {
-    w = w + *pa;
-    *pa++ = ACCUM(w);
-    w >>= MP_DIGIT_BIT;
-  }
-#else
-  while (borrow && pa < limit) {
-    d = *pa;
-    *pa++ = diff = d - borrow;
-    borrow = (diff > d);
-  }
-#endif
-
-  /* Clobber any leading zeroes we created    */
-  s_mp_clamp(a);
-
-  /*
-     If there was a borrow out, then |b| > |a| in violation
-     of our input invariant.  We've already done the work,
-     but we'll at least complain about it...
-   */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-  return w ? MP_RANGE : MP_OKAY;
-#else
-  return borrow ? MP_RANGE : MP_OKAY;
-#endif
-} /* end s_mp_sub() */
-
-/* }}} */
-
-/* Compute c = |a| - |b|, assumes |a| >= |b| */ /* magnitude subtract      */
-mp_err   s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c)
-{
-  mp_digit *pa, *pb, *pc;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-  mp_sword  w = 0;
-#else
-  mp_digit  d, diff, borrow = 0;
-#endif
-  int       ix, limit;
-  mp_err    res;
-
-  MP_SIGN(c) = MP_SIGN(a);
-
-  /* Make sure a has enough precision for the output value */
-  if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
-    return res;
-
-  /*
-    Subtract and propagate borrow.  Up to the precision of b, this
-    accounts for the digits of b; after that, we just make sure the
-    carries get to the right place.  This saves having to pad b out to
-    the precision of a just to make the loops work right...
-   */
-  pa = MP_DIGITS(a);
-  pb = MP_DIGITS(b);
-  pc = MP_DIGITS(c);
-  limit = MP_USED(b);
-  for (ix = 0; ix < limit; ++ix) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-    w = w + *pa++ - *pb++;
-    *pc++ = ACCUM(w);
-    w >>= MP_DIGIT_BIT;
-#else
-    d = *pa++;
-    diff = d - *pb++;
-    d = (diff > d);
-    if (borrow && --diff == MP_DIGIT_MAX)
-      ++d;
-    *pc++ = diff;
-    borrow = d;
-#endif
-  }
-  for (limit = MP_USED(a); ix < limit; ++ix) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-    w = w + *pa++;
-    *pc++ = ACCUM(w);
-    w >>= MP_DIGIT_BIT;
-#else
-    d = *pa++;
-    *pc++ = diff = d - borrow;
-    borrow = (diff > d);
-#endif
-  }
-
-  /* Clobber any leading zeroes we created    */
-  MP_USED(c) = ix;
-  s_mp_clamp(c);
-
-  /*
-     If there was a borrow out, then |b| > |a| in violation
-     of our input invariant.  We've already done the work,
-     but we'll at least complain about it...
-   */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
-  return w ? MP_RANGE : MP_OKAY;
-#else
-  return borrow ? MP_RANGE : MP_OKAY;
-#endif
-}
-/* {{{ s_mp_mul(a, b) */
-
-/* Compute a = |a| * |b|                                                  */
-mp_err   s_mp_mul(mp_int *a, const mp_int *b)
-{
-  return mp_mul(a, b, a);
-} /* end s_mp_mul() */
-
-/* }}} */
-
-#if defined(MP_USE_UINT_DIGIT) && defined(MP_USE_LONG_LONG_MULTIPLY)
-/* This trick works on Sparc V8 CPUs with the Workshop compilers. */
-#define MP_MUL_DxD(a, b, Phi, Plo) \
-  { unsigned long long product = (unsigned long long)a * b; \
-    Plo = (mp_digit)product; \
-    Phi = (mp_digit)(product >> MP_DIGIT_BIT); }
-#elif defined(OSF1)
-#define MP_MUL_DxD(a, b, Phi, Plo) \
-  { Plo = asm ("mulq %a0, %a1, %v0", a, b);\
-    Phi = asm ("umulh %a0, %a1, %v0", a, b); }
-#else
-#define MP_MUL_DxD(a, b, Phi, Plo) \
-  { mp_digit a0b1, a1b0; \
-    Plo = (a & MP_HALF_DIGIT_MAX) * (b & MP_HALF_DIGIT_MAX); \
-    Phi = (a >> MP_HALF_DIGIT_BIT) * (b >> MP_HALF_DIGIT_BIT); \
-    a0b1 = (a & MP_HALF_DIGIT_MAX) * (b >> MP_HALF_DIGIT_BIT); \
-    a1b0 = (a >> MP_HALF_DIGIT_BIT) * (b & MP_HALF_DIGIT_MAX); \
-    a1b0 += a0b1; \
-    Phi += a1b0 >> MP_HALF_DIGIT_BIT; \
-    if (a1b0 < a0b1)  \
-      Phi += MP_HALF_RADIX; \
-    a1b0 <<= MP_HALF_DIGIT_BIT; \
-    Plo += a1b0; \
-    if (Plo < a1b0) \
-      ++Phi; \
-  }
-#endif
-
-#if !defined(MP_ASSEMBLY_MULTIPLY)
-/* c = a * b */
-void s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
-  mp_digit   d = 0;
-
-  /* Inner product:  Digits of a */
-  while (a_len--) {
-    mp_word w = ((mp_word)b * *a++) + d;
-    *c++ = ACCUM(w);
-    d = CARRYOUT(w);
-  }
-  *c = d;
-#else
-  mp_digit carry = 0;
-  while (a_len--) {
-    mp_digit a_i = *a++;
-    mp_digit a0b0, a1b1;
-
-    MP_MUL_DxD(a_i, b, a1b1, a0b0);
-
-    a0b0 += carry;
-    if (a0b0 < carry)
-      ++a1b1;
-    *c++ = a0b0;
-    carry = a1b1;
-  }
-  *c = carry;
-#endif
-}
-
-/* c += a * b */
-void s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b,
-                              mp_digit *c)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
-  mp_digit   d = 0;
-
-  /* Inner product:  Digits of a */
-  while (a_len--) {
-    mp_word w = ((mp_word)b * *a++) + *c + d;
-    *c++ = ACCUM(w);
-    d = CARRYOUT(w);
-  }
-  *c = d;
-#else
-  mp_digit carry = 0;
-  while (a_len--) {
-    mp_digit a_i = *a++;
-    mp_digit a0b0, a1b1;
-
-    MP_MUL_DxD(a_i, b, a1b1, a0b0);
-
-    a0b0 += carry;
-    if (a0b0 < carry)
-      ++a1b1;
-    a0b0 += a_i = *c;
-    if (a0b0 < a_i)
-      ++a1b1;
-    *c++ = a0b0;
-    carry = a1b1;
-  }
-  *c = carry;
-#endif
-}
-
-/* Presently, this is only used by the Montgomery arithmetic code. */
-/* c += a * b */
-void s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
-  mp_digit   d = 0;
-
-  /* Inner product:  Digits of a */
-  while (a_len--) {
-    mp_word w = ((mp_word)b * *a++) + *c + d;
-    *c++ = ACCUM(w);
-    d = CARRYOUT(w);
-  }
-
-  while (d) {
-    mp_word w = (mp_word)*c + d;
-    *c++ = ACCUM(w);
-    d = CARRYOUT(w);
-  }
-#else
-  mp_digit carry = 0;
-  while (a_len--) {
-    mp_digit a_i = *a++;
-    mp_digit a0b0, a1b1;
-
-    MP_MUL_DxD(a_i, b, a1b1, a0b0);
-
-    a0b0 += carry;
-    if (a0b0 < carry)
-      ++a1b1;
-
-    a0b0 += a_i = *c;
-    if (a0b0 < a_i)
-      ++a1b1;
-
-    *c++ = a0b0;
-    carry = a1b1;
-  }
-  while (carry) {
-    mp_digit c_i = *c;
-    carry += c_i;
-    *c++ = carry;
-    carry = carry < c_i;
-  }
-#endif
-}
-#endif
-
-#if defined(MP_USE_UINT_DIGIT) && defined(MP_USE_LONG_LONG_MULTIPLY)
-/* This trick works on Sparc V8 CPUs with the Workshop compilers. */
-#define MP_SQR_D(a, Phi, Plo) \
-  { unsigned long long square = (unsigned long long)a * a; \
-    Plo = (mp_digit)square; \
-    Phi = (mp_digit)(square >> MP_DIGIT_BIT); }
-#elif defined(OSF1)
-#define MP_SQR_D(a, Phi, Plo) \
-  { Plo = asm ("mulq  %a0, %a0, %v0", a);\
-    Phi = asm ("umulh %a0, %a0, %v0", a); }
-#else
-#define MP_SQR_D(a, Phi, Plo) \
-  { mp_digit Pmid; \
-    Plo  = (a  & MP_HALF_DIGIT_MAX) * (a  & MP_HALF_DIGIT_MAX); \
-    Phi  = (a >> MP_HALF_DIGIT_BIT) * (a >> MP_HALF_DIGIT_BIT); \
-    Pmid = (a  & MP_HALF_DIGIT_MAX) * (a >> MP_HALF_DIGIT_BIT); \
-    Phi += Pmid >> (MP_HALF_DIGIT_BIT - 1);  \
-    Pmid <<= (MP_HALF_DIGIT_BIT + 1);  \
-    Plo += Pmid;  \
-    if (Plo < Pmid)  \
-      ++Phi;  \
-  }
-#endif
-
-#if !defined(MP_ASSEMBLY_SQUARE)
-/* Add the squares of the digits of a to the digits of b. */
-void s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
-  mp_word  w;
-  mp_digit d;
-  mp_size  ix;
-
-  w  = 0;
-#define ADD_SQUARE(n) \
-    d = pa[n]; \
-    w += (d * (mp_word)d) + ps[2*n]; \
-    ps[2*n] = ACCUM(w); \
-    w = (w >> DIGIT_BIT) + ps[2*n+1]; \
-    ps[2*n+1] = ACCUM(w); \
-    w = (w >> DIGIT_BIT)
-
-  for (ix = a_len; ix >= 4; ix -= 4) {
-    ADD_SQUARE(0);
-    ADD_SQUARE(1);
-    ADD_SQUARE(2);
-    ADD_SQUARE(3);
-    pa += 4;
-    ps += 8;
-  }
-  if (ix) {
-    ps += 2*ix;
-    pa += ix;
-    switch (ix) {
-    case 3: ADD_SQUARE(-3); /* FALLTHRU */
-    case 2: ADD_SQUARE(-2); /* FALLTHRU */
-    case 1: ADD_SQUARE(-1); /* FALLTHRU */
-    case 0: break;
-    }
-  }
-  while (w) {
-    w += *ps;
-    *ps++ = ACCUM(w);
-    w = (w >> DIGIT_BIT);
-  }
-#else
-  mp_digit carry = 0;
-  while (a_len--) {
-    mp_digit a_i = *pa++;
-    mp_digit a0a0, a1a1;
-
-    MP_SQR_D(a_i, a1a1, a0a0);
-
-    /* here a1a1 and a0a0 constitute a_i ** 2 */
-    a0a0 += carry;
-    if (a0a0 < carry)
-      ++a1a1;
-
-    /* now add to ps */
-    a0a0 += a_i = *ps;
-    if (a0a0 < a_i)
-      ++a1a1;
-    *ps++ = a0a0;
-    a1a1 += a_i = *ps;
-    carry = (a1a1 < a_i);
-    *ps++ = a1a1;
-  }
-  while (carry) {
-    mp_digit s_i = *ps;
-    carry += s_i;
-    *ps++ = carry;
-    carry = carry < s_i;
-  }
-#endif
-}
-#endif
-
-#if (defined(MP_NO_MP_WORD) || defined(MP_NO_DIV_WORD)) \
-&& !defined(MP_ASSEMBLY_DIV_2DX1D)
-/*
-** Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized
-** so its high bit is 1.   This code is from NSPR.
-*/
-mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor,
-                       mp_digit *qp, mp_digit *rp)
-{
-    mp_digit d1, d0, q1, q0;
-    mp_digit r1, r0, m;
-
-    d1 = divisor >> MP_HALF_DIGIT_BIT;
-    d0 = divisor & MP_HALF_DIGIT_MAX;
-    r1 = Nhi % d1;
-    q1 = Nhi / d1;
-    m = q1 * d0;
-    r1 = (r1 << MP_HALF_DIGIT_BIT) | (Nlo >> MP_HALF_DIGIT_BIT);
-    if (r1 < m) {
-        q1--, r1 += divisor;
-        if (r1 >= divisor && r1 < m) {
-            q1--, r1 += divisor;
-        }
-    }
-    r1 -= m;
-    r0 = r1 % d1;
-    q0 = r1 / d1;
-    m = q0 * d0;
-    r0 = (r0 << MP_HALF_DIGIT_BIT) | (Nlo & MP_HALF_DIGIT_MAX);
-    if (r0 < m) {
-        q0--, r0 += divisor;
-        if (r0 >= divisor && r0 < m) {
-            q0--, r0 += divisor;
-        }
-    }
-    if (qp)
-        *qp = (q1 << MP_HALF_DIGIT_BIT) | q0;
-    if (rp)
-        *rp = r0 - m;
-    return MP_OKAY;
-}
-#endif
-
-#if MP_SQUARE
-/* {{{ s_mp_sqr(a) */
-
-mp_err   s_mp_sqr(mp_int *a)
-{
-  mp_err   res;
-  mp_int   tmp;
-
-  if((res = mp_init_size(&tmp, 2 * USED(a), FLAG(a))) != MP_OKAY)
-    return res;
-  res = mp_sqr(a, &tmp);
-  if (res == MP_OKAY) {
-    s_mp_exch(&tmp, a);
-  }
-  mp_clear(&tmp);
-  return res;
-}
-
-/* }}} */
-#endif
-
-/* {{{ s_mp_div(a, b) */
-
-/*
-  s_mp_div(a, b)
-
-  Compute a = a / b and b = a mod b.  Assumes b > a.
- */
-
-mp_err   s_mp_div(mp_int *rem,  /* i: dividend, o: remainder */
-                  mp_int *div,  /* i: divisor                */
-                  mp_int *quot) /* i: 0;        o: quotient  */
-{
-  mp_int   part, t;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
-  mp_word  q_msd;
-#else
-  mp_digit q_msd;
-#endif
-  mp_err   res;
-  mp_digit d;
-  mp_digit div_msd;
-  int      ix;
-
-  if(mp_cmp_z(div) == 0)
-    return MP_RANGE;
-
-  /* Shortcut if divisor is power of two */
-  if((ix = s_mp_ispow2(div)) >= 0) {
-    MP_CHECKOK( mp_copy(rem, quot) );
-    s_mp_div_2d(quot, (mp_digit)ix);
-    s_mp_mod_2d(rem,  (mp_digit)ix);
-
-    return MP_OKAY;
-  }
-
-  DIGITS(&t) = 0;
-  MP_SIGN(rem) = ZPOS;
-  MP_SIGN(div) = ZPOS;
-
-  /* A working temporary for division     */
-  MP_CHECKOK( mp_init_size(&t, MP_ALLOC(rem), FLAG(rem)));
-
-  /* Normalize to optimize guessing       */
-  MP_CHECKOK( s_mp_norm(rem, div, &d) );
-
-  part = *rem;
-
-  /* Perform the division itself...woo!   */
-  MP_USED(quot) = MP_ALLOC(quot);
-
-  /* Find a partial substring of rem which is at least div */
-  /* If we didn't find one, we're finished dividing    */
-  while (MP_USED(rem) > MP_USED(div) || s_mp_cmp(rem, div) >= 0) {
-    int i;
-    int unusedRem;
-
-    unusedRem = MP_USED(rem) - MP_USED(div);
-    MP_DIGITS(&part) = MP_DIGITS(rem) + unusedRem;
-    MP_ALLOC(&part)  = MP_ALLOC(rem)  - unusedRem;
-    MP_USED(&part)   = MP_USED(div);
-    if (s_mp_cmp(&part, div) < 0) {
-      -- unusedRem;
-#if MP_ARGCHK == 2
-      assert(unusedRem >= 0);
-#endif
-      -- MP_DIGITS(&part);
-      ++ MP_USED(&part);
-      ++ MP_ALLOC(&part);
-    }
-
-    /* Compute a guess for the next quotient digit       */
-    q_msd = MP_DIGIT(&part, MP_USED(&part) - 1);
-    div_msd = MP_DIGIT(div, MP_USED(div) - 1);
-    if (q_msd >= div_msd) {
-      q_msd = 1;
-    } else if (MP_USED(&part) > 1) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
-      q_msd = (q_msd << MP_DIGIT_BIT) | MP_DIGIT(&part, MP_USED(&part) - 2);
-      q_msd /= div_msd;
-      if (q_msd == RADIX)
-        --q_msd;
-#else
-      mp_digit r;
-      MP_CHECKOK( s_mpv_div_2dx1d(q_msd, MP_DIGIT(&part, MP_USED(&part) - 2),
-                                  div_msd, &q_msd, &r) );
-#endif
-    } else {
-      q_msd = 0;
-    }
-#if MP_ARGCHK == 2
-    assert(q_msd > 0); /* This case should never occur any more. */
-#endif
-    if (q_msd <= 0)
-      break;
-
-    /* See what that multiplies out to                   */
-    mp_copy(div, &t);
-    MP_CHECKOK( s_mp_mul_d(&t, (mp_digit)q_msd) );
-
-    /*
-       If it's too big, back it off.  We should not have to do this
-       more than once, or, in rare cases, twice.  Knuth describes a
-       method by which this could be reduced to a maximum of once, but
-       I didn't implement that here.
-     * When using s_mpv_div_2dx1d, we may have to do this 3 times.
-     */
-    for (i = 4; s_mp_cmp(&t, &part) > 0 && i > 0; --i) {
-      --q_msd;
-      s_mp_sub(&t, div);        /* t -= div */
-    }
-    if (i < 0) {
-      res = MP_RANGE;
-      goto CLEANUP;
-    }
-
-    /* At this point, q_msd should be the right next digit   */
-    MP_CHECKOK( s_mp_sub(&part, &t) );  /* part -= t */
-    s_mp_clamp(rem);
-
-    /*
-      Include the digit in the quotient.  We allocated enough memory
-      for any quotient we could ever possibly get, so we should not
-      have to check for failures here
-     */
-    MP_DIGIT(quot, unusedRem) = (mp_digit)q_msd;
-  }
-
-  /* Denormalize remainder                */
-  if (d) {
-    s_mp_div_2d(rem, d);
-  }
-
-  s_mp_clamp(quot);
-
-CLEANUP:
-  mp_clear(&t);
-
-  return res;
-
-} /* end s_mp_div() */
-
-
-/* }}} */
-
-/* {{{ s_mp_2expt(a, k) */
-
-mp_err   s_mp_2expt(mp_int *a, mp_digit k)
-{
-  mp_err    res;
-  mp_size   dig, bit;
-
-  dig = k / DIGIT_BIT;
-  bit = k % DIGIT_BIT;
-
-  mp_zero(a);
-  if((res = s_mp_pad(a, dig + 1)) != MP_OKAY)
-    return res;
-
-  DIGIT(a, dig) |= ((mp_digit)1 << bit);
-
-  return MP_OKAY;
-
-} /* end s_mp_2expt() */
-
-/* }}} */
-
-/* {{{ s_mp_reduce(x, m, mu) */
-
-/*
-  Compute Barrett reduction, x (mod m), given a precomputed value for
-  mu = b^2k / m, where b = RADIX and k = #digits(m).  This should be
-  faster than straight division, when many reductions by the same
-  value of m are required (such as in modular exponentiation).  This
-  can nearly halve the time required to do modular exponentiation,
-  as compared to using the full integer divide to reduce.
-
-  This algorithm was derived from the _Handbook of Applied
-  Cryptography_ by Menezes, Oorschot and VanStone, Ch. 14,
-  pp. 603-604.
- */
-
-mp_err   s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu)
-{
-  mp_int   q;
-  mp_err   res;
-
-  if((res = mp_init_copy(&q, x)) != MP_OKAY)
-    return res;
-
-  s_mp_rshd(&q, USED(m) - 1);  /* q1 = x / b^(k-1)  */
-  s_mp_mul(&q, mu);            /* q2 = q1 * mu      */
-  s_mp_rshd(&q, USED(m) + 1);  /* q3 = q2 / b^(k+1) */
-
-  /* x = x mod b^(k+1), quick (no division) */
-  s_mp_mod_2d(x, DIGIT_BIT * (USED(m) + 1));
-
-  /* q = q * m mod b^(k+1), quick (no division) */
-  s_mp_mul(&q, m);
-  s_mp_mod_2d(&q, DIGIT_BIT * (USED(m) + 1));
-
-  /* x = x - q */
-  if((res = mp_sub(x, &q, x)) != MP_OKAY)
-    goto CLEANUP;
-
-  /* If x < 0, add b^(k+1) to it */
-  if(mp_cmp_z(x) < 0) {
-    mp_set(&q, 1);
-    if((res = s_mp_lshd(&q, USED(m) + 1)) != MP_OKAY)
-      goto CLEANUP;
-    if((res = mp_add(x, &q, x)) != MP_OKAY)
-      goto CLEANUP;
-  }
-
-  /* Back off if it's too big */
-  while(mp_cmp(x, m) >= 0) {
-    if((res = s_mp_sub(x, m)) != MP_OKAY)
-      break;
-  }
-
- CLEANUP:
-  mp_clear(&q);
-
-  return res;
-
-} /* end s_mp_reduce() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Primitive comparisons */
-
-/* {{{ s_mp_cmp(a, b) */
-
-/* Compare |a| <=> |b|, return 0 if equal, <0 if a<b, >0 if a>b           */
-int      s_mp_cmp(const mp_int *a, const mp_int *b)
-{
-  mp_size used_a = MP_USED(a);
-  {
-    mp_size used_b = MP_USED(b);
-
-    if (used_a > used_b)
-      goto IS_GT;
-    if (used_a < used_b)
-      goto IS_LT;
-  }
-  {
-    mp_digit *pa, *pb;
-    mp_digit da = 0, db = 0;
-
-#define CMP_AB(n) if ((da = pa[n]) != (db = pb[n])) goto done
-
-    pa = MP_DIGITS(a) + used_a;
-    pb = MP_DIGITS(b) + used_a;
-    while (used_a >= 4) {
-      pa     -= 4;
-      pb     -= 4;
-      used_a -= 4;
-      CMP_AB(3);
-      CMP_AB(2);
-      CMP_AB(1);
-      CMP_AB(0);
-    }
-    while (used_a-- > 0 && ((da = *--pa) == (db = *--pb)))
-      /* do nothing */;
-done:
-    if (da > db)
-      goto IS_GT;
-    if (da < db)
-      goto IS_LT;
-  }
-  return MP_EQ;
-IS_LT:
-  return MP_LT;
-IS_GT:
-  return MP_GT;
-} /* end s_mp_cmp() */
-
-/* }}} */
-
-/* {{{ s_mp_cmp_d(a, d) */
-
-/* Compare |a| <=> d, return 0 if equal, <0 if a<d, >0 if a>d             */
-int      s_mp_cmp_d(const mp_int *a, mp_digit d)
-{
-  if(USED(a) > 1)
-    return MP_GT;
-
-  if(DIGIT(a, 0) < d)
-    return MP_LT;
-  else if(DIGIT(a, 0) > d)
-    return MP_GT;
-  else
-    return MP_EQ;
-
-} /* end s_mp_cmp_d() */
-
-/* }}} */
-
-/* {{{ s_mp_ispow2(v) */
-
-/*
-  Returns -1 if the value is not a power of two; otherwise, it returns
-  k such that v = 2^k, i.e. lg(v).
- */
-int      s_mp_ispow2(const mp_int *v)
-{
-  mp_digit d;
-  int      extra = 0, ix;
-
-  ix = MP_USED(v) - 1;
-  d = MP_DIGIT(v, ix); /* most significant digit of v */
-
-  extra = s_mp_ispow2d(d);
-  if (extra < 0 || ix == 0)
-    return extra;
-
-  while (--ix >= 0) {
-    if (DIGIT(v, ix) != 0)
-      return -1; /* not a power of two */
-    extra += MP_DIGIT_BIT;
-  }
-
-  return extra;
-
-} /* end s_mp_ispow2() */
-
-/* }}} */
-
-/* {{{ s_mp_ispow2d(d) */
-
-int      s_mp_ispow2d(mp_digit d)
-{
-  if ((d != 0) && ((d & (d-1)) == 0)) { /* d is a power of 2 */
-    int pow = 0;
-#if defined (MP_USE_UINT_DIGIT)
-    if (d & 0xffff0000U)
-      pow += 16;
-    if (d & 0xff00ff00U)
-      pow += 8;
-    if (d & 0xf0f0f0f0U)
-      pow += 4;
-    if (d & 0xccccccccU)
-      pow += 2;
-    if (d & 0xaaaaaaaaU)
-      pow += 1;
-#elif defined(MP_USE_LONG_LONG_DIGIT)
-    if (d & 0xffffffff00000000ULL)
-      pow += 32;
-    if (d & 0xffff0000ffff0000ULL)
-      pow += 16;
-    if (d & 0xff00ff00ff00ff00ULL)
-      pow += 8;
-    if (d & 0xf0f0f0f0f0f0f0f0ULL)
-      pow += 4;
-    if (d & 0xccccccccccccccccULL)
-      pow += 2;
-    if (d & 0xaaaaaaaaaaaaaaaaULL)
-      pow += 1;
-#elif defined(MP_USE_LONG_DIGIT)
-    if (d & 0xffffffff00000000UL)
-      pow += 32;
-    if (d & 0xffff0000ffff0000UL)
-      pow += 16;
-    if (d & 0xff00ff00ff00ff00UL)
-      pow += 8;
-    if (d & 0xf0f0f0f0f0f0f0f0UL)
-      pow += 4;
-    if (d & 0xccccccccccccccccUL)
-      pow += 2;
-    if (d & 0xaaaaaaaaaaaaaaaaUL)
-      pow += 1;
-#else
-#error "unknown type for mp_digit"
-#endif
-    return pow;
-  }
-  return -1;
-
-} /* end s_mp_ispow2d() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Primitive I/O helpers */
-
-/* {{{ s_mp_tovalue(ch, r) */
-
-/*
-  Convert the given character to its digit value, in the given radix.
-  If the given character is not understood in the given radix, -1 is
-  returned.  Otherwise the digit's numeric value is returned.
-
-  The results will be odd if you use a radix < 2 or > 62, you are
-  expected to know what you're up to.
- */
-int      s_mp_tovalue(char ch, int r)
-{
-  int    val, xch;
-
-  if(r > 36)
-    xch = ch;
-  else
-    xch = toupper(ch);
-
-  if(isdigit(xch))
-    val = xch - '0';
-  else if(isupper(xch))
-    val = xch - 'A' + 10;
-  else if(islower(xch))
-    val = xch - 'a' + 36;
-  else if(xch == '+')
-    val = 62;
-  else if(xch == '/')
-    val = 63;
-  else
-    return -1;
-
-  if(val < 0 || val >= r)
-    return -1;
-
-  return val;
-
-} /* end s_mp_tovalue() */
-
-/* }}} */
-
-/* {{{ s_mp_todigit(val, r, low) */
-
-/*
-  Convert val to a radix-r digit, if possible.  If val is out of range
-  for r, returns zero.  Otherwise, returns an ASCII character denoting
-  the value in the given radix.
-
-  The results may be odd if you use a radix < 2 or > 64, you are
-  expected to know what you're doing.
- */
-
-char     s_mp_todigit(mp_digit val, int r, int low)
-{
-  char   ch;
-
-  if(val >= r)
-    return 0;
-
-  ch = s_dmap_1[val];
-
-  if(r <= 36 && low)
-    ch = tolower(ch);
-
-  return ch;
-
-} /* end s_mp_todigit() */
-
-/* }}} */
-
-/* {{{ s_mp_outlen(bits, radix) */
-
-/*
-   Return an estimate for how long a string is needed to hold a radix
-   r representation of a number with 'bits' significant bits, plus an
-   extra for a zero terminator (assuming C style strings here)
- */
-int      s_mp_outlen(int bits, int r)
-{
-  return (int)((double)bits * LOG_V_2(r) + 1.5) + 1;
-
-} /* end s_mp_outlen() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ mp_read_unsigned_octets(mp, str, len) */
-/* mp_read_unsigned_octets(mp, str, len)
-   Read in a raw value (base 256) into the given mp_int
-   No sign bit, number is positive.  Leading zeros ignored.
- */
-
-mp_err
-mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len)
-{
-  int            count;
-  mp_err         res;
-  mp_digit       d;
-
-  ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
-
-  mp_zero(mp);
-
-  count = len % sizeof(mp_digit);
-  if (count) {
-    for (d = 0; count-- > 0; --len) {
-      d = (d << 8) | *str++;
-    }
-    MP_DIGIT(mp, 0) = d;
-  }
-
-  /* Read the rest of the digits */
-  for(; len > 0; len -= sizeof(mp_digit)) {
-    for (d = 0, count = sizeof(mp_digit); count > 0; --count) {
-      d = (d << 8) | *str++;
-    }
-    if (MP_EQ == mp_cmp_z(mp)) {
-      if (!d)
-        continue;
-    } else {
-      if((res = s_mp_lshd(mp, 1)) != MP_OKAY)
-        return res;
-    }
-    MP_DIGIT(mp, 0) = d;
-  }
-  return MP_OKAY;
-} /* end mp_read_unsigned_octets() */
-/* }}} */
-
-/* {{{ mp_unsigned_octet_size(mp) */
-int
-mp_unsigned_octet_size(const mp_int *mp)
-{
-  int  bytes;
-  int  ix;
-  mp_digit  d = 0;
-
-  ARGCHK(mp != NULL, MP_BADARG);
-  ARGCHK(MP_ZPOS == SIGN(mp), MP_BADARG);
-
-  bytes = (USED(mp) * sizeof(mp_digit));
-
-  /* subtract leading zeros. */
-  /* Iterate over each digit... */
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    d = DIGIT(mp, ix);
-    if (d)
-        break;
-    bytes -= sizeof(d);
-  }
-  if (!bytes)
-    return 1;
-
-  /* Have MSD, check digit bytes, high order first */
-  for(ix = sizeof(mp_digit) - 1; ix >= 0; ix--) {
-    unsigned char x = (unsigned char)(d >> (ix * CHAR_BIT));
-    if (x)
-        break;
-    --bytes;
-  }
-  return bytes;
-} /* end mp_unsigned_octet_size() */
-/* }}} */
-
-/* {{{ mp_to_unsigned_octets(mp, str) */
-/* output a buffer of big endian octets no longer than specified. */
-mp_err
-mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen)
-{
-  int  ix, pos = 0;
-  int  bytes;
-
-  ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
-
-  bytes = mp_unsigned_octet_size(mp);
-  ARGCHK(bytes <= maxlen, MP_BADARG);
-
-  /* Iterate over each digit... */
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    mp_digit  d = DIGIT(mp, ix);
-    int       jx;
-
-    /* Unpack digit bytes, high order first */
-    for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
-      unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
-      if (!pos && !x)   /* suppress leading zeros */
-        continue;
-      str[pos++] = x;
-    }
-  }
-  if (!pos)
-    str[pos++] = 0;
-  return pos;
-} /* end mp_to_unsigned_octets() */
-/* }}} */
-
-/* {{{ mp_to_signed_octets(mp, str) */
-/* output a buffer of big endian octets no longer than specified. */
-mp_err
-mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen)
-{
-  int  ix, pos = 0;
-  int  bytes;
-
-  ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
-
-  bytes = mp_unsigned_octet_size(mp);
-  ARGCHK(bytes <= maxlen, MP_BADARG);
-
-  /* Iterate over each digit... */
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    mp_digit  d = DIGIT(mp, ix);
-    int       jx;
-
-    /* Unpack digit bytes, high order first */
-    for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
-      unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
-      if (!pos) {
-        if (!x)         /* suppress leading zeros */
-          continue;
-        if (x & 0x80) { /* add one leading zero to make output positive.  */
-          ARGCHK(bytes + 1 <= maxlen, MP_BADARG);
-          if (bytes + 1 > maxlen)
-            return MP_BADARG;
-          str[pos++] = 0;
-        }
-      }
-      str[pos++] = x;
-    }
-  }
-  if (!pos)
-    str[pos++] = 0;
-  return pos;
-} /* end mp_to_signed_octets() */
-/* }}} */
-
-/* {{{ mp_to_fixlen_octets(mp, str) */
-/* output a buffer of big endian octets exactly as long as requested. */
-mp_err
-mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size length)
-{
-  int  ix, pos = 0;
-  int  bytes;
-
-  ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
-
-  bytes = mp_unsigned_octet_size(mp);
-  ARGCHK(bytes <= length, MP_BADARG);
-
-  /* place any needed leading zeros */
-  for (;length > bytes; --length) {
-        *str++ = 0;
-  }
-
-  /* Iterate over each digit... */
-  for(ix = USED(mp) - 1; ix >= 0; ix--) {
-    mp_digit  d = DIGIT(mp, ix);
-    int       jx;
-
-    /* Unpack digit bytes, high order first */
-    for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
-      unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
-      if (!pos && !x)   /* suppress leading zeros */
-        continue;
-      str[pos++] = x;
-    }
-  }
-  if (!pos)
-    str[pos++] = 0;
-  return MP_OKAY;
-} /* end mp_to_fixlen_octets() */
-/* }}} */
-
-
-/*------------------------------------------------------------------------*/
-/* HERE THERE BE DRAGONS                                                  */
--- a/jdk/src/share/native/sun/security/ec/mpi.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,409 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- *  Arbitrary precision integer arithmetic library
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Netscape Communications Corporation
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPI_H
-#define _MPI_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mpi.h,v 1.22 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
-
-#include "mpi-config.h"
-
-#ifndef _WIN32
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/debug.h>
-#include <sys/systm.h>
-#define assert ASSERT
-#define labs(a) (a >= 0 ? a : -a)
-#define UCHAR_MAX 255
-#define memset(s, c, n) bzero(s, n)
-#define memcpy(a,b,c) bcopy((caddr_t)b, (caddr_t)a, c)
-/*
- * Generic #define's to cover missing things in the kernel
- */
-#ifndef isdigit
-#define isdigit(x)      ((x) >= '0' && (x) <= '9')
-#endif
-#ifndef isupper
-#define isupper(x)      (((unsigned)(x) >= 'A') && ((unsigned)(x) <= 'Z'))
-#endif
-#ifndef islower
-#define islower(x)      (((unsigned)(x) >= 'a') && ((unsigned)(x) <= 'z'))
-#endif
-#ifndef isalpha
-#define isalpha(x)      (isupper(x) || islower(x))
-#endif
-#ifndef toupper
-#define toupper(x)      (islower(x) ? (x) - 'a' + 'A' : (x))
-#endif
-#ifndef tolower
-#define tolower(x)      (isupper(x) ? (x) + 'a' - 'A' : (x))
-#endif
-#ifndef isspace
-#define isspace(x)      (((x) == ' ') || ((x) == '\r') || ((x) == '\n') || \
-                         ((x) == '\t') || ((x) == '\b'))
-#endif
-#endif /* _KERNEL */
-
-#if MP_DEBUG
-#undef MP_IOFUNC
-#define MP_IOFUNC 1
-#endif
-
-#if MP_IOFUNC
-#include <stdio.h>
-#include <ctype.h>
-#endif
-
-#ifndef _KERNEL
-#include <limits.h>
-#endif
-
-#if defined(BSDI)
-#undef ULLONG_MAX
-#endif
-
-#if defined( macintosh )
-#include <Types.h>
-#elif defined( _WIN32_WCE)
-/* #include <sys/types.h> What do we need here ?? */
-#else
-#include <sys/types.h>
-#endif
-
-#define  MP_NEG    1
-#define  MP_ZPOS   0
-
-#define  MP_OKAY          0 /* no error, all is well */
-#define  MP_YES           0 /* yes (boolean result)  */
-#define  MP_NO           -1 /* no (boolean result)   */
-#define  MP_MEM          -2 /* out of memory         */
-#define  MP_RANGE        -3 /* argument out of range */
-#define  MP_BADARG       -4 /* invalid parameter     */
-#define  MP_UNDEF        -5 /* answer is undefined   */
-#define  MP_LAST_CODE    MP_UNDEF
-
-typedef unsigned int      mp_sign;
-typedef unsigned int      mp_size;
-typedef int               mp_err;
-typedef int               mp_flag;
-
-#define MP_32BIT_MAX 4294967295U
-
-#if !defined(ULONG_MAX)
-#error "ULONG_MAX not defined"
-#elif !defined(UINT_MAX)
-#error "UINT_MAX not defined"
-#elif !defined(USHRT_MAX)
-#error "USHRT_MAX not defined"
-#endif
-
-#if defined(ULONG_LONG_MAX)                     /* GCC, HPUX */
-#define MP_ULONG_LONG_MAX ULONG_LONG_MAX
-#elif defined(ULLONG_MAX)                       /* Solaris */
-#define MP_ULONG_LONG_MAX ULLONG_MAX
-/* MP_ULONG_LONG_MAX was defined to be ULLONG_MAX */
-#elif defined(ULONGLONG_MAX)                    /* IRIX, AIX */
-#define MP_ULONG_LONG_MAX ULONGLONG_MAX
-#endif
-
-/* We only use unsigned long for mp_digit iff long is more than 32 bits. */
-#if !defined(MP_USE_UINT_DIGIT) && ULONG_MAX > MP_32BIT_MAX
-typedef unsigned long     mp_digit;
-#define MP_DIGIT_MAX      ULONG_MAX
-#define MP_DIGIT_FMT      "%016lX"   /* printf() format for 1 digit */
-#define MP_HALF_DIGIT_MAX UINT_MAX
-#undef  MP_NO_MP_WORD
-#define MP_NO_MP_WORD 1
-#undef  MP_USE_LONG_DIGIT
-#define MP_USE_LONG_DIGIT 1
-#undef  MP_USE_LONG_LONG_DIGIT
-
-#elif !defined(MP_USE_UINT_DIGIT) && defined(MP_ULONG_LONG_MAX)
-typedef unsigned long long mp_digit;
-#define MP_DIGIT_MAX       MP_ULONG_LONG_MAX
-#define MP_DIGIT_FMT      "%016llX"  /* printf() format for 1 digit */
-#define MP_HALF_DIGIT_MAX  UINT_MAX
-#undef  MP_NO_MP_WORD
-#define MP_NO_MP_WORD 1
-#undef  MP_USE_LONG_LONG_DIGIT
-#define MP_USE_LONG_LONG_DIGIT 1
-#undef  MP_USE_LONG_DIGIT
-
-#else
-typedef unsigned int      mp_digit;
-#define MP_DIGIT_MAX      UINT_MAX
-#define MP_DIGIT_FMT      "%08X"     /* printf() format for 1 digit */
-#define MP_HALF_DIGIT_MAX USHRT_MAX
-#undef  MP_USE_UINT_DIGIT
-#define MP_USE_UINT_DIGIT 1
-#undef  MP_USE_LONG_LONG_DIGIT
-#undef  MP_USE_LONG_DIGIT
-#endif
-
-#if !defined(MP_NO_MP_WORD)
-#if  defined(MP_USE_UINT_DIGIT) && \
-    (defined(MP_ULONG_LONG_MAX) || (ULONG_MAX > UINT_MAX))
-
-#if (ULONG_MAX > UINT_MAX)
-typedef unsigned long     mp_word;
-typedef          long     mp_sword;
-#define MP_WORD_MAX       ULONG_MAX
-
-#else
-typedef unsigned long long mp_word;
-typedef          long long mp_sword;
-#define MP_WORD_MAX       MP_ULONG_LONG_MAX
-#endif
-
-#else
-#define MP_NO_MP_WORD 1
-#endif
-#endif /* !defined(MP_NO_MP_WORD) */
-
-#if !defined(MP_WORD_MAX) && defined(MP_DEFINE_SMALL_WORD)
-typedef unsigned int      mp_word;
-typedef          int      mp_sword;
-#define MP_WORD_MAX       UINT_MAX
-#endif
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-
-#define MP_DIGIT_BIT      (CHAR_BIT*sizeof(mp_digit))
-#define MP_WORD_BIT       (CHAR_BIT*sizeof(mp_word))
-#define MP_RADIX          (1+(mp_word)MP_DIGIT_MAX)
-
-#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT/2)
-#define MP_HALF_RADIX     (1+(mp_digit)MP_HALF_DIGIT_MAX)
-/* MP_HALF_RADIX really ought to be called MP_SQRT_RADIX, but it's named
-** MP_HALF_RADIX because it's the radix for MP_HALF_DIGITs, and it's
-** consistent with the other _HALF_ names.
-*/
-
-
-/* Macros for accessing the mp_int internals           */
-#define  MP_FLAG(MP)     ((MP)->flag)
-#define  MP_SIGN(MP)     ((MP)->sign)
-#define  MP_USED(MP)     ((MP)->used)
-#define  MP_ALLOC(MP)    ((MP)->alloc)
-#define  MP_DIGITS(MP)   ((MP)->dp)
-#define  MP_DIGIT(MP,N)  (MP)->dp[(N)]
-
-/* This defines the maximum I/O base (minimum is 2)   */
-#define MP_MAX_RADIX         64
-
-typedef struct {
-  mp_sign       flag;    /* KM_SLEEP/KM_NOSLEEP        */
-  mp_sign       sign;    /* sign of this quantity      */
-  mp_size       alloc;   /* how many digits allocated  */
-  mp_size       used;    /* how many digits used       */
-  mp_digit     *dp;      /* the digits themselves      */
-} mp_int;
-
-/* Default precision       */
-mp_size mp_get_prec(void);
-void    mp_set_prec(mp_size prec);
-
-/* Memory management       */
-mp_err mp_init(mp_int *mp, int kmflag);
-mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag);
-mp_err mp_init_copy(mp_int *mp, const mp_int *from);
-mp_err mp_copy(const mp_int *from, mp_int *to);
-void   mp_exch(mp_int *mp1, mp_int *mp2);
-void   mp_clear(mp_int *mp);
-void   mp_zero(mp_int *mp);
-void   mp_set(mp_int *mp, mp_digit d);
-mp_err mp_set_int(mp_int *mp, long z);
-#define mp_set_long(mp,z) mp_set_int(mp,z)
-mp_err mp_set_ulong(mp_int *mp, unsigned long z);
-
-/* Single digit arithmetic */
-mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b);
-mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b);
-mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b);
-mp_err mp_mul_2(const mp_int *a, mp_int *c);
-mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r);
-mp_err mp_div_2(const mp_int *a, mp_int *c);
-mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c);
-
-/* Sign manipulations      */
-mp_err mp_abs(const mp_int *a, mp_int *b);
-mp_err mp_neg(const mp_int *a, mp_int *b);
-
-/* Full arithmetic         */
-mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int *c);
-#if MP_SQUARE
-mp_err mp_sqr(const mp_int *a, mp_int *b);
-#else
-#define mp_sqr(a, b) mp_mul(a, a, b)
-#endif
-mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r);
-mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r);
-mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c);
-mp_err mp_2expt(mp_int *a, mp_digit k);
-mp_err mp_sqrt(const mp_int *a, mp_int *b);
-
-/* Modular arithmetic      */
-#if MP_MODARITH
-mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c);
-mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c);
-mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-#if MP_SQUARE
-mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c);
-#else
-#define mp_sqrmod(a, m, c) mp_mulmod(a, a, m, c)
-#endif
-mp_err mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c);
-#endif /* MP_MODARITH */
-
-/* Comparisons             */
-int    mp_cmp_z(const mp_int *a);
-int    mp_cmp_d(const mp_int *a, mp_digit d);
-int    mp_cmp(const mp_int *a, const mp_int *b);
-int    mp_cmp_mag(mp_int *a, mp_int *b);
-int    mp_cmp_int(const mp_int *a, long z, int kmflag);
-int    mp_isodd(const mp_int *a);
-int    mp_iseven(const mp_int *a);
-
-/* Number theoretic        */
-#if MP_NUMTH
-mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c);
-mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c);
-mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y);
-mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c);
-mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c);
-#endif /* end MP_NUMTH */
-
-/* Input and output        */
-#if MP_IOFUNC
-void   mp_print(mp_int *mp, FILE *ofp);
-#endif /* end MP_IOFUNC */
-
-/* Base conversion         */
-mp_err mp_read_raw(mp_int *mp, char *str, int len);
-int    mp_raw_size(mp_int *mp);
-mp_err mp_toraw(mp_int *mp, char *str);
-mp_err mp_read_radix(mp_int *mp, const char *str, int radix);
-mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix);
-int    mp_radix_size(mp_int *mp, int radix);
-mp_err mp_toradix(mp_int *mp, char *str, int radix);
-int    mp_tovalue(char ch, int r);
-
-#define mp_tobinary(M, S)  mp_toradix((M), (S), 2)
-#define mp_tooctal(M, S)   mp_toradix((M), (S), 8)
-#define mp_todecimal(M, S) mp_toradix((M), (S), 10)
-#define mp_tohex(M, S)     mp_toradix((M), (S), 16)
-
-/* Error strings           */
-const  char  *mp_strerror(mp_err ec);
-
-/* Octet string conversion functions */
-mp_err mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len);
-int    mp_unsigned_octet_size(const mp_int *mp);
-mp_err mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen);
-mp_err mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen);
-mp_err mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size len);
-
-/* Miscellaneous */
-mp_size mp_trailing_zeros(const mp_int *mp);
-
-#define MP_CHECKOK(x)  if (MP_OKAY > (res = (x))) goto CLEANUP
-#define MP_CHECKERR(x) if (MP_OKAY > (res = (x))) goto CLEANUP
-
-#if defined(MP_API_COMPATIBLE)
-#define NEG             MP_NEG
-#define ZPOS            MP_ZPOS
-#define DIGIT_MAX       MP_DIGIT_MAX
-#define DIGIT_BIT       MP_DIGIT_BIT
-#define DIGIT_FMT       MP_DIGIT_FMT
-#define RADIX           MP_RADIX
-#define MAX_RADIX       MP_MAX_RADIX
-#define FLAG(MP)        MP_FLAG(MP)
-#define SIGN(MP)        MP_SIGN(MP)
-#define USED(MP)        MP_USED(MP)
-#define ALLOC(MP)       MP_ALLOC(MP)
-#define DIGITS(MP)      MP_DIGITS(MP)
-#define DIGIT(MP,N)     MP_DIGIT(MP,N)
-
-#if MP_ARGCHK == 1
-#define  ARGCHK(X,Y)  {if(!(X)){return (Y);}}
-#elif MP_ARGCHK == 2
-#ifdef _KERNEL
-#define  ARGCHK(X,Y)  ASSERT(X)
-#else
-#include <assert.h>
-#define  ARGCHK(X,Y)  assert(X)
-#endif
-#else
-#define  ARGCHK(X,Y)  /*  */
-#endif
-#endif /* defined MP_API_COMPATIBLE */
-
-#endif /* _MPI_H */
--- a/jdk/src/share/native/sun/security/ec/mplogic.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- *  Bitwise logical operations on MPI values
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mplogic.c,v 1.15 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
-
-#include "mpi-priv.h"
-#include "mplogic.h"
-
-/* {{{ Lookup table for population count */
-
-static unsigned char bitc[] = {
-   0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
-   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-   2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-   2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-   2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-   3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-   2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-   2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-   3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-   2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-   3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-   3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-   4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
-};
-
-/* }}} */
-
-/*
-  mpl_rsh(a, b, d)     - b = a >> d
-  mpl_lsh(a, b, d)     - b = a << d
- */
-
-/* {{{ mpl_rsh(a, b, d) */
-
-mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d)
-{
-  mp_err   res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if((res = mp_copy(a, b)) != MP_OKAY)
-    return res;
-
-  s_mp_div_2d(b, d);
-
-  return MP_OKAY;
-
-} /* end mpl_rsh() */
-
-/* }}} */
-
-/* {{{ mpl_lsh(a, b, d) */
-
-mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d)
-{
-  mp_err   res;
-
-  ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
-  if((res = mp_copy(a, b)) != MP_OKAY)
-    return res;
-
-  return s_mp_mul_2d(b, d);
-
-} /* end mpl_lsh() */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/*
-  mpl_set_bit
-
-  Returns MP_OKAY or some error code.
-  Grows a if needed to set a bit to 1.
- */
-mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value)
-{
-  mp_size      ix;
-  mp_err       rv;
-  mp_digit     mask;
-
-  ARGCHK(a != NULL, MP_BADARG);
-
-  ix = bitNum / MP_DIGIT_BIT;
-  if (ix + 1 > MP_USED(a)) {
-    rv = s_mp_pad(a, ix + 1);
-    if (rv != MP_OKAY)
-      return rv;
-  }
-
-  bitNum = bitNum % MP_DIGIT_BIT;
-  mask = (mp_digit)1 << bitNum;
-  if (value)
-    MP_DIGIT(a,ix) |= mask;
-  else
-    MP_DIGIT(a,ix) &= ~mask;
-  s_mp_clamp(a);
-  return MP_OKAY;
-}
-
-/*
-  mpl_get_bit
-
-  returns 0 or 1 or some (negative) error code.
- */
-mp_err mpl_get_bit(const mp_int *a, mp_size bitNum)
-{
-  mp_size      bit, ix;
-  mp_err       rv;
-
-  ARGCHK(a != NULL, MP_BADARG);
-
-  ix = bitNum / MP_DIGIT_BIT;
-  ARGCHK(ix <= MP_USED(a) - 1, MP_RANGE);
-
-  bit   = bitNum % MP_DIGIT_BIT;
-  rv = (mp_err)(MP_DIGIT(a, ix) >> bit) & 1;
-  return rv;
-}
-
-/*
-  mpl_get_bits
-  - Extracts numBits bits from a, where the least significant extracted bit
-  is bit lsbNum.  Returns a negative value if error occurs.
-  - Because sign bit is used to indicate error, maximum number of bits to
-  be returned is the lesser of (a) the number of bits in an mp_digit, or
-  (b) one less than the number of bits in an mp_err.
-  - lsbNum + numbits can be greater than the number of significant bits in
-  integer a, as long as bit lsbNum is in the high order digit of a.
- */
-mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits)
-{
-  mp_size    rshift = (lsbNum % MP_DIGIT_BIT);
-  mp_size    lsWndx = (lsbNum / MP_DIGIT_BIT);
-  mp_digit * digit  = MP_DIGITS(a) + lsWndx;
-  mp_digit   mask   = ((1 << numBits) - 1);
-
-  ARGCHK(numBits < CHAR_BIT * sizeof mask, MP_BADARG);
-  ARGCHK(MP_HOWMANY(lsbNum, MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE);
-
-  if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) ||
-      (lsWndx + 1 >= MP_USED(a))) {
-    mask &= (digit[0] >> rshift);
-  } else {
-    mask &= ((digit[0] >> rshift) | (digit[1] << (MP_DIGIT_BIT - rshift)));
-  }
-  return (mp_err)mask;
-}
-
-/*
-  mpl_significant_bits
-  returns number of significnant bits in abs(a).
-  returns 1 if value is zero.
- */
-mp_err mpl_significant_bits(const mp_int *a)
-{
-  mp_err bits   = 0;
-  int    ix;
-
-  ARGCHK(a != NULL, MP_BADARG);
-
-  ix = MP_USED(a);
-  for (ix = MP_USED(a); ix > 0; ) {
-    mp_digit d;
-    d = MP_DIGIT(a, --ix);
-    if (d) {
-      while (d) {
-        ++bits;
-        d >>= 1;
-      }
-      break;
-    }
-  }
-  bits += ix * MP_DIGIT_BIT;
-  if (!bits)
-    bits = 1;
-  return bits;
-}
-
-/*------------------------------------------------------------------------*/
-/* HERE THERE BE DRAGONS                                                  */
--- a/jdk/src/share/native/sun/security/ec/mplogic.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- *  Bitwise logical operations on MPI values
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPLOGIC_H
-#define _MPLOGIC_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mplogic.h,v 1.7 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
-
-#include "mpi.h"
-
-/*
-  The logical operations treat an mp_int as if it were a bit vector,
-  without regard to its sign (an mp_int is represented in a signed
-  magnitude format).  Values are treated as if they had an infinite
-  string of zeros left of the most-significant bit.
- */
-
-/* Parity results                    */
-
-#define MP_EVEN       MP_YES
-#define MP_ODD        MP_NO
-
-/* Bitwise functions                 */
-
-mp_err mpl_not(mp_int *a, mp_int *b);            /* one's complement  */
-mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND       */
-mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c);  /* bitwise OR        */
-mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR       */
-
-/* Shift functions                   */
-
-mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d);   /* right shift    */
-mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d);   /* left shift     */
-
-/* Bit count and parity              */
-
-mp_err mpl_num_set(mp_int *a, int *num);         /* count set bits    */
-mp_err mpl_num_clear(mp_int *a, int *num);       /* count clear bits  */
-mp_err mpl_parity(mp_int *a);                    /* determine parity  */
-
-/* Get & Set the value of a bit */
-
-mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value);
-mp_err mpl_get_bit(const mp_int *a, mp_size bitNum);
-mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits);
-mp_err mpl_significant_bits(const mp_int *a);
-
-#endif /* _MPLOGIC_H */
--- a/jdk/src/share/native/sun/security/ec/mpmontg.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sheueling Chang Shantz <sheueling.chang@sun.com>,
- *   Stephen Fung <stephen.fung@sun.com>, and
- *   Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/* $Id: mpmontg.c,v 1.20 2006/08/29 02:41:38 nelson%bolyard.com Exp $ */
-
-/* This file implements moduluar exponentiation using Montgomery's
- * method for modular reduction.  This file implements the method
- * described as "Improvement 1" in the paper "A Cryptogrpahic Library for
- * the Motorola DSP56000" by Stephen R. Dusse' and Burton S. Kaliski Jr.
- * published in "Advances in Cryptology: Proceedings of EUROCRYPT '90"
- * "Lecture Notes in Computer Science" volume 473, 1991, pg 230-244,
- * published by Springer Verlag.
- */
-
-#define MP_USING_CACHE_SAFE_MOD_EXP 1
-#ifndef _KERNEL
-#include <string.h>
-#include <stddef.h> /* ptrdiff_t */
-#endif
-#include "mpi-priv.h"
-#include "mplogic.h"
-#include "mpprime.h"
-#ifdef MP_USING_MONT_MULF
-#include "montmulf.h"
-#endif
-
-/* if MP_CHAR_STORE_SLOW is defined, we  */
-/* need to know endianness of this platform. */
-#ifdef MP_CHAR_STORE_SLOW
-#if !defined(MP_IS_BIG_ENDIAN) && !defined(MP_IS_LITTLE_ENDIAN)
-#error "You must define MP_IS_BIG_ENDIAN or MP_IS_LITTLE_ENDIAN\n" \
-       "  if you define MP_CHAR_STORE_SLOW."
-#endif
-#endif
-
-#ifndef STATIC
-#define STATIC
-#endif
-
-#define MAX_ODD_INTS    32   /* 2 ** (WINDOW_BITS - 1) */
-
-#ifndef _KERNEL
-#if defined(_WIN32_WCE)
-#define ABORT  res = MP_UNDEF; goto CLEANUP
-#else
-#define ABORT abort()
-#endif
-#else
-#define ABORT  res = MP_UNDEF; goto CLEANUP
-#endif /* _KERNEL */
-
-/* computes T = REDC(T), 2^b == R */
-mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm)
-{
-  mp_err res;
-  mp_size i;
-
-  i = MP_USED(T) + MP_USED(&mmm->N) + 2;
-  MP_CHECKOK( s_mp_pad(T, i) );
-  for (i = 0; i < MP_USED(&mmm->N); ++i ) {
-    mp_digit m_i = MP_DIGIT(T, i) * mmm->n0prime;
-    /* T += N * m_i * (MP_RADIX ** i); */
-    MP_CHECKOK( s_mp_mul_d_add_offset(&mmm->N, m_i, T, i) );
-  }
-  s_mp_clamp(T);
-
-  /* T /= R */
-  s_mp_div_2d(T, mmm->b);
-
-  if ((res = s_mp_cmp(T, &mmm->N)) >= 0) {
-    /* T = T - N */
-    MP_CHECKOK( s_mp_sub(T, &mmm->N) );
-#ifdef DEBUG
-    if ((res = mp_cmp(T, &mmm->N)) >= 0) {
-      res = MP_UNDEF;
-      goto CLEANUP;
-    }
-#endif
-  }
-  res = MP_OKAY;
-CLEANUP:
-  return res;
-}
-
-#if !defined(MP_ASSEMBLY_MUL_MONT) && !defined(MP_MONT_USE_MP_MUL)
-mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c,
-                   mp_mont_modulus *mmm)
-{
-  mp_digit *pb;
-  mp_digit m_i;
-  mp_err   res;
-  mp_size  ib;
-  mp_size  useda, usedb;
-
-  ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
-  if (MP_USED(a) < MP_USED(b)) {
-    const mp_int *xch = b;      /* switch a and b, to do fewer outer loops */
-    b = a;
-    a = xch;
-  }
-
-  MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
-  ib = MP_USED(a) + MP_MAX(MP_USED(b), MP_USED(&mmm->N)) + 2;
-  if((res = s_mp_pad(c, ib)) != MP_OKAY)
-    goto CLEANUP;
-
-  useda = MP_USED(a);
-  pb = MP_DIGITS(b);
-  s_mpv_mul_d(MP_DIGITS(a), useda, *pb++, MP_DIGITS(c));
-  s_mp_setz(MP_DIGITS(c) + useda + 1, ib - (useda + 1));
-  m_i = MP_DIGIT(c, 0) * mmm->n0prime;
-  s_mp_mul_d_add_offset(&mmm->N, m_i, c, 0);
-
-  /* Outer loop:  Digits of b */
-  usedb = MP_USED(b);
-  for (ib = 1; ib < usedb; ib++) {
-    mp_digit b_i    = *pb++;
-
-    /* Inner product:  Digits of a */
-    if (b_i)
-      s_mpv_mul_d_add_prop(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
-    m_i = MP_DIGIT(c, ib) * mmm->n0prime;
-    s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib);
-  }
-  if (usedb < MP_USED(&mmm->N)) {
-    for (usedb = MP_USED(&mmm->N); ib < usedb; ++ib ) {
-      m_i = MP_DIGIT(c, ib) * mmm->n0prime;
-      s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib);
-    }
-  }
-  s_mp_clamp(c);
-  s_mp_div_2d(c, mmm->b);
-  if (s_mp_cmp(c, &mmm->N) >= 0) {
-    MP_CHECKOK( s_mp_sub(c, &mmm->N) );
-  }
-  res = MP_OKAY;
-
-CLEANUP:
-  return res;
-}
-#endif
--- a/jdk/src/share/native/sun/security/ec/mpprime.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- *  Utilities for finding and working with prime and pseudo-prime
- *  integers
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1997
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MP_PRIME_H
-#define _MP_PRIME_H
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include "mpi.h"
-
-extern const int prime_tab_size;   /* number of primes available */
-extern const mp_digit prime_tab[];
-
-/* Tests for divisibility    */
-mp_err  mpp_divis(mp_int *a, mp_int *b);
-mp_err  mpp_divis_d(mp_int *a, mp_digit d);
-
-/* Random selection          */
-mp_err  mpp_random(mp_int *a);
-mp_err  mpp_random_size(mp_int *a, mp_size prec);
-
-/* Pseudo-primality testing  */
-mp_err  mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which);
-mp_err  mpp_divis_primes(mp_int *a, mp_digit *np);
-mp_err  mpp_fermat(mp_int *a, mp_digit w);
-mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes);
-mp_err  mpp_pprime(mp_int *a, int nt);
-mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
-                 unsigned char *sieve, mp_size nSieve);
-mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong,
-                      unsigned long * nTries);
-
-#endif /* _MP_PRIME_H */
--- a/jdk/src/share/native/sun/security/ec/oid.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,473 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#ifndef __linux__
-#include <sys/systm.h>
-#endif /* __linux__ */
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/kmem.h>
-#else
-#include <string.h>
-#endif
-#include "ec.h"
-#include "ecl-curve.h"
-#include "ecc_impl.h"
-#include "secoidt.h"
-
-#define CERTICOM_OID            0x2b, 0x81, 0x04
-#define SECG_OID                CERTICOM_OID, 0x00
-
-#define ANSI_X962_OID           0x2a, 0x86, 0x48, 0xce, 0x3d
-#define ANSI_X962_CURVE_OID     ANSI_X962_OID, 0x03
-#define ANSI_X962_GF2m_OID      ANSI_X962_CURVE_OID, 0x00
-#define ANSI_X962_GFp_OID       ANSI_X962_CURVE_OID, 0x01
-
-#define CONST_OID static const unsigned char
-
-/* ANSI X9.62 prime curve OIDs */
-/* NOTE: prime192v1 is the same as secp192r1, prime256v1 is the
- * same as secp256r1
- */
-CONST_OID ansiX962prime192v1[] = { ANSI_X962_GFp_OID, 0x01 };
-CONST_OID ansiX962prime192v2[] = { ANSI_X962_GFp_OID, 0x02 };
-CONST_OID ansiX962prime192v3[] = { ANSI_X962_GFp_OID, 0x03 };
-CONST_OID ansiX962prime239v1[] = { ANSI_X962_GFp_OID, 0x04 };
-CONST_OID ansiX962prime239v2[] = { ANSI_X962_GFp_OID, 0x05 };
-CONST_OID ansiX962prime239v3[] = { ANSI_X962_GFp_OID, 0x06 };
-CONST_OID ansiX962prime256v1[] = { ANSI_X962_GFp_OID, 0x07 };
-
-/* SECG prime curve OIDs */
-CONST_OID secgECsecp112r1[] = { SECG_OID, 0x06 };
-CONST_OID secgECsecp112r2[] = { SECG_OID, 0x07 };
-CONST_OID secgECsecp128r1[] = { SECG_OID, 0x1c };
-CONST_OID secgECsecp128r2[] = { SECG_OID, 0x1d };
-CONST_OID secgECsecp160k1[] = { SECG_OID, 0x09 };
-CONST_OID secgECsecp160r1[] = { SECG_OID, 0x08 };
-CONST_OID secgECsecp160r2[] = { SECG_OID, 0x1e };
-CONST_OID secgECsecp192k1[] = { SECG_OID, 0x1f };
-CONST_OID secgECsecp224k1[] = { SECG_OID, 0x20 };
-CONST_OID secgECsecp224r1[] = { SECG_OID, 0x21 };
-CONST_OID secgECsecp256k1[] = { SECG_OID, 0x0a };
-CONST_OID secgECsecp384r1[] = { SECG_OID, 0x22 };
-CONST_OID secgECsecp521r1[] = { SECG_OID, 0x23 };
-
-/* SECG characterisitic two curve OIDs */
-CONST_OID secgECsect113r1[] = {SECG_OID, 0x04 };
-CONST_OID secgECsect113r2[] = {SECG_OID, 0x05 };
-CONST_OID secgECsect131r1[] = {SECG_OID, 0x16 };
-CONST_OID secgECsect131r2[] = {SECG_OID, 0x17 };
-CONST_OID secgECsect163k1[] = {SECG_OID, 0x01 };
-CONST_OID secgECsect163r1[] = {SECG_OID, 0x02 };
-CONST_OID secgECsect163r2[] = {SECG_OID, 0x0f };
-CONST_OID secgECsect193r1[] = {SECG_OID, 0x18 };
-CONST_OID secgECsect193r2[] = {SECG_OID, 0x19 };
-CONST_OID secgECsect233k1[] = {SECG_OID, 0x1a };
-CONST_OID secgECsect233r1[] = {SECG_OID, 0x1b };
-CONST_OID secgECsect239k1[] = {SECG_OID, 0x03 };
-CONST_OID secgECsect283k1[] = {SECG_OID, 0x10 };
-CONST_OID secgECsect283r1[] = {SECG_OID, 0x11 };
-CONST_OID secgECsect409k1[] = {SECG_OID, 0x24 };
-CONST_OID secgECsect409r1[] = {SECG_OID, 0x25 };
-CONST_OID secgECsect571k1[] = {SECG_OID, 0x26 };
-CONST_OID secgECsect571r1[] = {SECG_OID, 0x27 };
-
-/* ANSI X9.62 characteristic two curve OIDs */
-CONST_OID ansiX962c2pnb163v1[] = { ANSI_X962_GF2m_OID, 0x01 };
-CONST_OID ansiX962c2pnb163v2[] = { ANSI_X962_GF2m_OID, 0x02 };
-CONST_OID ansiX962c2pnb163v3[] = { ANSI_X962_GF2m_OID, 0x03 };
-CONST_OID ansiX962c2pnb176v1[] = { ANSI_X962_GF2m_OID, 0x04 };
-CONST_OID ansiX962c2tnb191v1[] = { ANSI_X962_GF2m_OID, 0x05 };
-CONST_OID ansiX962c2tnb191v2[] = { ANSI_X962_GF2m_OID, 0x06 };
-CONST_OID ansiX962c2tnb191v3[] = { ANSI_X962_GF2m_OID, 0x07 };
-CONST_OID ansiX962c2onb191v4[] = { ANSI_X962_GF2m_OID, 0x08 };
-CONST_OID ansiX962c2onb191v5[] = { ANSI_X962_GF2m_OID, 0x09 };
-CONST_OID ansiX962c2pnb208w1[] = { ANSI_X962_GF2m_OID, 0x0a };
-CONST_OID ansiX962c2tnb239v1[] = { ANSI_X962_GF2m_OID, 0x0b };
-CONST_OID ansiX962c2tnb239v2[] = { ANSI_X962_GF2m_OID, 0x0c };
-CONST_OID ansiX962c2tnb239v3[] = { ANSI_X962_GF2m_OID, 0x0d };
-CONST_OID ansiX962c2onb239v4[] = { ANSI_X962_GF2m_OID, 0x0e };
-CONST_OID ansiX962c2onb239v5[] = { ANSI_X962_GF2m_OID, 0x0f };
-CONST_OID ansiX962c2pnb272w1[] = { ANSI_X962_GF2m_OID, 0x10 };
-CONST_OID ansiX962c2pnb304w1[] = { ANSI_X962_GF2m_OID, 0x11 };
-CONST_OID ansiX962c2tnb359v1[] = { ANSI_X962_GF2m_OID, 0x12 };
-CONST_OID ansiX962c2pnb368w1[] = { ANSI_X962_GF2m_OID, 0x13 };
-CONST_OID ansiX962c2tnb431r1[] = { ANSI_X962_GF2m_OID, 0x14 };
-
-#define OI(x) { siDEROID, (unsigned char *)x, sizeof x }
-#ifndef SECOID_NO_STRINGS
-#define OD(oid,tag,desc,mech,ext) { OI(oid), tag, desc, mech, ext }
-#else
-#define OD(oid,tag,desc,mech,ext) { OI(oid), tag, 0, mech, ext }
-#endif
-
-#define CKM_INVALID_MECHANISM 0xffffffffUL
-
-/* XXX this is incorrect */
-#define INVALID_CERT_EXTENSION 1
-
-#define CKM_ECDSA                      0x00001041
-#define CKM_ECDSA_SHA1                 0x00001042
-#define CKM_ECDH1_DERIVE               0x00001050
-
-static SECOidData ANSI_prime_oids[] = {
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-
-    OD( ansiX962prime192v1, ECCurve_NIST_P192,
-        "ANSI X9.62 elliptic curve prime192v1 (aka secp192r1, NIST P-192)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962prime192v2, ECCurve_X9_62_PRIME_192V2,
-        "ANSI X9.62 elliptic curve prime192v2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962prime192v3, ECCurve_X9_62_PRIME_192V3,
-        "ANSI X9.62 elliptic curve prime192v3",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962prime239v1, ECCurve_X9_62_PRIME_239V1,
-        "ANSI X9.62 elliptic curve prime239v1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962prime239v2, ECCurve_X9_62_PRIME_239V2,
-        "ANSI X9.62 elliptic curve prime239v2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962prime239v3, ECCurve_X9_62_PRIME_239V3,
-        "ANSI X9.62 elliptic curve prime239v3",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962prime256v1, ECCurve_NIST_P256,
-        "ANSI X9.62 elliptic curve prime256v1 (aka secp256r1, NIST P-256)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION )
-};
-
-static SECOidData SECG_oids[] = {
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-
-    OD( secgECsect163k1, ECCurve_NIST_K163,
-        "SECG elliptic curve sect163k1 (aka NIST K-163)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect163r1, ECCurve_SECG_CHAR2_163R1,
-        "SECG elliptic curve sect163r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect239k1, ECCurve_SECG_CHAR2_239K1,
-        "SECG elliptic curve sect239k1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect113r1, ECCurve_SECG_CHAR2_113R1,
-        "SECG elliptic curve sect113r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect113r2, ECCurve_SECG_CHAR2_113R2,
-        "SECG elliptic curve sect113r2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp112r1, ECCurve_SECG_PRIME_112R1,
-        "SECG elliptic curve secp112r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp112r2, ECCurve_SECG_PRIME_112R2,
-        "SECG elliptic curve secp112r2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp160r1, ECCurve_SECG_PRIME_160R1,
-        "SECG elliptic curve secp160r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp160k1, ECCurve_SECG_PRIME_160K1,
-        "SECG elliptic curve secp160k1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp256k1, ECCurve_SECG_PRIME_256K1,
-        "SECG elliptic curve secp256k1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    OD( secgECsect163r2, ECCurve_NIST_B163,
-        "SECG elliptic curve sect163r2 (aka NIST B-163)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect283k1, ECCurve_NIST_K283,
-        "SECG elliptic curve sect283k1 (aka NIST K-283)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect283r1, ECCurve_NIST_B283,
-        "SECG elliptic curve sect283r1 (aka NIST B-283)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    OD( secgECsect131r1, ECCurve_SECG_CHAR2_131R1,
-        "SECG elliptic curve sect131r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect131r2, ECCurve_SECG_CHAR2_131R2,
-        "SECG elliptic curve sect131r2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect193r1, ECCurve_SECG_CHAR2_193R1,
-        "SECG elliptic curve sect193r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect193r2, ECCurve_SECG_CHAR2_193R2,
-        "SECG elliptic curve sect193r2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect233k1, ECCurve_NIST_K233,
-        "SECG elliptic curve sect233k1 (aka NIST K-233)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect233r1, ECCurve_NIST_B233,
-        "SECG elliptic curve sect233r1 (aka NIST B-233)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp128r1, ECCurve_SECG_PRIME_128R1,
-        "SECG elliptic curve secp128r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp128r2, ECCurve_SECG_PRIME_128R2,
-        "SECG elliptic curve secp128r2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp160r2, ECCurve_SECG_PRIME_160R2,
-        "SECG elliptic curve secp160r2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp192k1, ECCurve_SECG_PRIME_192K1,
-        "SECG elliptic curve secp192k1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp224k1, ECCurve_SECG_PRIME_224K1,
-        "SECG elliptic curve secp224k1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp224r1, ECCurve_NIST_P224,
-        "SECG elliptic curve secp224r1 (aka NIST P-224)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp384r1, ECCurve_NIST_P384,
-        "SECG elliptic curve secp384r1 (aka NIST P-384)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsecp521r1, ECCurve_NIST_P521,
-        "SECG elliptic curve secp521r1 (aka NIST P-521)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect409k1, ECCurve_NIST_K409,
-        "SECG elliptic curve sect409k1 (aka NIST K-409)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect409r1, ECCurve_NIST_B409,
-        "SECG elliptic curve sect409r1 (aka NIST B-409)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect571k1, ECCurve_NIST_K571,
-        "SECG elliptic curve sect571k1 (aka NIST K-571)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( secgECsect571r1, ECCurve_NIST_B571,
-        "SECG elliptic curve sect571r1 (aka NIST B-571)",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION )
-};
-
-static SECOidData ANSI_oids[] = {
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-
-    /* ANSI X9.62 named elliptic curves (characteristic two field) */
-    OD( ansiX962c2pnb163v1, ECCurve_X9_62_CHAR2_PNB163V1,
-        "ANSI X9.62 elliptic curve c2pnb163v1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2pnb163v2, ECCurve_X9_62_CHAR2_PNB163V2,
-        "ANSI X9.62 elliptic curve c2pnb163v2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2pnb163v3, ECCurve_X9_62_CHAR2_PNB163V3,
-        "ANSI X9.62 elliptic curve c2pnb163v3",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2pnb176v1, ECCurve_X9_62_CHAR2_PNB176V1,
-        "ANSI X9.62 elliptic curve c2pnb176v1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb191v1, ECCurve_X9_62_CHAR2_TNB191V1,
-        "ANSI X9.62 elliptic curve c2tnb191v1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb191v2, ECCurve_X9_62_CHAR2_TNB191V2,
-        "ANSI X9.62 elliptic curve c2tnb191v2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb191v3, ECCurve_X9_62_CHAR2_TNB191V3,
-        "ANSI X9.62 elliptic curve c2tnb191v3",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    OD( ansiX962c2pnb208w1, ECCurve_X9_62_CHAR2_PNB208W1,
-        "ANSI X9.62 elliptic curve c2pnb208w1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb239v1, ECCurve_X9_62_CHAR2_TNB239V1,
-        "ANSI X9.62 elliptic curve c2tnb239v1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb239v2, ECCurve_X9_62_CHAR2_TNB239V2,
-        "ANSI X9.62 elliptic curve c2tnb239v2",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb239v3, ECCurve_X9_62_CHAR2_TNB239V3,
-        "ANSI X9.62 elliptic curve c2tnb239v3",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    { { siDEROID, NULL, 0 }, ECCurve_noName,
-        "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-    OD( ansiX962c2pnb272w1, ECCurve_X9_62_CHAR2_PNB272W1,
-        "ANSI X9.62 elliptic curve c2pnb272w1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2pnb304w1, ECCurve_X9_62_CHAR2_PNB304W1,
-        "ANSI X9.62 elliptic curve c2pnb304w1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb359v1, ECCurve_X9_62_CHAR2_TNB359V1,
-        "ANSI X9.62 elliptic curve c2tnb359v1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2pnb368w1, ECCurve_X9_62_CHAR2_PNB368W1,
-        "ANSI X9.62 elliptic curve c2pnb368w1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION ),
-    OD( ansiX962c2tnb431r1, ECCurve_X9_62_CHAR2_TNB431R1,
-        "ANSI X9.62 elliptic curve c2tnb431r1",
-        CKM_INVALID_MECHANISM,
-        INVALID_CERT_EXTENSION )
-};
-
-SECOidData *
-SECOID_FindOID(const SECItem *oid)
-{
-    SECOidData *po;
-    SECOidData *ret;
-    int i;
-
-    if (oid->len == 8) {
-        if (oid->data[6] == 0x00) {
-                /* XXX bounds check */
-                po = &ANSI_oids[oid->data[7]];
-                if (memcmp(oid->data, po->oid.data, 8) == 0)
-                        ret = po;
-        }
-        if (oid->data[6] == 0x01) {
-                /* XXX bounds check */
-                po = &ANSI_prime_oids[oid->data[7]];
-                if (memcmp(oid->data, po->oid.data, 8) == 0)
-                        ret = po;
-        }
-    } else if (oid->len == 5) {
-        /* XXX bounds check */
-        po = &SECG_oids[oid->data[4]];
-        if (memcmp(oid->data, po->oid.data, 5) == 0)
-                ret = po;
-    } else {
-        ret = NULL;
-    }
-    return(ret);
-}
-
-ECCurveName
-SECOID_FindOIDTag(const SECItem *oid)
-{
-    SECOidData *oiddata;
-
-    oiddata = SECOID_FindOID (oid);
-    if (oiddata == NULL)
-        return ECCurve_noName;
-
-    return oiddata->offset;
-}
--- a/jdk/src/share/native/sun/security/ec/secitem.c	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/*
- * Support routines for SECItem data structure.
- *
- * $Id: secitem.c,v 1.14 2006/05/22 22:24:34 wtchang%redhat.com Exp $
- */
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#ifndef __linux__
-#include <sys/systm.h>
-#endif /* __linux__ */
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/kmem.h>
-#else
-#include <string.h>
-
-#ifndef _WIN32
-#include <strings.h>
-#endif /* _WIN32 */
-
-#include <assert.h>
-#endif
-#include "ec.h"
-#include "ecl-curve.h"
-#include "ecc_impl.h"
-
-void SECITEM_FreeItem(SECItem *, PRBool);
-
-SECItem *
-SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, unsigned int len,
-    int kmflag)
-{
-    SECItem *result = NULL;
-    void *mark = NULL;
-
-    if (arena != NULL) {
-        mark = PORT_ArenaMark(arena);
-    }
-
-    if (item == NULL) {
-        if (arena != NULL) {
-            result = PORT_ArenaZAlloc(arena, sizeof(SECItem), kmflag);
-        } else {
-            result = PORT_ZAlloc(sizeof(SECItem), kmflag);
-        }
-        if (result == NULL) {
-            goto loser;
-        }
-    } else {
-        PORT_Assert(item->data == NULL);
-        result = item;
-    }
-
-    result->len = len;
-    if (len) {
-        if (arena != NULL) {
-            result->data = PORT_ArenaAlloc(arena, len, kmflag);
-        } else {
-            result->data = PORT_Alloc(len, kmflag);
-        }
-        if (result->data == NULL) {
-            goto loser;
-        }
-    } else {
-        result->data = NULL;
-    }
-
-    if (mark) {
-        PORT_ArenaUnmark(arena, mark);
-    }
-    return(result);
-
-loser:
-    if ( arena != NULL ) {
-        if (mark) {
-            PORT_ArenaRelease(arena, mark);
-        }
-        if (item != NULL) {
-            item->data = NULL;
-            item->len = 0;
-        }
-    } else {
-        if (result != NULL) {
-            SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
-        }
-        /*
-         * If item is not NULL, the above has set item->data and
-         * item->len to 0.
-         */
-    }
-    return(NULL);
-}
-
-SECStatus
-SECITEM_CopyItem(PRArenaPool *arena, SECItem *to, const SECItem *from,
-   int kmflag)
-{
-    to->type = from->type;
-    if (from->data && from->len) {
-        if ( arena ) {
-            to->data = (unsigned char*) PORT_ArenaAlloc(arena, from->len,
-                kmflag);
-        } else {
-            to->data = (unsigned char*) PORT_Alloc(from->len, kmflag);
-        }
-
-        if (!to->data) {
-            return SECFailure;
-        }
-        PORT_Memcpy(to->data, from->data, from->len);
-        to->len = from->len;
-    } else {
-        to->data = 0;
-        to->len = 0;
-    }
-    return SECSuccess;
-}
-
-void
-SECITEM_FreeItem(SECItem *zap, PRBool freeit)
-{
-    if (zap) {
-#ifdef _KERNEL
-        kmem_free(zap->data, zap->len);
-#else
-        free(zap->data);
-#endif
-        zap->data = 0;
-        zap->len = 0;
-        if (freeit) {
-#ifdef _KERNEL
-            kmem_free(zap, sizeof (SECItem));
-#else
-            free(zap);
-#endif
-        }
-    }
-}
--- a/jdk/src/share/native/sun/security/ec/secoidt.h	Wed Oct 07 14:14:45 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SECOIDT_H_
-#define _SECOIDT_H_
-
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-/*
- * secoidt.h - public data structures for ASN.1 OID functions
- *
- * $Id: secoidt.h,v 1.23 2007/05/05 22:45:16 nelson%bolyard.com Exp $
- */
-
-typedef struct SECOidDataStr SECOidData;
-typedef struct SECAlgorithmIDStr SECAlgorithmID;
-
-/*
-** An X.500 algorithm identifier
-*/
-struct SECAlgorithmIDStr {
-    SECItem algorithm;
-    SECItem parameters;
-};
-
-#define SEC_OID_SECG_EC_SECP192R1 SEC_OID_ANSIX962_EC_PRIME192V1
-#define SEC_OID_SECG_EC_SECP256R1 SEC_OID_ANSIX962_EC_PRIME256V1
-#define SEC_OID_PKCS12_KEY_USAGE  SEC_OID_X509_KEY_USAGE
-
-/* fake OID for DSS sign/verify */
-#define SEC_OID_SHA SEC_OID_MISS_DSS
-
-typedef enum {
-    INVALID_CERT_EXTENSION = 0,
-    UNSUPPORTED_CERT_EXTENSION = 1,
-    SUPPORTED_CERT_EXTENSION = 2
-} SECSupportExtenTag;
-
-struct SECOidDataStr {
-    SECItem            oid;
-    ECCurveName        offset;
-    const char *       desc;
-    unsigned long      mechanism;
-    SECSupportExtenTag supportedExtension;
-                                /* only used for x.509 v3 extensions, so
-                                   that we can print the names of those
-                                   extensions that we don't even support */
-};
-
-#endif /* _SECOIDT_H_ */
--- a/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,8 +31,6 @@
 import sun.awt.*;
 import java.awt.image.*;
 import java.text.BreakIterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
--- a/jdk/src/solaris/classes/sun/awt/X11/ListHelper.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/ListHelper.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import sun.awt.motif.X11FontMetrics;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 // FIXME: implement multi-select
 /*
@@ -43,7 +43,7 @@
  * posting of Item or ActionEvents
  */
 public class ListHelper implements XScrollbarClient {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.ListHelper");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.ListHelper");
 
     private final int FOCUS_INSET = 1;
 
@@ -263,7 +263,7 @@
     }
 
     public int y2index(int y) {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine("y=" + y +", firstIdx=" + firstDisplayedIndex() +", itemHeight=" + getItemHeight()
                      + ",item_margin=" + ITEM_MARGIN);
         }
--- a/jdk/src/solaris/classes/sun/awt/X11/UnsafeXDisposerRecord.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/UnsafeXDisposerRecord.java	Wed Jul 05 17:01:52 2017 +0200
@@ -25,10 +25,10 @@
 package sun.awt.X11;
 
 import sun.misc.Unsafe;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.UnsafeXDisposerRecord");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.UnsafeXDisposerRecord");
     private static Unsafe unsafe = XlibWrapper.unsafe;
     final long[] unsafe_ptrs, x_ptrs;
     final String name;
@@ -59,11 +59,11 @@
         XToolkit.awtLock();
         try {
             if (!disposed) {
-                if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(Level.WARNING)) {
+                if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(PlatformLogger.WARNING)) {
                     if (place != null) {
-                        log.log(Level.WARNING, name + " object was not disposed before finalization!", place);
+                        log.warning(name + " object was not disposed before finalization!", place);
                     } else {
-                        log.log(Level.WARNING, name + " object was not disposed before finalization!");
+                        log.warning(name + " object was not disposed before finalization!");
                     }
                 }
 
--- a/jdk/src/solaris/classes/sun/awt/X11/XAWTXSettings.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XAWTXSettings.java	Wed Jul 05 17:01:52 2017 +0200
@@ -35,15 +35,14 @@
 import java.util.*;
 import java.awt.*;
 import sun.awt.XSettings;
-import java.util.logging.*;
-
+import sun.util.logging.PlatformLogger;
 
 
 class XAWTXSettings extends XSettings implements XMSelectionListener {
 
     private final XAtom xSettingsPropertyAtom = XAtom.get("_XSETTINGS_SETTINGS");
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XAWTXSettings");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XAWTXSettings");
 
     /* The maximal length of the property data. */
     public static final long MAX_LENGTH = 1000000;
@@ -56,7 +55,7 @@
     }
 
     void initXSettings() {
-        if (log.isLoggable(Level.FINE)) log.fine("Initializing XAWT XSettings");
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Initializing XAWT XSettings");
         settings = new XMSelection("_XSETTINGS");
         settings.addSelectionListener(this);
         initPerScreenXSettings();
@@ -67,12 +66,12 @@
     }
 
     public void ownerDeath(int screen, XMSelection sel, long deadOwner) {
-        if (log.isLoggable(Level.FINE)) log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen);
     }
 
 
     public void ownerChanged(int screen, XMSelection sel, long newOwner, long data, long timestamp) {
-        if (log.isLoggable(Level.FINE)) log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen );
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen );
     }
 
     public void selectionChanged(int screen, XMSelection sel, long owner , XPropertyEvent event) {
@@ -81,7 +80,7 @@
     }
 
     void initPerScreenXSettings() {
-        if (log.isLoggable(Level.FINE)) log.fine("Updating Per XSettings changes");
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Updating Per XSettings changes");
 
         /*
          * As toolkit cannot yet cope with per-screen desktop properties,
@@ -115,7 +114,7 @@
     }
 
     private Map getUpdatedSettings(final long owner) {
-        if (log.isLoggable(Level.FINE)) log.fine("owner =" + owner);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("owner =" + owner);
         if (0 == owner) {
             return null;
         }
@@ -129,13 +128,13 @@
                 int status = getter.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance());
 
                 if (status != XConstants.Success || getter.getData() == 0) {
-                    if (log.isLoggable(Level.FINE)) log.fine("OH OH : getter failed  status = " + status );
+                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("OH OH : getter failed  status = " + status );
                     settings = null;
                 }
 
                 long ptr = getter.getData();
 
-                if (log.isLoggable(Level.FINE)) log.fine("noItems = " + getter.getNumberOfItems());
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("noItems = " + getter.getNumberOfItems());
                 byte array[] = Native.toBytes(ptr,getter.getNumberOfItems());
                 if (array != null) {
                     settings = update(array);
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,7 @@
 
 import java.util.ArrayList;
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 import sun.java2d.SurfaceData;
 import sun.java2d.SunGraphics2D;
 
@@ -49,7 +49,7 @@
      *
      ************************************************/
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XBaseMenuWindow");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseMenuWindow");
 
     /*
      * Colors are calculated using MotifColorUtilities class
@@ -330,7 +330,7 @@
                 items.add(mp);
             }
         } else {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("WARNING: Attempt to add menu item without a peer");
             }
         }
@@ -351,7 +351,7 @@
             if (index < items.size()) {
                 items.remove(index);
             } else {
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("WARNING: Attempt to remove non-existing menu item, index : " + index + ", item count : " + items.size());
                 }
             }
@@ -386,7 +386,7 @@
             XMenuPeer showingSubmenu = getShowingSubmenu();
             int newSelectedIndex = (item != null) ? items.indexOf(item) : -1;
             if (this.selectedIndex != newSelectedIndex) {
-                if (log.isLoggable(Level.FINEST)) {
+                if (log.isLoggable(PlatformLogger.FINEST)) {
                     log.finest("Selected index changed, was : " + this.selectedIndex + ", new : " + newSelectedIndex);
                 }
                 this.selectedIndex = newSelectedIndex;
@@ -426,7 +426,7 @@
         try {
             synchronized(getMenuTreeLock()) {
                 if (showingSubmenu != submenuToShow) {
-                    if (log.isLoggable(Level.FINER)) {
+                    if (log.isLoggable(PlatformLogger.FINER)) {
                         log.finest("Changing showing submenu");
                     }
                     if (showingSubmenu != null) {
@@ -1122,7 +1122,7 @@
      * that grabs input focus
      */
     void doHandleJavaKeyEvent(KeyEvent event) {
-        if (log.isLoggable(Level.FINER)) log.finer(event.toString());
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer(event.toString());
         if (event.getID() != KeyEvent.KEY_PRESSED) {
             return;
         }
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,15 +27,15 @@
 
 import java.awt.*;
 import sun.awt.*;
-import java.util.logging.*;
 import java.util.*;
+import sun.util.logging.PlatformLogger;
 
 public class XBaseWindow {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XBaseWindow");
-    private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XBaseWindow");
-    private static final Logger eventLog = Logger.getLogger("sun.awt.X11.event.XBaseWindow");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XBaseWindow");
-    private static final Logger grabLog = Logger.getLogger("sun.awt.X11.grab.XBaseWindow");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseWindow");
+    private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XBaseWindow");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XBaseWindow");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XBaseWindow");
+    private static final PlatformLogger grabLog = PlatformLogger.getLogger("sun.awt.X11.grab.XBaseWindow");
 
     public static final String
         PARENT_WINDOW = "parent window", // parent window, Long
@@ -160,7 +160,7 @@
      * with class-specific values and perform post-initialization actions.
      */
     void postInit(XCreateWindowParams params) {
-        if (log.isLoggable(Level.FINE)) log.fine("WM name is " + getWMName());
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("WM name is " + getWMName());
         updateWMName();
 
         // Set WM_CLIENT_LEADER property
@@ -198,7 +198,7 @@
             awtUnlock();
             throw re;
         } catch (Throwable t) {
-            log.log(Level.WARNING, "Exception during peer initialization", t);
+            log.warning("Exception during peer initialization", t);
             awtLock();
             initialising = InitialiseState.FAILED_INITIALISATION;
             awtLockNotifyAll();
@@ -360,7 +360,7 @@
                     value_mask |= XConstants.CWBitGravity;
                 }
 
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     log.fine("Creating window for " + this + " with the following attributes: \n" + params);
                 }
                 window = XlibWrapper.XCreateWindow(XToolkit.getDisplay(),
@@ -480,7 +480,7 @@
     }
 
     public void setSizeHints(long flags, int x, int y, int width, int height) {
-        if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
+        if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
         XToolkit.awtLock();
         try {
             XSizeHints hints = getHints();
@@ -541,7 +541,7 @@
             flags |= XUtilConstants.PWinGravity;
             hints.set_flags(flags);
             hints.set_win_gravity((int)XConstants.NorthWestGravity);
-            if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
+            if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
                                                              ", values " + hints);
             XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData);
         } finally {
@@ -593,7 +593,7 @@
     public void xRequestFocus(long time) {
         XToolkit.awtLock();
         try {
-            if (focusLog.isLoggable(Level.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
+            if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
             XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time);
         } finally {
             XToolkit.awtUnlock();
@@ -602,7 +602,7 @@
     public void xRequestFocus() {
         XToolkit.awtLock();
         try {
-            if (focusLog.isLoggable(Level.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
+            if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
              XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow());
         } finally {
             XToolkit.awtUnlock();
@@ -619,7 +619,7 @@
     }
 
     public void xSetVisible(boolean visible) {
-        if (log.isLoggable(Level.FINE)) log.fine("Setting visible on " + this + " to " + visible);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
         XToolkit.awtLock();
         try {
             this.visible = visible;
@@ -824,7 +824,7 @@
      * The active grab overrides activated automatic grab.
      */
     public boolean grabInput() {
-        grabLog.log(Level.FINE, "Grab input on {0}", new Object[] {this});
+        grabLog.fine("Grab input on {0}", this);
 
         XToolkit.awtLock();
         try {
@@ -887,7 +887,7 @@
         XToolkit.awtLock();
         try {
             XBaseWindow grabWindow = XAwtState.getGrabWindow();
-            grabLog.log(Level.FINE, "UnGrab input on {0}", new Object[] {grabWindow});
+            grabLog.fine("UnGrab input on {0}", grabWindow);
             if (grabWindow != null) {
                 grabWindow.ungrabInputImpl();
                 if (!XToolkit.getSunAwtDisableGrab()) {
@@ -929,7 +929,7 @@
         mapped = false;
     }
     public void handleReparentNotifyEvent(XEvent xev) {
-        if (eventLog.isLoggable(Level.FINER)) {
+        if (eventLog.isLoggable(PlatformLogger.FINER)) {
             XReparentEvent msg = xev.get_xreparent();
             eventLog.finer(msg.toString());
         }
@@ -939,8 +939,8 @@
         if (XPropertyCache.isCachingSupported()) {
             XPropertyCache.clearCache(window, XAtom.get(msg.get_atom()));
         }
-        if (eventLog.isLoggable(Level.FINER)) {
-            eventLog.log(Level.FINER, "{0}", new Object[] {msg});
+        if (eventLog.isLoggable(PlatformLogger.FINER)) {
+            eventLog.finer("{0}", msg);
         }
     }
 
@@ -969,7 +969,7 @@
     }
 
     public void handleClientMessage(XEvent xev) {
-        if (eventLog.isLoggable(Level.FINER)) {
+        if (eventLog.isLoggable(PlatformLogger.FINER)) {
             XClientMessageEvent msg = xev.get_xclient();
             eventLog.finer(msg.toString());
         }
@@ -1021,8 +1021,7 @@
     }
     public void handleConfigureNotifyEvent(XEvent xev) {
         XConfigureEvent xe = xev.get_xconfigure();
-        insLog.log(Level.FINER, "Configure, {0}",
-                   new Object[] {xe});
+        insLog.finer("Configure, {0}", xe);
         x = xe.get_x();
         y = xe.get_y();
         width = xe.get_width();
@@ -1073,7 +1072,7 @@
     }
 
     public void dispatchEvent(XEvent xev) {
-        if (eventLog.isLoggable(Level.FINEST)) eventLog.finest(xev.toString());
+        if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xev.toString());
         int type = xev.get_type();
 
         if (isDisposed()) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,8 +29,6 @@
 import java.awt.peer.*;
 import java.awt.event.*;
 
-import java.util.logging.*;
-
 import java.lang.reflect.Field;
 import sun.awt.SunToolkit;
 
@@ -42,8 +40,6 @@
      *
      ************************************************/
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XCheckboxMenuItemPeer");
-
     /*
      * CheckboxMenuItem's fields
      */
--- a/jdk/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -32,11 +32,11 @@
 import javax.swing.plaf.basic.BasicGraphicsUtils;
 import java.awt.geom.AffineTransform;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
 
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XCheckboxPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XCheckboxPeer");
 
     private static final Insets focusInsets = new Insets(0,0,0,0);
     private static final Insets borderInsets = new Insets(2,2,2,2);
@@ -172,7 +172,7 @@
             Checkbox cb = (Checkbox) e.getSource();
 
             if (cb.contains(e.getX(), e.getY())) {
-                if (log.isLoggable(Level.FINER)) {
+                if (log.isLoggable(PlatformLogger.FINER)) {
                     log.finer("mousePressed() on " + target.getName() + " : armed = " + armed + ", pressed = " + pressed
                               + ", selected = " + selected + ", enabled = " + isEnabled());
                 }
@@ -190,7 +190,7 @@
     }
 
     public void mouseReleased(MouseEvent e) {
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
             log.finer("mouseReleased() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
                       + ", selected = " + selected + ", enabled = " + isEnabled());
         }
@@ -215,7 +215,7 @@
     }
 
     public void mouseEntered(MouseEvent e) {
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
             log.finer("mouseEntered() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
                       + ", selected = " + selected + ", enabled = " + isEnabled());
         }
@@ -226,7 +226,7 @@
     }
 
     public void mouseExited(MouseEvent e) {
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
             log.finer("mouseExited() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
                       + ", selected = " + selected + ", enabled = " + isEnabled());
         }
--- a/jdk/src/solaris/classes/sun/awt/X11/XChoicePeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XChoicePeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -28,7 +28,7 @@
 import java.awt.*;
 import java.awt.peer.*;
 import java.awt.event.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 // FIXME: tab traversal should be disabled when mouse is captured (4816336)
 
@@ -43,7 +43,7 @@
 // TODO: make painting more efficient (i.e. when down arrow is pressed, only two items should need to be repainted.
 
 public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelStateListener {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XChoicePeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XChoicePeer");
 
     private static final int MAX_UNFURLED_ITEMS = 10;  // Maximum number of
     // items to be displayed
@@ -892,7 +892,7 @@
                 if (transX > 0 && transX < width &&
                     transY > 0 && transY < height) {
                     int newIdx = helper.y2index(transY);
-                    if (log.isLoggable(Level.FINE)) {
+                    if (log.isLoggable(PlatformLogger.FINE)) {
                         log.fine("transX=" + transX + ", transY=" + transY
                                  + ",width=" + width + ", height=" + height
                                  + ", newIdx=" + newIdx + " on " + target);
--- a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -66,7 +66,8 @@
 import java.util.HashSet;
 import java.util.Set;
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
 import sun.awt.*;
 import sun.awt.event.IgnorePaintEvent;
 import sun.awt.image.SunVolatileImage;
@@ -77,12 +78,12 @@
 public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer,
     BackBufferCapsProvider
 {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XComponentPeer");
-    private static final Logger buffersLog = Logger.getLogger("sun.awt.X11.XComponentPeer.multibuffer");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XComponentPeer");
-    private static final Logger fontLog = Logger.getLogger("sun.awt.X11.font.XComponentPeer");
-    private static final Logger enableLog = Logger.getLogger("sun.awt.X11.enable.XComponentPeer");
-    private static final Logger shapeLog = Logger.getLogger("sun.awt.X11.shape.XComponentPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XComponentPeer");
+    private static final PlatformLogger buffersLog = PlatformLogger.getLogger("sun.awt.X11.XComponentPeer.multibuffer");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XComponentPeer");
+    private static final PlatformLogger fontLog = PlatformLogger.getLogger("sun.awt.X11.font.XComponentPeer");
+    private static final PlatformLogger enableLog = PlatformLogger.getLogger("sun.awt.X11.enable.XComponentPeer");
+    private static final PlatformLogger shapeLog = PlatformLogger.getLogger("sun.awt.X11.shape.XComponentPeer");
 
     boolean paintPending = false;
     boolean isLayouting = false;
@@ -159,7 +160,7 @@
                 break;
             }
         }
-        enableLog.log(Level.FINE, "Initial enable state: {0}", new Object[] {Boolean.valueOf(enabled)});
+        enableLog.fine("Initial enable state: {0}", Boolean.valueOf(enabled));
 
         if (target.isVisible()) {
             setVisible(true);
@@ -253,7 +254,7 @@
      * Called when component receives focus
      */
     public void focusGained(FocusEvent e) {
-        focusLog.log(Level.FINE, "{0}", new Object[] {e});
+        focusLog.fine("{0}", e);
         bHasFocus = true;
     }
 
@@ -261,7 +262,7 @@
      * Called when component loses focus
      */
     public void focusLost(FocusEvent e) {
-        focusLog.log(Level.FINE, "{0}", new Object[] {e});
+        focusLog.fine("{0}", e);
         bHasFocus = false;
     }
 
@@ -333,7 +334,7 @@
           case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
               // Currently we just generate focus events like we deal with lightweight instead of calling
               // XSetInputFocus on native window
-              if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Proceeding with request to " +
+              if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Proceeding with request to " +
                   lightweightChild + " in " + target);
               /**
                * The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight
@@ -358,7 +359,7 @@
                */
               boolean res = wpeer.requestWindowFocus(null);
 
-              if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Requested window focus: " + res);
+              if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Requested window focus: " + res);
               // If parent window can be made focused and has been made focused(synchronously)
               // then we can proceed with children, otherwise we retreat.
               if (!(res && parentWindow.isFocused())) {
@@ -378,13 +379,13 @@
     }
 
     private boolean rejectFocusRequestHelper(String logMsg) {
-        if (focusLog.isLoggable(Level.FINER)) focusLog.finer(logMsg);
+        if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(logMsg);
         XKeyboardFocusManagerPeer.removeLastFocusRequest(target);
         return false;
     }
 
     void handleJavaFocusEvent(AWTEvent e) {
-        if (focusLog.isLoggable(Level.FINER)) focusLog.finer(e.toString());
+        if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(e.toString());
         if (e.getID() == FocusEvent.FOCUS_GAINED) {
             focusGained((FocusEvent)e);
         } else {
@@ -414,7 +415,7 @@
      * @see java.awt.peer.ComponentPeer
      */
     public void setEnabled(boolean value) {
-        enableLog.log(Level.FINE, "{0}ing {1}", new Object[] {(value?"Enabl":"Disabl"), this});
+        enableLog.fine("{0}ing {1}", (value?"Enabl":"Disabl"), this);
         boolean repaintNeeded = (enabled != value);
         enabled = value;
         if (target instanceof Container) {
@@ -690,7 +691,7 @@
     }
 
     public void setBackground(Color c) {
-        if (log.isLoggable(Level.FINE)) log.fine("Set background to " + c);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set background to " + c);
         synchronized (getStateLock()) {
             background = c;
         }
@@ -699,7 +700,7 @@
     }
 
     public void setForeground(Color c) {
-        if (log.isLoggable(Level.FINE)) log.fine("Set foreground to " + c);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set foreground to " + c);
         synchronized (getStateLock()) {
             foreground = c;
         }
@@ -718,7 +719,7 @@
      * @since     JDK1.0
      */
     public FontMetrics getFontMetrics(Font font) {
-        if (fontLog.isLoggable(Level.FINE)) fontLog.fine("Getting font metrics for " + font);
+        if (fontLog.isLoggable(PlatformLogger.FINE)) fontLog.fine("Getting font metrics for " + font);
         return sun.font.FontDesignMetrics.getMetrics(font);
     }
 
@@ -1188,7 +1189,7 @@
     public void createBuffers(int numBuffers, BufferCapabilities caps)
       throws AWTException
     {
-        if (buffersLog.isLoggable(Level.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
             buffersLog.fine("createBuffers(" + numBuffers + ", " + caps + ")");
         }
         // set the caps first, they're used when creating the bb
@@ -1206,7 +1207,7 @@
     public void flip(int x1, int y1, int x2, int y2,
                      BufferCapabilities.FlipContents flipAction)
     {
-        if (buffersLog.isLoggable(Level.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
             buffersLog.fine("flip(" + flipAction + ")");
         }
         if (backBuffer == 0) {
@@ -1217,7 +1218,7 @@
     }
 
     public Image getBackBuffer() {
-        if (buffersLog.isLoggable(Level.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
             buffersLog.fine("getBackBuffer()");
         }
         if (backBuffer == 0) {
@@ -1227,7 +1228,7 @@
     }
 
     public void destroyBuffers() {
-        if (buffersLog.isLoggable(Level.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
             buffersLog.fine("destroyBuffers()");
         }
         graphicsConfig.destroyBackBuffer(backBuffer);
@@ -1262,7 +1263,7 @@
      * ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify
      */
     protected boolean isEventDisabled(XEvent e) {
-        enableLog.log(Level.FINEST, "Component is {1}, checking for disabled event {0}", new Object[] {e, (isEnabled()?"enabled":"disable")});
+        enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable"));
         if (!isEnabled()) {
             switch (e.get_type()) {
               case XConstants.ButtonPress:
@@ -1272,7 +1273,7 @@
               case XConstants.EnterNotify:
               case XConstants.LeaveNotify:
               case XConstants.MotionNotify:
-                  enableLog.log(Level.FINER, "Event {0} is disable", new Object[] {e});
+                  enableLog.finer("Event {0} is disable", e);
                   return true;
             }
         }
@@ -1393,7 +1394,7 @@
      */
     public void applyShape(Region shape) {
         if (XlibUtil.isShapingSupported()) {
-            if (shapeLog.isLoggable(Level.FINER)) {
+            if (shapeLog.isLoggable(PlatformLogger.FINER)) {
                 shapeLog.finer(
                         "*** INFO: Setting shape: PEER: " + this
                         + "; WINDOW: " + getWindow()
@@ -1423,7 +1424,7 @@
                 XToolkit.awtUnlock();
             }
         } else {
-            if (shapeLog.isLoggable(Level.FINER)) {
+            if (shapeLog.isLoggable(PlatformLogger.FINER)) {
                 shapeLog.finer("*** WARNING: Shaping is NOT supported!");
             }
         }
--- a/jdk/src/solaris/classes/sun/awt/X11/XContentWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XContentWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,8 +30,7 @@
 
 import java.awt.event.ComponentEvent;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.ComponentAccessor;
 
@@ -44,7 +43,7 @@
  * decorated window.  So coordinates in it would be the same as java coordinates.
  */
 public final class XContentWindow extends XWindow {
-    private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XContentWindow");
+    private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XContentWindow");
 
     static XContentWindow createContent(XDecoratedPeer parentFrame) {
         final WindowDimensions dims = parentFrame.getDimensions();
@@ -116,8 +115,8 @@
             if (in != null) {
                 newBounds.setLocation(-in.left, -in.top);
             }
-            if (insLog.isLoggable(Level.FINE)) insLog.log(Level.FINE, "Setting content bounds {0}, old bounds {1}",
-                                                          new Object[] {newBounds, getBounds()});
+            if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting content bounds {0}, old bounds {1}",
+                                                                    newBounds, getBounds());
             // Fix for 5023533:
             // Change in the size of the content window means, well, change of the size
             // Change in the location of the content window means change in insets
--- a/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,17 +30,16 @@
 import java.awt.event.InvocationEvent;
 import java.awt.event.WindowEvent;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.ComponentAccessor;
 import sun.awt.SunToolkit;
 
 abstract class XDecoratedPeer extends XWindowPeer {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XDecoratedPeer");
-    private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XDecoratedPeer");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XDecoratedPeer");
-    private static final Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XDecoratedPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XDecoratedPeer");
+    private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XDecoratedPeer");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XDecoratedPeer");
+    private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XDecoratedPeer");
 
     // Set to true when we get the first ConfigureNotify after being
     // reparented - indicates that WM has adopted the top-level.
@@ -79,7 +78,7 @@
         Rectangle bounds = (Rectangle)params.get(BOUNDS);
         dimensions = new WindowDimensions(bounds, getRealInsets(), false);
         params.put(BOUNDS, dimensions.getClientRect());
-        insLog.log(Level.FINE, "Initial dimensions {0}", new Object[] { dimensions });
+        insLog.fine("Initial dimensions {0}", dimensions);
 
         // Deny default processing of these events on the shell - proxy will take care of
         // them instead
@@ -175,7 +174,7 @@
     }
 
     public void setTitle(String title) {
-        if (log.isLoggable(Level.FINE)) log.fine("Title is " + title);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Title is " + title);
         winAttr.title = title;
         updateWMName();
     }
@@ -265,7 +264,7 @@
             wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom);
         }
 
-        insLog.log(Level.FINER, "FRAME_EXTENTS: {0}", new Object[]{wm_set_insets});
+        insLog.finer("FRAME_EXTENTS: {0}", wm_set_insets);
 
         if (wm_set_insets != null) {
             wm_set_insets = copy(wm_set_insets);
@@ -292,7 +291,7 @@
 
     public void handleReparentNotifyEvent(XEvent xev) {
         XReparentEvent  xe = xev.get_xreparent();
-        if (insLog.isLoggable(Level.FINE)) insLog.fine(xe.toString());
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine(xe.toString());
         reparent_serial = xe.get_serial();
         XToolkit.awtLock();
         try {
@@ -331,7 +330,7 @@
                 // Check if we have insets provided by the WM
                 Insets correctWM = getWMSetInsets(null);
                 if (correctWM != null) {
-                    insLog.log(Level.FINER, "wm-provided insets {0}", new Object[]{correctWM});
+                    insLog.finer("wm-provided insets {0}", correctWM);
                     // If these insets are equal to our current insets - no actions are necessary
                     Insets dimInsets = dimensions.getInsets();
                     if (correctWM.equals(dimInsets)) {
@@ -345,9 +344,9 @@
                     correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent());
 
                     if (correctWM != null) {
-                        insLog.log(Level.FINER, "correctWM {0}", new Object[] {correctWM});
+                        insLog.finer("correctWM {0}", correctWM);
                     } else {
-                        insLog.log(Level.FINER, "correctWM insets are not available, waiting for configureNotify");
+                        insLog.finer("correctWM insets are not available, waiting for configureNotify");
                     }
                 }
 
@@ -368,7 +367,7 @@
              * initial insets were wrong (most likely they were).
              */
             Insets correction = difference(correctWM, currentInsets);
-            insLog.log(Level.FINEST, "Corrention {0}", new Object[] {correction});
+            insLog.finest("Corrention {0}", correction);
             if (!isNull(correction)) {
                 currentInsets = copy(correctWM);
                 applyGuessedInsets();
@@ -378,7 +377,7 @@
                 //update minimum size hints
                 updateMinSizeHints();
             }
-            if (insLog.isLoggable(Level.FINER)) insLog.finer("Dimensions before reparent: " + dimensions);
+            if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Dimensions before reparent: " + dimensions);
 
             dimensions.setInsets(getRealInsets());
             insets_corrected = true;
@@ -452,8 +451,8 @@
     public Insets getInsets() {
         Insets in = copy(getRealInsets());
         in.top += getMenuBarHeight();
-        if (insLog.isLoggable(Level.FINEST)) {
-            insLog.log(Level.FINEST, "Get insets returns {0}", new Object[] {in});
+        if (insLog.isLoggable(PlatformLogger.FINEST)) {
+            insLog.finest("Get insets returns {0}", in);
         }
         return in;
     }
@@ -482,7 +481,7 @@
     public void reshape(WindowDimensions newDimensions, int op,
                         boolean userReshape)
     {
-        if (insLog.isLoggable(Level.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.FINE)) {
             insLog.fine("Reshaping " + this + " to " + newDimensions + " op " + op + " user reshape " + userReshape);
         }
         if (userReshape) {
@@ -503,8 +502,8 @@
         XToolkit.awtLock();
         try {
             if (!isReparented() || !isVisible()) {
-                insLog.log(Level.FINE, "- not reparented({0}) or not visible({1}), default reshape",
-                           new Object[] {Boolean.valueOf(isReparented()), Boolean.valueOf(visible)});
+                insLog.fine("- not reparented({0}) or not visible({1}), default reshape",
+                           Boolean.valueOf(isReparented()), Boolean.valueOf(visible));
 
                 // Fix for 6323293.
                 // This actually is needed to preserve compatibility with previous releases -
@@ -609,8 +608,9 @@
               dims.setSize(width, height);
               break;
         }
-        if (insLog.isLoggable(Level.FINE)) insLog.log(Level.FINE, "For the operation {0} new dimensions are {1}",
-                                                      new Object[] {operationToString(operation), dims});
+        if (insLog.isLoggable(PlatformLogger.FINE))
+            insLog.fine("For the operation {0} new dimensions are {1}",
+                        operationToString(operation), dims);
 
         reshape(dims, operation, userReshape);
     }
@@ -640,7 +640,7 @@
     public void handleConfigureNotifyEvent(XEvent xev) {
         assert (SunToolkit.isAWTLockHeldByCurrentThread());
         XConfigureEvent xe = xev.get_xconfigure();
-        insLog.log(Level.FINE, "Configure notify {0}", new Object[] {xe});
+        insLog.fine("Configure notify {0}", xe);
 
         // XXX: should really only consider synthetic events, but
         if (isReparented()) {
@@ -677,9 +677,9 @@
          * it!!!! or we wind up in a bogus location.
          */
         int runningWM = XWM.getWMID();
-        if (insLog.isLoggable(Level.FINE)) {
-            insLog.log(Level.FINE, "reparented={0}, visible={1}, WM={2}, decorations={3}",
-                    new Object[] {isReparented(), isVisible(), runningWM, getDecorations()});
+        if (insLog.isLoggable(PlatformLogger.FINE)) {
+            insLog.fine("reparented={0}, visible={1}, WM={2}, decorations={3}",
+                        isReparented(), isVisible(), runningWM, getDecorations());
         }
         if (!isReparented() && isVisible() && runningWM != XWM.NO_WM
                 &&  !XWM.isNonReparentingWM()
@@ -691,7 +691,7 @@
         if (!insets_corrected && getDecorations() != XWindowAttributesData.AWT_DECOR_NONE) {
             long parent = XlibUtil.getParentWindow(window);
             Insets correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null;
-            if (insLog.isLoggable(Level.FINER)) {
+            if (insLog.isLoggable(PlatformLogger.FINER)) {
                 if (correctWM != null) {
                     insLog.finer("Configure notify - insets : " + correctWM);
                 } else {
@@ -732,7 +732,7 @@
                 case XWM.SAWFISH_WM:
                 {
                     Point xlocation = queryXLocation();
-                    if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "New X location: {0}", new Object[]{xlocation});
+                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("New X location: {0}", xlocation);
                     if (xlocation != null) {
                         newLocation = xlocation;
                     }
@@ -749,8 +749,8 @@
                 copy(currentInsets),
                 true);
 
-        insLog.log(Level.FINER, "Insets are {0}, new dimensions {1}",
-                new Object[] {currentInsets, newDimensions});
+        insLog.finer("Insets are {0}, new dimensions {1}",
+                     currentInsets, newDimensions);
 
         checkIfOnNewScreen(newDimensions.getBounds());
 
@@ -789,8 +789,8 @@
     }
 
     public void setShellBounds(Rectangle rec) {
-        if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell bounds on " +
-                                                       this + " to " + rec);
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell bounds on " +
+                                                                this + " to " + rec);
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);
@@ -802,8 +802,8 @@
         }
     }
     public void setShellSize(Rectangle rec) {
-        if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell size on " +
-                                                       this + " to " + rec);
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell size on " +
+                                                                this + " to " + rec);
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);
@@ -814,8 +814,8 @@
         }
     }
     public void setShellPosition(Rectangle rec) {
-        if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell position on " +
-                                                       this + " to " + rec);
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell position on " +
+                                                                this + " to " + rec);
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);
@@ -915,9 +915,9 @@
                 return toGlobal(0,0);
             } else {
                 Point location = target.getLocation();
-                if (insLog.isLoggable(Level.FINE))
-                    insLog.log(Level.FINE, "getLocationOnScreen {0} not reparented: {1} ",
-                               new Object[] {this, location});
+                if (insLog.isLoggable(PlatformLogger.FINE))
+                    insLog.fine("getLocationOnScreen {0} not reparented: {1} ",
+                                this, location);
                 return location;
             }
         } finally {
@@ -954,7 +954,7 @@
     }
 
     public void setVisible(boolean vis) {
-        log.log(Level.FINER, "Setting {0} to visible {1}", new Object[] {this, Boolean.valueOf(vis)});
+        log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
         if (vis && !isVisible()) {
             XWM.setShellDecor(this);
             super.setVisible(vis);
@@ -1005,7 +1005,7 @@
     }
 
     private void handleWmTakeFocus(XClientMessageEvent cl) {
-        focusLog.log(Level.FINE, "WM_TAKE_FOCUS on {0}", new Object[]{this});
+        focusLog.fine("WM_TAKE_FOCUS on {0}", this);
         requestWindowFocus(cl.get_data(1), true);
     }
 
@@ -1018,9 +1018,9 @@
         // by "proxy" - invisible mapped window. When we want to set X input focus to
         // toplevel set it on proxy instead.
         if (focusProxy == null) {
-            if (focusLog.isLoggable(Level.FINE)) focusLog.warning("Focus proxy is null for " + this);
+            if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.warning("Focus proxy is null for " + this);
         } else {
-            if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Requesting focus to proxy: " + focusProxy);
+            if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Requesting focus to proxy: " + focusProxy);
             if (timeProvided) {
                 focusProxy.xRequestFocus(time);
             } else {
@@ -1111,9 +1111,9 @@
         Window focusedWindow = XKeyboardFocusManagerPeer.getCurrentNativeFocusedWindow();
         Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow);
 
-        focusLog.log(Level.FINER, "Current window is: active={0}, focused={1}",
-                     new Object[]{ Boolean.valueOf(target == activeWindow),
-                                   Boolean.valueOf(target == focusedWindow)});
+        focusLog.finer("Current window is: active={0}, focused={1}",
+                       Boolean.valueOf(target == activeWindow),
+                       Boolean.valueOf(target == focusedWindow));
 
         XWindowPeer toFocus = this;
         while (toFocus.nextTransientFor != null) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java	Wed Jul 05 17:01:52 2017 +0200
@@ -32,7 +32,7 @@
 
 import java.util.Map;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.misc.Unsafe;
 
@@ -42,8 +42,8 @@
  * @since 1.5
  */
 class XDnDDragSourceProtocol extends XDragSourceProtocol {
-    private static final Logger logger =
-        Logger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDragSourceProtocol");
+    private static final PlatformLogger logger =
+        PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDragSourceProtocol");
 
     private static final Unsafe unsafe = XlibWrapper.unsafe;
 
@@ -395,7 +395,7 @@
                 return false;
             }
 
-            if (logger.isLoggable(Level.FINEST)) {
+            if (logger.isLoggable(PlatformLogger.FINEST)) {
                 logger.finest("        sourceWindow=" + sourceWindow +
                               " get_window=" + xclient.get_window() +
                               " xclient=" + xclient);
--- a/jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,7 @@
 
 import java.io.IOException;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.misc.Unsafe;
 
@@ -43,8 +43,8 @@
  * @since 1.5
  */
 class XDnDDropTargetProtocol extends XDropTargetProtocol {
-    private static final Logger logger =
-        Logger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDropTargetProtocol");
+    private static final PlatformLogger logger =
+        PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDropTargetProtocol");
 
     private static final Unsafe unsafe = XlibWrapper.unsafe;
 
@@ -999,7 +999,7 @@
             if (sourceFormats != null && sourceFormats.length > 3) {
                 data1 |= XDnDConstants.XDND_DATA_TYPES_BIT;
             }
-            if (logger.isLoggable(Level.FINEST)) {
+            if (logger.isLoggable(PlatformLogger.FINEST)) {
                 logger.finest("         "
                               + " entryVersion=" + version
                               + " sourceProtocolVersion=" +
@@ -1058,7 +1058,7 @@
 
     public boolean forwardEventToEmbedded(long embedded, long ctxt,
                                           int eventID) {
-        if (logger.isLoggable(Level.FINEST)) {
+        if (logger.isLoggable(PlatformLogger.FINEST)) {
             logger.finest("        ctxt=" + ctxt +
                           " type=" + (ctxt != 0 ?
                                       getMessageType(new
@@ -1086,7 +1086,7 @@
                 long data3 = Native.getLong(ctxt + size + 2 * Native.getLongSize());
                 long data4 = Native.getLong(ctxt + size + 3 * Native.getLongSize());
 
-                if (logger.isLoggable(Level.FINEST)) {
+                if (logger.isLoggable(PlatformLogger.FINEST)) {
                     logger.finest("         1 "
                                   + " embedded=" + embedded
                                   + " source=" + xclient.get_data(0)
@@ -1120,7 +1120,7 @@
 
                                 if (XToolkit.saved_error != null &&
                                     XToolkit.saved_error.get_error_code() != XConstants.Success) {
-                                    if (logger.isLoggable(Level.WARNING)) {
+                                    if (logger.isLoggable(PlatformLogger.WARNING)) {
                                         logger.warning("Cannot set XdndTypeList on the proxy window");
                                     }
                                 }
@@ -1128,7 +1128,7 @@
                                 XToolkit.awtUnlock();
                             }
                         } else {
-                            if (logger.isLoggable(Level.WARNING)) {
+                            if (logger.isLoggable(PlatformLogger.WARNING)) {
                                 logger.warning("Cannot read XdndTypeList from the source window");
                             }
                         }
@@ -1143,7 +1143,7 @@
                 overXEmbedClient = true;
             }
 
-            if (logger.isLoggable(Level.FINEST)) {
+            if (logger.isLoggable(PlatformLogger.FINEST)) {
                 logger.finest("         2 "
                               + " embedded=" + embedded
                               + " xclient=" + xclient);
--- a/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -37,7 +37,8 @@
 
 import java.util.*;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
 import sun.awt.ComponentAccessor;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
@@ -52,8 +53,8 @@
  */
 public final class XDragSourceContextPeer
     extends SunDragSourceContextPeer implements XDragSourceProtocolListener {
-    private static final Logger logger =
-        Logger.getLogger("sun.awt.X11.xembed.xdnd.XDragSourceContextPeer");
+    private static final PlatformLogger logger =
+        PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDragSourceContextPeer");
 
     /* The events selected on the root window when the drag begins. */
     private static final int ROOT_EVENT_MASK = (int)XConstants.ButtonMotionMask |
@@ -542,7 +543,7 @@
             return false;
         }
 
-        if (logger.isLoggable(Level.FINEST)) {
+        if (logger.isLoggable(PlatformLogger.FINEST)) {
             logger.finest("        proxyModeSourceWindow=" +
                           getProxyModeSourceWindow() +
                           " ev=" + ev);
--- a/jdk/src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,7 +31,8 @@
 import java.io.IOException;
 
 import java.util.Iterator;
-import java.util.logging.*;
+
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
@@ -48,8 +49,8 @@
  * @since 1.5
  */
 final class XDropTargetContextPeer extends SunDropTargetContextPeer {
-    private static final Logger logger =
-        Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetContextPeer");
+    private static final PlatformLogger logger =
+        PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetContextPeer");
 
     private static final Unsafe unsafe = XlibWrapper.unsafe;
 
@@ -198,7 +199,7 @@
                    structure. */
                 long ctxt = getNativeDragContext();
 
-                if (logger.isLoggable(Level.FINER)) {
+                if (logger.isLoggable(PlatformLogger.FINER)) {
                     logger.finer("        processing " + event + " ctxt=" + ctxt +
                                  " consumed=" + event.isConsumed());
                 }
--- a/jdk/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,7 +29,7 @@
 
 import java.util.HashMap;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /**
  * An abstract class for drop protocols on X11 systems.
@@ -38,8 +38,8 @@
  * @since 1.5
  */
 abstract class XDropTargetProtocol {
-    private static final Logger logger =
-        Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetProtocol");
+    private static final PlatformLogger logger =
+        PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetProtocol");
 
     private final XDropTargetProtocolListener listener;
 
@@ -116,16 +116,16 @@
                                                            XClientMessageEvent xclient) {
         EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel);
 
-        if (logger.isLoggable(Level.FINEST)) {
-            logger.log(Level.FINEST, "        entry={0}", new Object[] {entry});
+        if (logger.isLoggable(PlatformLogger.FINEST)) {
+            logger.finest("        entry={0}", entry);
         }
         // Window not registered as an embedder for this protocol.
         if (entry == null) {
             return false;
         }
 
-        if (logger.isLoggable(Level.FINEST)) {
-            logger.log(Level.FINEST, "        entry.isOverriden()={0}", new Object[] {entry.isOverriden()});
+        if (logger.isLoggable(PlatformLogger.FINEST)) {
+            logger.finest("        entry.isOverriden()={0}", entry.isOverriden());
         }
         // Window didn't have an associated drop site, so there is no need
         // to forward the message.
@@ -137,8 +137,8 @@
 
         long proxy = entry.getProxy();
 
-        if (logger.isLoggable(Level.FINEST)) {
-            logger.log(Level.FINEST, "        proxy={0} toplevel={1}", new Object[] {proxy, toplevel});
+        if (logger.isLoggable(PlatformLogger.FINEST)) {
+            logger.finest("        proxy={0} toplevel={1}", proxy, toplevel);
         }
         if (proxy == 0) {
             proxy = toplevel;
--- a/jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,7 +31,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import java.awt.Point;
 
@@ -42,8 +42,8 @@
  * @since 1.5
  */
 final class XDropTargetRegistry {
-    private static final Logger logger =
-        Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetRegistry");
+    private static final PlatformLogger logger =
+        PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetRegistry");
 
     private static final long DELAYED_REGISTRATION_PERIOD = 200;
 
@@ -614,7 +614,7 @@
         if (info != null &&
             info.getProtocolVersion() >= XDnDConstants.XDND_MIN_PROTOCOL_VERSION) {
 
-            if (logger.isLoggable(Level.FINE)) {
+            if (logger.isLoggable(PlatformLogger.FINE)) {
                 logger.fine("        XEmbed drop site will be registered for " + Long.toHexString(clientWindow));
             }
             registerEmbeddedDropSite(canvasWindow, clientWindow);
@@ -628,14 +628,14 @@
                 dropTargetProtocol.registerEmbeddedDropSite(clientWindow);
             }
 
-            if (logger.isLoggable(Level.FINE)) {
+            if (logger.isLoggable(PlatformLogger.FINE)) {
                 logger.fine("        XEmbed drop site has been registered for " + Long.toHexString(clientWindow));
             }
         }
     }
 
     public void unregisterXEmbedClient(long canvasWindow, long clientWindow) {
-        if (logger.isLoggable(Level.FINE)) {
+        if (logger.isLoggable(PlatformLogger.FINE)) {
             logger.fine("        XEmbed drop site will be unregistered for " + Long.toHexString(clientWindow));
         }
         Iterator dropTargetProtocols =
@@ -649,7 +649,7 @@
 
         unregisterEmbeddedDropSite(canvasWindow, clientWindow);
 
-        if (logger.isLoggable(Level.FINE)) {
+        if (logger.isLoggable(PlatformLogger.FINE)) {
             logger.fine("        XEmbed drop site has beed unregistered for " + Long.toHexString(clientWindow));
         }
     }
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -37,7 +37,7 @@
 import sun.awt.*;
 import sun.awt.motif.X11FontMetrics;
 import java.lang.reflect.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 import java.util.*;
 import static sun.awt.X11.XEmbedHelper.*;
 
@@ -45,7 +45,7 @@
 import sun.security.action.GetBooleanAction;
 
 public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener, KeyEventPostProcessor, ModalityListener, WindowIDProvider {
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedCanvasPeer");
+    private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedCanvasPeer");
 
     boolean applicationActive; // Whether the application is active(has focus)
     XEmbedServer xembed = new XEmbedServer(); // Helper object, contains XEmbed intrinsics
@@ -129,7 +129,7 @@
     }
 
     void initDispatching() {
-        if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
+        if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
         XToolkit.awtLock();
         try {
             XToolkit.addEventDispatcher(xembed.handle, xembed);
@@ -196,10 +196,10 @@
         switch (ev.get_type()) {
           case XConstants.CreateNotify:
               XCreateWindowEvent cr = ev.get_xcreatewindow();
-              if (xembedLog.isLoggable(Level.FINEST)) {
+              if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
                   xembedLog.finest("Message on embedder: " + cr);
               }
-              if (xembedLog.isLoggable(Level.FINER)) {
+              if (xembedLog.isLoggable(PlatformLogger.FINER)) {
                   xembedLog.finer("Create notify for parent " + Long.toHexString(cr.get_parent()) +
                                   ", window " + Long.toHexString(cr.get_window()));
               }
@@ -207,20 +207,20 @@
               break;
           case XConstants.DestroyNotify:
               XDestroyWindowEvent dn = ev.get_xdestroywindow();
-              if (xembedLog.isLoggable(Level.FINEST)) {
+              if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
                   xembedLog.finest("Message on embedder: " + dn);
               }
-              if (xembedLog.isLoggable(Level.FINER)) {
+              if (xembedLog.isLoggable(PlatformLogger.FINER)) {
                   xembedLog.finer("Destroy notify for parent: " + dn);
               }
               childDestroyed();
               break;
           case XConstants.ReparentNotify:
               XReparentEvent rep = ev.get_xreparent();
-              if (xembedLog.isLoggable(Level.FINEST)) {
+              if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
                   xembedLog.finest("Message on embedder: " + rep);
               }
-              if (xembedLog.isLoggable(Level.FINER)) {
+              if (xembedLog.isLoggable(PlatformLogger.FINER)) {
                   xembedLog.finer("Reparent notify for parent " + Long.toHexString(rep.get_parent()) +
                                   ", window " + Long.toHexString(rep.get_window()) +
                                   ", event " + Long.toHexString(rep.get_event()));
@@ -323,7 +323,7 @@
     }
 
     void childResized() {
-        if (xembedLog.isLoggable(Level.FINER)) {
+        if (xembedLog.isLoggable(PlatformLogger.FINER)) {
             Rectangle bounds = getClientBounds();
             xembedLog.finer("Child resized: " + bounds);
             // It is not required to update embedder's size when client size changes
@@ -388,7 +388,7 @@
     }
 
     void detachChild() {
-        if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
+        if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
         /**
          *  XEmbed specification:
          *  "The embedder can unmap the client and reparent the client window to the root window. If the
@@ -477,7 +477,7 @@
         try {
             XKeyEvent ke = new XKeyEvent(data);
             ke.set_window(xembed.handle);
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Forwarding native key event: " + ke);
+            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Forwarding native key event: " + ke);
             XToolkit.awtLock();
             try {
                 XlibWrapper.XSendEvent(XToolkit.getDisplay(), xembed.handle, false, XConstants.NoEventMask, data);
@@ -508,7 +508,7 @@
         postEvent(new InvocationEvent(target, new Runnable() {
                 public void run() {
                     GrabbedKey grab = new GrabbedKey(keysym, modifiers);
-                    if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Grabbing key: " + grab);
+                    if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Grabbing key: " + grab);
                     synchronized(GRAB_LOCK) {
                         grabbed_keys.add(grab);
                     }
@@ -520,7 +520,7 @@
         postEvent(new InvocationEvent(target, new Runnable() {
                 public void run() {
                     GrabbedKey grab = new GrabbedKey(keysym, modifiers);
-                    if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("UnGrabbing key: " + grab);
+                    if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("UnGrabbing key: " + grab);
                     synchronized(GRAB_LOCK) {
                         grabbed_keys.remove(grab);
                     }
@@ -533,7 +533,7 @@
                 public void run() {
                     AWTKeyStroke stroke = xembed.getKeyStrokeForKeySym(keysym, modifiers);
                     if (stroke != null) {
-                        if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
+                        if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
                         synchronized(ACCEL_LOCK) {
                             accelerators.put(accel_id, stroke);
                             accel_lookup.put(stroke, accel_id);
@@ -551,7 +551,7 @@
                     synchronized(ACCEL_LOCK) {
                         stroke = accelerators.get(accel_id);
                         if (stroke != null) {
-                            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id);
+                            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id);
                             accelerators.remove(accel_id);
                             accel_lookup.remove(stroke); // FIXME: How about several accelerators with the same stroke?
                         }
@@ -597,7 +597,7 @@
 
         boolean result = false;
 
-        if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Post-processing event " + e);
+        if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Post-processing event " + e);
 
         // Process ACCELERATORS
         AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e);
@@ -610,7 +610,7 @@
             }
         }
         if (exists) {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Activating accelerator " + accel_id);
+            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Activating accelerator " + accel_id);
             xembed.sendMessage(xembed.handle, XEMBED_ACTIVATE_ACCELERATOR, accel_id, 0, 0); // FIXME: How about overloaded?
             result = true;
         }
@@ -622,7 +622,7 @@
             exists = grabbed_keys.contains(key);
         }
         if (exists) {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Forwarding grabbed key " + e);
+            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Forwarding grabbed key " + e);
             forwardKeyEvent(e);
             result = true;
         }
@@ -641,9 +641,9 @@
     public void handleClientMessage(XEvent xev) {
         super.handleClientMessage(xev);
         XClientMessageEvent msg = xev.get_xclient();
-        if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Client message to embedder: " + msg);
+        if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Client message to embedder: " + msg);
         if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine(xembed.XEmbedMessageToString(msg));
+            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(xembed.XEmbedMessageToString(msg));
         }
         if (isXEmbedActive()) {
             switch ((int)msg.get_data(1)) {
@@ -709,7 +709,7 @@
     }
 
     public boolean processXEmbedDnDEvent(long ctxt, int eventID) {
-        if (xembedLog.isLoggable(Level.FINEST)) {
+        if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
             xembedLog.finest("     Drop target=" + target.getDropTarget());
         }
         if (target.getDropTarget() instanceof XEmbedDropTarget) {
@@ -744,7 +744,7 @@
                 boolean new_mapped = (flags & XEMBED_MAPPED) != 0;
                 boolean currently_mapped = XlibUtil.getWindowMapState(handle) != XConstants.IsUnmapped;
                 if (new_mapped != currently_mapped) {
-                    if (xembedLog.isLoggable(Level.FINER))
+                    if (xembedLog.isLoggable(PlatformLogger.FINER))
                         xembedLog.fine("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped);
                     if (new_mapped) {
                         XToolkit.awtLock();
@@ -773,7 +773,7 @@
         public void handlePropertyNotify(XEvent xev) {
             if (isXEmbedActive()) {
                 XPropertyEvent ev = xev.get_xproperty();
-                if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Property change on client: " + ev);
+                if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Property change on client: " + ev);
                 if (ev.get_atom() == XAtom.XA_WM_NORMAL_HINTS) {
                     childResized();
                 } else if (ev.get_atom() == XEmbedInfo.getAtom()) {
@@ -794,7 +794,7 @@
         void handleConfigureNotify(XEvent xev) {
             if (isXEmbedActive()) {
                 XConfigureEvent ev = xev.get_xconfigure();
-                if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Bounds change on client: " + ev);
+                if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Bounds change on client: " + ev);
                 if (xev.get_xany().get_window() == handle) {
                     childResized();
                 }
@@ -845,7 +845,7 @@
 
                 // We recognize only these masks
                 modifiers = ke.get_state() & (XConstants.ShiftMask | XConstants.ControlMask | XConstants.LockMask);
-                if (xembedLog.isLoggable(Level.FINEST)) xembedLog.finest("Mapped " + e + " to " + this);
+                if (xembedLog.isLoggable(PlatformLogger.FINEST)) xembedLog.finest("Mapped " + e + " to " + this);
             } finally {
                 XlibWrapper.unsafe.freeMemory(data);
             }
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java	Wed Jul 05 17:01:52 2017 +0200
@@ -26,10 +26,10 @@
 package sun.awt.X11;
 
 import java.awt.AWTKeyStroke;
-import java.util.logging.*;
 import sun.awt.SunToolkit;
 import java.awt.Component;
 import java.awt.Container;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.X11GraphicsConfig;
 import sun.awt.X11GraphicsDevice;
@@ -40,7 +40,7 @@
  * call install and forward all XClientMessageEvents to it.
  */
 public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher {
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper");
+    private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper");
 
     private XEmbeddedFramePeer embedded; // XEmbed client
     private long server; // XEmbed server
@@ -53,7 +53,7 @@
     }
 
     void setClient(XEmbeddedFramePeer client) {
-        if (xembedLog.isLoggable(Level.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
             xembedLog.fine("XEmbed client: " + client);
         }
         if (embedded != null) {
@@ -67,7 +67,7 @@
     }
 
     void install() {
-        if (xembedLog.isLoggable(Level.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
             xembedLog.fine("Installing xembedder on " + embedded);
         }
         long[] info = new long[] { XEMBED_VERSION, XEMBED_MAPPED };
@@ -95,9 +95,9 @@
 
     void handleClientMessage(XEvent xev) {
         XClientMessageEvent msg = xev.get_xclient();
-        if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine(msg.toString());
+        if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(msg.toString());
         if (msg.get_message_type() == XEmbed.getAtom()) {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
+            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
             switch ((int)msg.get_data(1)) {
               case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
                   active = true;
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedHelper.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedHelper.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,7 +27,8 @@
 
 import sun.misc.Unsafe;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
 import java.awt.AWTKeyStroke;
 import java.awt.event.InputEvent;
 
@@ -36,7 +37,7 @@
  * Contains constant definitions and helper routines.
  */
 public class XEmbedHelper {
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed");
+    private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed");
     final static Unsafe unsafe = Unsafe.getUnsafe();
 
     final static int XEMBED_VERSION = 0,
@@ -81,11 +82,11 @@
     XEmbedHelper() {
         if (XEmbed == null) {
             XEmbed = XAtom.get("_XEMBED");
-            if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Created atom " + XEmbed.toString());
+            if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbed.toString());
         }
         if (XEmbedInfo == null) {
             XEmbedInfo = XAtom.get("_XEMBED_INFO");
-            if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString());
+            if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString());
         }
     }
 
@@ -105,7 +106,7 @@
         msg.set_data(4, data2);
         XToolkit.awtLock();
         try {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Sending " + XEmbedMessageToString(msg));
+            if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Sending " + XEmbedMessageToString(msg));
             XlibWrapper.XSendEvent(XToolkit.getDisplay(), window, false, XConstants.NoEventMask, msg.pData);
         }
         finally {
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java	Wed Jul 05 17:01:52 2017 +0200
@@ -28,7 +28,7 @@
 //import static sun.awt.X11.XEmbed.*;
 import java.awt.*;
 import java.awt.event.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 import static sun.awt.X11.XConstants.*;
 import java.util.LinkedList;
 
@@ -37,7 +37,7 @@
  * specification and references.
  */
 public class XEmbedServerTester implements XEventDispatcher {
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedServerTester");
+    private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedServerTester");
     private final Object EVENT_LOCK = new Object();
     static final int SYSTEM_EVENT_MASK = 0x8000;
     int my_version, server_version;
@@ -544,7 +544,7 @@
             try {
                 EVENT_LOCK.wait(3000);
             } catch (InterruptedException ie) {
-                xembedLog.log(Level.WARNING, "Event wait interrupted", ie);
+                xembedLog.warning("Event wait interrupted", ie);
             }
             eventWaited = -1;
             if (checkEventList(position, event) == -1) {
@@ -634,7 +634,7 @@
         if (ev.get_type() == ClientMessage) {
             XClientMessageEvent msg = ev.get_xclient();
             if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
-                if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
+                if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
                 switch ((int)msg.get_data(1)) {
                   case XEmbedHelper.XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
                       xembedActive = true;
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,15 +30,14 @@
 import java.util.LinkedList;
 import java.util.Iterator;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.EmbeddedFrame;
 import sun.awt.SunToolkit;
 
 public class XEmbeddedFramePeer extends XFramePeer {
 
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbeddedFramePeer");
+    private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbeddedFramePeer");
 
     LinkedList<AWTKeyStroke> strokes;
 
@@ -138,7 +137,7 @@
     {
         assert (SunToolkit.isAWTLockHeldByCurrentThread());
         XConfigureEvent xe = xev.get_xconfigure();
-        if (xembedLog.isLoggable(Level.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
             xembedLog.fine(xe.toString());
         }
 
--- a/jdk/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -34,12 +34,12 @@
 import java.util.Arrays;
 import com.sun.java.swing.plaf.motif.*;
 import javax.swing.plaf.ComponentUI;
-import java.util.logging.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import sun.util.logging.PlatformLogger;
 
 class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XFileDialogPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFileDialogPeer");
 
     FileDialog  target;
 
--- a/jdk/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -26,7 +26,6 @@
 package sun.awt.X11;
 
 import java.awt.*;
-import java.util.logging.*;
 
 /**
  * This class represent focus holder window implementation. When toplevel requests or receives focus
@@ -34,7 +33,6 @@
  * and therefore X doesn't control focus after we have set it to proxy.
  */
 public class XFocusProxyWindow extends XBaseWindow {
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XFocusProxyWindow");
     XWindowPeer owner;
 
     public XFocusProxyWindow(XWindowPeer owner) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XFramePeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XFramePeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -34,14 +34,13 @@
 import java.awt.MenuBar;
 import java.awt.Rectangle;
 import java.awt.peer.FramePeer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 import sun.awt.AWTAccessor;
 
 class XFramePeer extends XDecoratedPeer implements FramePeer {
-    private static Logger log = Logger.getLogger("sun.awt.X11.XFramePeer");
-    private static Logger stateLog = Logger.getLogger("sun.awt.X11.states");
-    private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XFramePeer");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFramePeer");
+    private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states");
+    private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XFramePeer");
 
     XMenuBarPeer menubarPeer;
     MenuBar menubar;
@@ -76,10 +75,10 @@
         winAttr.isResizable = true; // target.isResizable();
         winAttr.title = target.getTitle();
         winAttr.initialResizability = target.isResizable();
-        if (log.isLoggable(Level.FINE)) {
-            log.log(Level.FINE, "Frame''s initial attributes: decor {0}, resizable {1}, undecorated {2}, initial state {3}",
-                     new Object[] {Integer.valueOf(winAttr.decorations), Boolean.valueOf(winAttr.initialResizability),
-                                   Boolean.valueOf(!winAttr.nativeDecor), Integer.valueOf(winAttr.initialState)});
+        if (log.isLoggable(PlatformLogger.FINE)) {
+            log.fine("Frame''s initial attributes: decor {0}, resizable {1}, undecorated {2}, initial state {3}",
+                     Integer.valueOf(winAttr.decorations), Boolean.valueOf(winAttr.initialResizability),
+                     Boolean.valueOf(!winAttr.nativeDecor), Integer.valueOf(winAttr.initialState));
         }
     }
 
@@ -208,7 +207,7 @@
     }
 
     public void setMaximizedBounds(Rectangle b) {
-        if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting maximized bounds to " + b);
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting maximized bounds to " + b);
         if (b == null) return;
         maxBounds = new Rectangle(b);
         XToolkit.awtLock();
@@ -225,7 +224,7 @@
             } else {
                 hints.set_max_height((int)XlibWrapper.DisplayHeight(XToolkit.getDisplay(), XlibWrapper.DefaultScreen(XToolkit.getDisplay())));
             }
-            if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
+            if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
             XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData);
         } finally {
             XToolkit.awtUnlock();
@@ -253,14 +252,14 @@
         int changed = state ^ newState;
         int changeIconic = changed & Frame.ICONIFIED;
         boolean iconic = (newState & Frame.ICONIFIED) != 0;
-        stateLog.log(Level.FINER, "Changing state, old state {0}, new state {1}(iconic {2})",
-                     new Object[] {Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic)});
+        stateLog.finer("Changing state, old state {0}, new state {1}(iconic {2})",
+                       Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic));
         if (changeIconic != 0 && iconic) {
-            if (stateLog.isLoggable(Level.FINER)) stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
+            if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
             XToolkit.awtLock();
             try {
                 int res = XlibWrapper.XIconifyWindow(XToolkit.getDisplay(), getShell(), getScreenNumber());
-                if (stateLog.isLoggable(Level.FINER)) stateLog.finer("XIconifyWindow returned " + res);
+                if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("XIconifyWindow returned " + res);
             }
             finally {
                 XToolkit.awtUnlock();
@@ -270,7 +269,7 @@
             setExtendedState(newState);
         }
         if (changeIconic != 0 && !iconic) {
-            if (stateLog.isLoggable(Level.FINER)) stateLog.finer("DeIconifying " + this);
+            if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("DeIconifying " + this);
             xSetVisible(true);
         }
     }
@@ -283,7 +282,7 @@
         super.handlePropertyNotify(xev);
         XPropertyEvent ev = xev.get_xproperty();
 
-        log.log(Level.FINER, "Property change {0}", new Object[] {ev});
+        log.finer("Property change {0}", ev);
         /*
          * Let's see if this is a window state protocol message, and
          * if it is - decode a new state in terms of java constants.
@@ -348,7 +347,7 @@
             XWMHints hints = getWMHints();
             hints.set_flags((int)XUtilConstants.StateHint | hints.get_flags());
             hints.set_initial_state(wm_state);
-            if (stateLog.isLoggable(Level.FINE)) stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
+            if (stateLog.isLoggable(PlatformLogger.FINE)) stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
             XlibWrapper.XSetWMHints(XToolkit.getDisplay(), getWindow(), hints.pData);
         }
         finally {
--- a/jdk/src/solaris/classes/sun/awt/X11/XIconWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XIconWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,10 +30,10 @@
 import sun.awt.image.ToolkitImage;
 import sun.awt.image.ImageRepresentation;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 public class XIconWindow extends XBaseWindow {
-    private final static Logger log = Logger.getLogger("sun.awt.X11.XIconWindow");
+    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
     XDecoratedPeer parent;
     Dimension size;
     long iconPixmap = 0;
@@ -61,7 +61,7 @@
             final long screen = adata.get_awt_visInfo().get_screen();
             final long display = XToolkit.getDisplay();
 
-            if (log.isLoggable(Level.FINEST)) log.finest(adata.toString());
+            if (log.isLoggable(PlatformLogger.FINEST)) log.finest(adata.toString());
 
             long status =
                 XlibWrapper.XGetIconSizes(display, XToolkit.getDefaultRootWindow(),
@@ -71,11 +71,11 @@
             }
             int count = Native.getInt(XlibWrapper.iarg1);
             long sizes_ptr = Native.getLong(XlibWrapper.larg1); // XIconSize*
-            log.log(Level.FINEST, "count = {1}, sizes_ptr = {0}", new Object[] {Long.valueOf(sizes_ptr), Integer.valueOf(count)});
+            log.finest("count = {1}, sizes_ptr = {0}", Long.valueOf(sizes_ptr), Integer.valueOf(count));
             XIconSize[] res = new XIconSize[count];
             for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) {
                 res[i] = new XIconSize(sizes_ptr);
-                log.log(Level.FINEST, "sizes_ptr[{1}] = {0}", new Object[] {res[i], Integer.valueOf(i)});
+                log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i));
             }
             return res;
         } finally {
@@ -87,12 +87,12 @@
         if (XWM.getWMID() == XWM.ICE_WM) {
             // ICE_WM has a bug - it only displays icons of the size
             // 16x16, while reporting 32x32 in its size list
-            log.log(Level.FINEST, "Returning ICE_WM icon size: 16x16");
+            log.finest("Returning ICE_WM icon size: 16x16");
             return new Dimension(16, 16);
         }
 
         XIconSize[] sizeList = getIconSizes();
-        log.log(Level.FINEST, "Icon sizes: {0}", new Object[] {sizeList});
+        log.finest("Icon sizes: {0}", sizeList);
         if (sizeList == null) {
             // No icon sizes so we simply fall back to 16x16
             return new Dimension(16, 16);
@@ -139,11 +139,11 @@
                 }
             }
         }
-        if (log.isLoggable(Level.FINEST)) {
+        if (log.isLoggable(PlatformLogger.FINEST)) {
             log.finest("found=" + found);
         }
         if (!found) {
-            if (log.isLoggable(Level.FINEST)) {
+            if (log.isLoggable(PlatformLogger.FINEST)) {
                 log.finest("widthHint=" + widthHint + ", heightHint=" + heightHint
                            + ", saveWidth=" + saveWidth + ", saveHeight=" + saveHeight
                            + ", max_width=" + sizeList[0].get_max_width()
@@ -159,7 +159,7 @@
                 /* determine which way to scale */
                 int wdiff = widthHint - sizeList[0].get_max_width();
                 int hdiff = heightHint - sizeList[0].get_max_height();
-                if (log.isLoggable(Level.FINEST)) {
+                if (log.isLoggable(PlatformLogger.FINEST)) {
                     log.finest("wdiff=" + wdiff + ", hdiff=" + hdiff);
                 }
                 if (wdiff >= hdiff) { /* need to scale width more  */
@@ -191,7 +191,7 @@
             XToolkit.awtUnlock();
         }
 
-        if (log.isLoggable(Level.FINEST)) {
+        if (log.isLoggable(PlatformLogger.FINEST)) {
             log.finest("return " + saveWidth + "x" + saveHeight);
         }
         return new Dimension(saveWidth, saveHeight);
@@ -418,7 +418,7 @@
             }
         }
         if (min != null) {
-            log.log(Level.FINER, "Icon: {0}x{1}", new Object[] { min.getWidth(null), min.getHeight(null)});
+            log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
             setIconImage(min);
         }
     }
@@ -444,7 +444,7 @@
             }
             Dimension iconSize = getIconSize(width, height);
             if (iconSize != null) {
-                log.log(Level.FINEST, "Icon size: {0}", iconSize);
+                log.finest("Icon size: {0}", iconSize);
                 iconWidth = iconSize.width;
                 iconHeight = iconSize.height;
             } else {
--- a/jdk/src/solaris/classes/sun/awt/X11/XInputMethod.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XInputMethod.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,7 @@
 import java.awt.peer.ComponentPeer;
 import sun.awt.X11InputMethod;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /**
  * Input Method Adapter for XIM (without Motif)
@@ -41,7 +41,7 @@
  * @author JavaSoft International
  */
 public class XInputMethod extends X11InputMethod {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XInputMethod");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XInputMethod");
 
     public XInputMethod() throws AWTException {
         super();
@@ -102,13 +102,13 @@
     protected ComponentPeer getPeer(Component client) {
         XComponentPeer peer;
 
-        if (log.isLoggable(Level.FINE)) log.fine("Client is " + client);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Client is " + client);
         peer = (XComponentPeer)XToolkit.targetToPeer(client);
         while (client != null && peer == null) {
             client = getParent(client);
             peer = (XComponentPeer)XToolkit.targetToPeer(client);
         }
-        log.log(Level.FINE, "Peer is {0}, client is {1}", new Object[] {peer, client});
+        log.fine("Peer is {0}, client is {1}", peer, client);
 
         if (peer != null)
             return peer;
--- a/jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -36,15 +36,14 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.CausedFocusEvent;
 import sun.awt.SunToolkit;
 import sun.awt.KeyboardFocusManagerPeerImpl;
 
 public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
 
     private static Object lock = new Object() {};
     private static Component currentFocusOwner;
@@ -82,7 +81,7 @@
     }
 
     public static void setCurrentNativeFocusedWindow(Window win) {
-        if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Setting current native focused window " + win);
+        if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Setting current native focused window " + win);
         XWindowPeer from = null, to = null;
 
         synchronized(lock) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XKeysym.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XKeysym.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,8 +29,7 @@
 import java.util.Hashtable;
 import sun.misc.Unsafe;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 public class XKeysym {
 
@@ -70,7 +69,7 @@
     static Hashtable<Integer, Long> javaKeycode2KeysymHash = new Hashtable<Integer, Long>();
     static long keysym_lowercase = unsafe.allocateMemory(Native.getLongSize());
     static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
-    private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XKeysym");
+    private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym");
     public static char convertKeysym( long ks, int state ) {
 
         /* First check for Latin-1 characters (1:1 mapping) */
--- a/jdk/src/solaris/classes/sun/awt/X11/XListPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XListPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -34,13 +34,13 @@
 import java.util.Vector;
 import java.awt.geom.*;
 import java.awt.image.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 // TODO: some input actions should do nothing if Shift or Control are down
 
 class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
 
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XListPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XListPeer");
 
     public final static int     MARGIN = 2;
     public final static int     SPACE = 1;
@@ -578,10 +578,10 @@
     }
 
     void mousePressed(MouseEvent mouseEvent) {
-        if (log.isLoggable(Level.FINER)) log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
         if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) {
             if (inWindow(mouseEvent.getX(), mouseEvent.getY())) {
-                if (log.isLoggable(Level.FINE)) log.fine("Mouse press in items area");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in items area");
                 active = WINDOW;
                 int i = y2index(mouseEvent.getY());
                 if (i >= 0) {
@@ -618,14 +618,14 @@
                     currentIndex = -1;
                 }
             } else if (inVerticalScrollbar(mouseEvent.getX(), mouseEvent.getY())) {
-                if (log.isLoggable(Level.FINE)) log.fine("Mouse press in vertical scrollbar");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in vertical scrollbar");
                 active = VERSCROLLBAR;
                 vsb.handleMouseEvent(mouseEvent.getID(),
                                      mouseEvent.getModifiers(),
                                      mouseEvent.getX() - (width - SCROLLBAR_WIDTH),
                                      mouseEvent.getY());
             } else if (inHorizontalScrollbar(mouseEvent.getX(), mouseEvent.getY())) {
-                if (log.isLoggable(Level.FINE)) log.fine("Mouse press in horizontal scrollbar");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in horizontal scrollbar");
                 active = HORSCROLLBAR;
                 hsb.handleMouseEvent(mouseEvent.getID(),
                                      mouseEvent.getModifiers(),
@@ -808,7 +808,7 @@
 
     void keyPressed(KeyEvent e) {
         int keyCode = e.getKeyCode();
-        if (log.isLoggable(Level.FINE)) log.fine(e.toString());
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine(e.toString());
         switch(keyCode) {
           case KeyEvent.VK_UP:
           case KeyEvent.VK_KP_UP: // TODO: I assume we also want this, too
@@ -993,7 +993,7 @@
      */
     public void notifyValue(XScrollbar obj, int type, int v, boolean isAdjusting) {
 
-        if (log.isLoggable(Level.FINE)) log.fine("Notify value changed on " + obj + " to " + v);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Notify value changed on " + obj + " to " + v);
         int value = obj.getValue();
         if (obj == vsb) {
             scrollVertical(v - value);
@@ -1076,7 +1076,7 @@
                 }
             }
         }
-        if (log.isLoggable(Level.FINER)) log.finer("Adding item '" + item + "' to " + addedIndex);
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer("Adding item '" + item + "' to " + addedIndex);
 
         // Update maxLength
         boolean repaintItems = !isItemHidden(addedIndex);
@@ -1094,7 +1094,7 @@
                 | ((vsb.needsRepaint())?(PAINT_VSCROLL):0);
 
         }
-        if (log.isLoggable(Level.FINEST)) log.finest("Last visible: " + getLastVisibleItem() +
+        if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Last visible: " + getLastVisibleItem() +
                                                      ", hsb changed : " + (hsbWasVis ^ hsbVis) + ", items changed " + repaintItems);
         repaint(addedIndex, getLastVisibleItem(), options);
     }
@@ -1110,9 +1110,9 @@
         boolean vsbWasVisible = vsbVis;
         int oldLastDisplayed = lastItemDisplayed();
 
-        if (log.isLoggable(Level.FINE)) log.fine("Deleting from " + s + " to " + e);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Deleting from " + s + " to " + e);
 
-        if (log.isLoggable(Level.FINEST)) log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() +
+        if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() +
                                                      ", size " + items.size());
 
         if (items.size() == 0) {
@@ -1180,7 +1180,7 @@
             options |= PAINT_FOCUS;
         }
 
-        if (log.isLoggable(Level.FINEST)) log.finest("Multiple selections: " + multipleSelections);
+        if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Multiple selections: " + multipleSelections);
 
         // update vsb.val
         if (vsb.getValue() >= s) {
@@ -1433,7 +1433,7 @@
      * y is the number of items to scroll
      */
     void scrollVertical(int y) {
-        if (log.isLoggable(Level.FINE)) log.fine("Scrolling vertically by " + y);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Scrolling vertically by " + y);
         int itemsInWin = itemsInWindow();
         int h = getItemHeight();
         int pixelsToScroll = y * h;
@@ -1473,7 +1473,7 @@
      * x is the number of pixels to scroll
      */
     void scrollHorizontal(int x) {
-        if (log.isLoggable(Level.FINE)) log.fine("Scrolling horizontally by " + y);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Scrolling horizontally by " + y);
         int w = getListWidth();
         w -= ((2 * SPACE) + (2 * MARGIN));
         int h = height - (SCROLLBAR_AREA + (2 * MARGIN));
@@ -1706,7 +1706,7 @@
             }
 
             if (localBuffer == null) {
-                if (log.isLoggable(Level.FINE)) log.fine("Creating buffer " + width + "x" + height);
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Creating buffer " + width + "x" + height);
                 // use GraphicsConfig.cCVI() instead of Component.cVI(),
                 // because the latter may cause a deadlock with the tree lock
                 localBuffer =
@@ -1743,7 +1743,7 @@
 
         private void paint(Graphics listG, int firstItem, int lastItem, int options,
                            Rectangle source, Point distance) {
-            if (log.isLoggable(Level.FINER)) log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options);
+            if (log.isLoggable(PlatformLogger.FINER)) log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options);
             if (firstItem > lastItem) {
                 int t = lastItem;
                 lastItem = firstItem;
@@ -1832,7 +1832,7 @@
         }
 
         private void paintItems(Graphics g, int firstItem, int lastItem, int options) {
-            if (log.isLoggable(Level.FINER)) log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem());
+            if (log.isLoggable(PlatformLogger.FINER)) log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem());
 
             firstItem = Math.max(getFirstVisibleItem(), firstItem);
             if (firstItem > lastItem) {
@@ -1843,7 +1843,7 @@
             firstItem = Math.max(getFirstVisibleItem(), firstItem);
             lastItem = Math.min(lastItem, items.size()-1);
 
-            if (log.isLoggable(Level.FINER)) log.finer("Actually painting items from " + firstItem + " to " + lastItem +
+            if (log.isLoggable(PlatformLogger.FINER)) log.finer("Actually painting items from " + firstItem + " to " + lastItem +
                                                        ", items in window " + itemsInWindow());
             for (int i = firstItem; i <= lastItem; i++) {
                 paintItem(g, i);
@@ -1851,7 +1851,7 @@
         }
 
         private void paintItem(Graphics g, int index) {
-            if (log.isLoggable(Level.FINEST)) log.finest("Painting item " + index);
+            if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting item " + index);
             // 4895367 - only paint items which are visible
             if (!isItemHidden(index)) {
                 Shape clip = g.getClip();
@@ -1859,18 +1859,18 @@
                 int h = getItemHeight();
                 int y = getItemY(index);
                 int x = getItemX();
-                if (log.isLoggable(Level.FINEST)) log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2)));
+                if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2)));
                 g.setClip(x, y, w - (SPACE*2), h-(SPACE*2));
 
                 // Always paint the background so that focus is unpainted in
                 // multiselect mode
                 if (isSelected(index)) {
-                    if (log.isLoggable(Level.FINEST)) log.finest("Painted item is selected");
+                    if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painted item is selected");
                     g.setColor(getListForeground());
                 } else {
                     g.setColor(getListBackground());
                 }
-                if (log.isLoggable(Level.FINEST)) log.finest("Filling " + new Rectangle(x, y, w, h));
+                if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Filling " + new Rectangle(x, y, w, h));
                 g.fillRect(x, y, w, h);
 
                 if (index <= getLastVisibleItem() && index < items.size()) {
@@ -1894,7 +1894,7 @@
         }
 
         void paintScrollBar(XScrollbar scr, Graphics g, int x, int y, int width, int height, boolean paintAll) {
-            if (log.isLoggable(Level.FINEST)) log.finest("Painting scrollbar " + scr + " width " +
+            if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting scrollbar " + scr + " width " +
                                                          width + " height " + height + ", paintAll " + paintAll);
             g.translate(x, y);
             scr.paint(g, getSystemColors(), paintAll);
@@ -1932,22 +1932,22 @@
             if (paintFocus && !hasFocus()) {
                 paintFocus = false;
             }
-            if (log.isLoggable(Level.FINE)) log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " +
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " +
                                                      (isItemHidden(getFocusIndex())?("invisible"):("visible")) + ", paint focus is " + paintFocus);
             Shape clip = g.getClip();
             g.setClip(0, 0, listWidth, listHeight);
-            if (log.isLoggable(Level.FINEST)) log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight));
+            if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight));
             Rectangle rect = getFocusRect();
             if (prevFocusRect != null) {
                 // Erase focus rect
-                if (log.isLoggable(Level.FINEST)) log.finest("Erasing previous focus rect " + prevFocusRect);
+                if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Erasing previous focus rect " + prevFocusRect);
                 g.setColor(getListBackground());
                 g.drawRect(prevFocusRect.x, prevFocusRect.y, prevFocusRect.width, prevFocusRect.height);
                 prevFocusRect = null;
             }
             if (paintFocus) {
                 // Paint new
-                if (log.isLoggable(Level.FINEST)) log.finest("Painting focus rect " + rect);
+                if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting focus rect " + rect);
                 g.setColor(getListForeground());  // Focus color is always black on Linux
                 g.drawRect(rect.x, rect.y, rect.width, rect.height);
                 prevFocusRect = rect;
--- a/jdk/src/solaris/classes/sun/awt/X11/XMSelection.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMSelection.java	Wed Jul 05 17:01:52 2017 +0200
@@ -32,8 +32,7 @@
 package sun.awt.X11;
 
 import java.util.*;
-import java.util.logging.*;
-
+import sun.util.logging.PlatformLogger;
 
 public class  XMSelection {
 
@@ -56,7 +55,7 @@
      */
 
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XMSelection");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMSelection");
     /* Name of the selection */
     String selectionName;
 
@@ -129,7 +128,7 @@
             long display = XToolkit.getDisplay();
             synchronized(this) {
                 setOwner(owner, screen);
-                if (log.isLoggable(Level.FINE)) log.fine("New Selection Owner for screen " + screen + " = " + owner );
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("New Selection Owner for screen " + screen + " = " + owner );
                 XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | eventMask);
                 XToolkit.addEventDispatcher(owner,
                         new XEventDispatcher() {
@@ -149,19 +148,19 @@
         try {
             try {
                 long display = XToolkit.getDisplay();
-                if (log.isLoggable(Level.FINE)) log.fine("Grabbing XServer");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Grabbing XServer");
                 XlibWrapper.XGrabServer(display);
 
                 synchronized(this) {
                     String selection_name = getName()+"_S"+screen;
-                    if (log.isLoggable(Level.FINE)) log.fine("Screen = " + screen + " selection name = " + selection_name);
+                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("Screen = " + screen + " selection name = " + selection_name);
                     XAtom atom = XAtom.get(selection_name);
                     selectionMap.put(Long.valueOf(atom.getAtom()),this); // add mapping from atom to the instance of XMSelection
                     setAtom(atom,screen);
                     long owner = XlibWrapper.XGetSelectionOwner(display, atom.getAtom());
                     if (owner != 0) {
                         setOwner(owner, screen);
-                        if (log.isLoggable(Level.FINE)) log.fine("Selection Owner for screen " + screen + " = " + owner );
+                        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Selection Owner for screen " + screen + " = " + owner );
                         XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | extra_mask);
                         XToolkit.addEventDispatcher(owner,
                                 new XEventDispatcher() {
@@ -176,7 +175,7 @@
                 e.printStackTrace();
             }
             finally {
-                if (log.isLoggable(Level.FINE)) log.fine("UnGrabbing XServer");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("UnGrabbing XServer");
                 XlibWrapper.XUngrabServer(XToolkit.getDisplay());
             }
         } finally {
@@ -188,7 +187,7 @@
     static boolean processClientMessage(XEvent xev, int screen) {
         XClientMessageEvent xce = xev.get_xclient();
         if (xce.get_message_type() == XA_MANAGER.getAtom()) {
-            if (log.isLoggable(Level.FINE)) log.fine("client messags = " + xce);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("client messags = " + xce);
             long timestamp = xce.get_data(0);
             long atom = xce.get_data(1);
             long owner = xce.get_data(2);
@@ -295,7 +294,7 @@
 
 
     synchronized void dispatchSelectionChanged( XPropertyEvent ev, int screen) {
-        if (log.isLoggable(Level.FINE)) log.fine("Selection Changed : Screen = " + screen + "Event =" + ev);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Selection Changed : Screen = " + screen + "Event =" + ev);
         if (listeners != null) {
             Iterator iter = listeners.iterator();
             while (iter.hasNext()) {
@@ -306,7 +305,7 @@
     }
 
     synchronized void dispatchOwnerDeath(XDestroyWindowEvent de, int screen) {
-        if (log.isLoggable(Level.FINE)) log.fine("Owner dead : Screen = " + screen + "Event =" + de);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Owner dead : Screen = " + screen + "Event =" + de);
         if (listeners != null) {
             Iterator iter = listeners.iterator();
             while (iter.hasNext()) {
@@ -318,7 +317,7 @@
     }
 
     void dispatchSelectionEvent(XEvent xev, int screen) {
-        if (log.isLoggable(Level.FINE)) log.fine("Event =" + xev);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Event =" + xev);
         if (xev.get_type() == XConstants.DestroyNotify) {
             XDestroyWindowEvent de = xev.get_xdestroywindow();
             dispatchOwnerDeath( de, screen);
--- a/jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,7 +30,7 @@
 
 import java.lang.reflect.Field;
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 import sun.awt.SunToolkit;
 
 public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
@@ -41,7 +41,7 @@
      *
      ************************************************/
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XMenuBarPeer");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuBarPeer");
 
     /*
      * Primary members
@@ -533,7 +533,7 @@
      */
     public void handleKeyPress(XEvent xev) {
         XKeyEvent xkey = xev.get_xkey();
-        if (log.isLoggable(Level.FINE)) log.fine(xkey.toString());
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine(xkey.toString());
         if (isEventDisabled(xev)) {
             return;
         }
--- a/jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -28,8 +28,6 @@
 import java.awt.peer.*;
 import java.awt.event.*;
 
-import java.util.logging.*;
-
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
@@ -43,8 +41,6 @@
      *
      ************************************************/
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XMenuItemPeer");
-
     /*
      * Primary members
      */
--- a/jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,7 +29,7 @@
 
 import java.lang.reflect.Field;
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 import sun.awt.SunToolkit;
 
 public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
@@ -39,7 +39,7 @@
      * Data members
      *
      ************************************************/
-    private static Logger log = Logger.getLogger("sun.awt.X11.XMenuPeer");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuPeer");
 
     /**
      * Window that correspond to this menu
@@ -122,7 +122,7 @@
      * for adding separators
      */
     public void addSeparator() {
-        if (log.isLoggable(Level.FINER)) log.finer("addSeparator is not implemented");
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer("addSeparator is not implemented");
     }
 
     public void addItem(MenuItem item) {
@@ -130,7 +130,7 @@
         if (menuWindow != null) {
             menuWindow.addItem(item);
         } else {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("Attempt to use XMenuWindowPeer without window");
             }
         }
@@ -141,7 +141,7 @@
         if (menuWindow != null) {
             menuWindow.delItem(index);
         } else {
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 log.fine("Attempt to use XMenuWindowPeer without window");
             }
         }
--- a/jdk/src/solaris/classes/sun/awt/X11/XMenuWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -32,7 +32,7 @@
 import java.awt.geom.Point2D;
 
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 public class XMenuWindow extends XBaseMenuWindow {
 
@@ -42,7 +42,7 @@
      *
      ************************************************/
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XMenuWindow");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuWindow");
 
     /*
      * Primary members
@@ -399,7 +399,7 @@
         if (!isCreated()) {
             return;
         }
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
             log.finer("showing menu window + " + getWindow() + " at " + bounds);
         }
         XToolkit.awtLock();
--- a/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,14 +27,13 @@
 package sun.awt.X11;
 
 import java.awt.Frame;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol
 {
-    private final static Logger log = Logger.getLogger("sun.awt.X11.XNETProtocol");
-    private final static Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XNETProtocol");
-    private static Logger stateLog = Logger.getLogger("sun.awt.X11.states.XNETProtocol");
+    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
+    private final static PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
+    private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XNETProtocol");
 
     /**
      * XStateProtocol
@@ -44,7 +43,7 @@
     }
 
     public void setState(XWindowPeer window, int state) {
-        if (log.isLoggable(Level.FINE)) log.fine("Setting state of " + window + " to " + state);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting state of " + window + " to " + state);
         if (window.isShowing()) {
             requestState(window, state);
         } else {
@@ -54,7 +53,7 @@
 
     private void setInitialState(XWindowPeer window, int state) {
         XAtomList old_state = window.getNETWMState();
-        log.log(Level.FINE, "Current state of the window {0} is {1}", new Object[] {window, old_state});
+        log.fine("Current state of the window {0} is {1}", window, old_state);
         if ((state & Frame.MAXIMIZED_VERT) != 0) {
             old_state.add(XA_NET_WM_STATE_MAXIMIZED_VERT);
         } else {
@@ -65,7 +64,7 @@
         } else {
             old_state.remove(XA_NET_WM_STATE_MAXIMIZED_HORZ);
         }
-        log.log(Level.FINE, "Setting initial state of the window {0} to {1}", new Object[] {window, old_state});
+        log.fine("Setting initial state of the window {0} to {1}", window, old_state);
         window.setNETWMState(old_state);
     }
 
@@ -98,7 +97,7 @@
               default:
                   return;
             }
-            if (log.isLoggable(Level.FINE)) log.fine("Requesting state on " + window + " for " + state);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("Requesting state on " + window + " for " + state);
             req.set_type((int)XConstants.ClientMessage);
             req.set_window(window.getWindow());
             req.set_message_type(XA_NET_WM_STATE.getAtom());
@@ -180,7 +179,7 @@
             req.set_data(1, state.getAtom());
             // Fix for 6735584: req.data[2] must be set to 0 when only one property is changed
             req.set_data(2, 0);
-            log.log(Level.FINE, "Setting _NET_STATE atom {0} on {1} for {2}", new Object[] {state, window, Boolean.valueOf(isAdd)});
+            log.fine("Setting _NET_STATE atom {0} on {1} for {2}", state, window, Boolean.valueOf(isAdd));
             XToolkit.awtLock();
             try {
                 XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -205,20 +204,20 @@
      * @param reset Indicates operation, 'set' if false, 'reset' if true
      */
     private void setStateHelper(XWindowPeer window, XAtom state, boolean set) {
-        log.log(Level.FINER, "Window visibility is: withdrawn={0}, visible={1}, mapped={2} showing={3}",
-                new Object[] {Boolean.valueOf(window.isWithdrawn()), Boolean.valueOf(window.isVisible()),
-                              Boolean.valueOf(window.isMapped()), Boolean.valueOf(window.isShowing())});
+        log.finer("Window visibility is: withdrawn={0}, visible={1}, mapped={2} showing={3}",
+                  Boolean.valueOf(window.isWithdrawn()), Boolean.valueOf(window.isVisible()),
+                  Boolean.valueOf(window.isMapped()), Boolean.valueOf(window.isShowing()));
         if (window.isShowing()) {
             requestState(window, state, set);
         } else {
             XAtomList net_wm_state = window.getNETWMState();
-            log.log(Level.FINE, "Current state on {0} is {1}", new Object[] {window, net_wm_state});
+            log.finer("Current state on {0} is {1}", window, net_wm_state);
             if (!set) {
                 net_wm_state.remove(state);
             } else {
                 net_wm_state.add(state);
             }
-            log.log(Level.FINE, "Setting states on {0} to {1}", new Object[] {window, net_wm_state});
+            log.fine("Setting states on {0} to {1}", window, net_wm_state);
             window.setNETWMState(net_wm_state);
         }
         XToolkit.XSync();
@@ -272,7 +271,7 @@
         }
         NetWindow = checkAnchor(XA_NET_SUPPORTING_WM_CHECK, XAtom.XA_WINDOW);
         supportChecked = true;
-        if (log.isLoggable(Level.FINE)) log.fine("### " + this + " is active: " + (NetWindow != 0));
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " is active: " + (NetWindow != 0));
     }
 
     boolean active() {
@@ -309,7 +308,7 @@
         if (net_wm_name_string == null) {
             return false;
         }
-        if (log.isLoggable(Level.FINE)) log.fine("### WM_NAME = " + net_wm_name_string);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### WM_NAME = " + net_wm_name_string);
         return net_wm_name_string.startsWith(name);
     }
 
--- a/jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -33,7 +33,7 @@
 import java.lang.reflect.InvocationTargetException;
 
 import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.SunToolkit;
 
@@ -44,7 +44,7 @@
      * Data members
      *
      ************************************************/
-    private static Logger log = Logger.getLogger("sun.awt.X11.XBaseMenuWindow");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseMenuWindow");
 
     /*
      * Primary members
@@ -146,7 +146,7 @@
      * for adding separators
      */
     public void addSeparator() {
-        if (log.isLoggable(Level.FINER)) log.finer("addSeparator is not implemented");
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer("addSeparator is not implemented");
     }
 
     /*
@@ -382,7 +382,7 @@
      */
     public void handleKeyPress(XEvent xev) {
         XKeyEvent xkey = xev.get_xkey();
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(xkey.toString());
         }
         if (isEventDisabled(xev)) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XProtocol.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XProtocol.java	Wed Jul 05 17:01:52 2017 +0200
@@ -25,12 +25,12 @@
 
 package sun.awt.X11;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import java.util.*;
 
 class XProtocol {
-    private final static Logger log = Logger.getLogger("sun.awt.X11.XProtocol");
+    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XProtocol");
 
     private Map<XAtom, XAtomList> atomToList = new HashMap<XAtom, XAtomList>();
     private Map<XAtom, Long> atomToAnchor = new HashMap<XAtom, Long>();
@@ -54,7 +54,7 @@
         } finally {
             if (firstCheck) {
                 firstCheck = false;
-                log.log(Level.FINE, "{0}:{1} supports {2}", new Object[] {this, listName, protocols});
+                log.fine("{0}:{1} supports {2}", this, listName, protocols);
             }
         }
     }
--- a/jdk/src/solaris/classes/sun/awt/X11/XQueryTree.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XQueryTree.java	Wed Jul 05 17:01:52 2017 +0200
@@ -28,11 +28,9 @@
 package sun.awt.X11;
 
 import sun.misc.Unsafe;
-import java.util.logging.*;
 
 public class XQueryTree {
         private static Unsafe unsafe = XlibWrapper.unsafe;
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XQueryTree");
         private boolean __executed = false;
         long _w;
         long root_ptr = unsafe.allocateMemory(Native.getLongSize());
--- a/jdk/src/solaris/classes/sun/awt/X11/XScrollbar.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XScrollbar.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,14 +30,14 @@
 import java.awt.image.BufferedImage;
 import sun.awt.SunToolkit;
 import sun.awt.X11GraphicsConfig;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 /**
 * A simple vertical scroll bar.
 */
 abstract class XScrollbar {
 
-    private static Logger log = Logger.getLogger("sun.awt.X11.XScrollbar");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbar");
     /**
      * The thread that asynchronously tells the scrollbar to scroll.
      * @see #startScrolling
@@ -118,7 +118,7 @@
     abstract protected void rebuildArrows();
 
     public void setSize(int width, int height) {
-        if (log.isLoggable(Level.FINER)) log.finer("Setting scroll bar " + this + " size to " + width + "x" + height);
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer("Setting scroll bar " + this + " size to " + width + "x" + height);
         this.width = width;
         this.height = height;
     }
@@ -164,7 +164,7 @@
      * @param paintAll paint the whole scrollbar if true, just the thumb is false
      */
     void paint(Graphics g, Color colors[], boolean paintAll) {
-        if (log.isLoggable(Level.FINER)) log.finer("Painting scrollbar " + this);
+        if (log.isLoggable(PlatformLogger.FINER)) log.finer("Painting scrollbar " + this);
 
         boolean useBufferedImage = false;
         Graphics2D g2 = null;
@@ -454,7 +454,7 @@
             return;
         }
 
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
              String type;
              switch (id) {
                 case MouseEvent.MOUSE_PRESSED:
--- a/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -28,10 +28,10 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.peer.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbarClient {
-    private final static Logger log = Logger.getLogger("sun.awt.X11.XScrollbarPeer");
+    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbarPeer");
 
     private static final int DEFAULT_LENGTH = 50;
     private static final int DEFAULT_WIDTH_SOLARIS = 19;
@@ -162,7 +162,7 @@
 
     public void handleJavaKeyEvent(KeyEvent event) {
         super.handleJavaKeyEvent(event);
-        if (log.isLoggable(Level.FINEST)) log.finer("KeyEvent on scrollbar: " + event);
+        if (log.isLoggable(PlatformLogger.FINEST)) log.finer("KeyEvent on scrollbar: " + event);
         if (!(event.isConsumed()) && event.getID() == KeyEvent.KEY_RELEASED) {
             switch(event.getKeyCode()) {
             case KeyEvent.VK_UP:
--- a/jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,14 +27,14 @@
 
 import java.awt.*;
 import java.awt.peer.SystemTrayPeer;
-import java.util.logging.Logger;
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
 import sun.awt.SunToolkit;
 import sun.awt.AppContext;
+import sun.util.logging.PlatformLogger;
 
 public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XSystemTrayPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XSystemTrayPeer");
 
     SystemTray target;
     static XSystemTrayPeer peerInstance; // there is only one SystemTray peer per application
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -52,12 +52,13 @@
 import com.sun.java.swing.plaf.motif.*;
 import java.awt.im.InputMethodRequests;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
 import sun.awt.CausedFocusEvent;
 import sun.awt.ComponentAccessor;
 
 public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XTextField");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XTextField");
 
     String text;
     XAWTTextField xtext;
@@ -256,7 +257,7 @@
     }
 
     public void setBackground(Color c) {
-        if (log.isLoggable(Level.FINE)) log.fine("target="+ target + ", old=" + background + ", new=" + c);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("target="+ target + ", old=" + background + ", new=" + c);
         background = c;
         if (xtext != null) {
             xtext.setBackground(c);
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Wed Jul 05 17:01:52 2017 +0200
@@ -46,22 +46,22 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import javax.swing.LookAndFeel;
 import javax.swing.UIDefaults;
 import sun.awt.*;
+import sun.font.FontConfigManager;
 import sun.font.FontManager;
 import sun.misc.PerformanceLogger;
 import sun.print.PrintJob2D;
 import sun.security.action.GetBooleanAction;
+import sun.util.logging.PlatformLogger;
 
 public final class XToolkit extends UNIXToolkit implements Runnable {
-    private static Logger log = Logger.getLogger("sun.awt.X11.XToolkit");
-    private static Logger eventLog = Logger.getLogger("sun.awt.X11.event.XToolkit");
-    private static final Logger timeoutTaskLog = Logger.getLogger("sun.awt.X11.timeoutTask.XToolkit");
-    private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XToolkit");
-    private static final Logger backingStoreLog = Logger.getLogger("sun.awt.X11.backingStore.XToolkit");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XToolkit");
+    private static final PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XToolkit");
+    private static final PlatformLogger timeoutTaskLog = PlatformLogger.getLogger("sun.awt.X11.timeoutTask.XToolkit");
+    private static final PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XToolkit");
+    private static final PlatformLogger backingStoreLog = PlatformLogger.getLogger("sun.awt.X11.backingStore.XToolkit");
 
     //There is 400 ms is set by default on Windows and 500 by default on KDE and GNOME.
     //We use the same hardcoded constant.
@@ -95,6 +95,8 @@
      */
     private XSettings xs;
 
+    private FontConfigManager fcManager = new FontConfigManager();
+
     static int arrowCursor;
     static TreeMap winMap = new TreeMap();
     static HashMap specialPeerMap = new HashMap();
@@ -178,13 +180,13 @@
             // Default XErrorHandler may just terminate the process. Don't call it.
             // return XlibWrapper.CallErrorHandler(saved_error_handler, display, error.pData);
         }
-        if (log.isLoggable(Level.FINE)) {
-            log.log(Level.FINE, "Unhandled XErrorEvent: " +
-                    "id=" + error.get_resourceid() + ", " +
-                    "serial=" + error.get_serial() + ", " +
-                    "ec=" + error.get_error_code() + ", " +
-                    "rc=" + error.get_request_code() + ", " +
-                    "mc=" + error.get_minor_code());
+        if (log.isLoggable(PlatformLogger.FINE)) {
+            log.fine("Unhandled XErrorEvent: " +
+                     "id=" + error.get_resourceid() + ", " +
+                     "serial=" + error.get_serial() + ", " +
+                     "ec=" + error.get_error_code() + ", " +
+                     "rc=" + error.get_request_code() + ", " +
+                     "mc=" + error.get_minor_code());
         }
         return 0;
     }
@@ -203,7 +205,7 @@
                 return SAVED_ERROR_HANDLER(display, event);
             }
         } catch (Throwable z) {
-            log.log(Level.FINE, "Error in GlobalErrorHandler", z);
+            log.fine("Error in GlobalErrorHandler", z);
         }
         return 0;
     }
@@ -321,16 +323,9 @@
                     ((XAWTXSettings)xs).dispose();
                 }
                 freeXKB();
-                if (log.isLoggable(Level.FINE)) {
+                if (log.isLoggable(PlatformLogger.FINE)) {
                     dumpPeers();
                 }
-
-                awtLock();
-                try {
-                    XlibWrapper.XSetErrorHandler(saved_error_handler);
-                } finally {
-                    awtUnlock();
-                }
             }
         });
     }
@@ -564,8 +559,8 @@
     }
 
     static void processException(Throwable thr) {
-        if (log.isLoggable(Level.WARNING)) {
-            log.log(Level.WARNING, "Exception on Toolkit thread", thr);
+        if (log.isLoggable(PlatformLogger.WARNING)) {
+            log.warning("Exception on Toolkit thread", thr);
         }
     }
 
@@ -626,8 +621,8 @@
                     continue;
                 }
 
-                if (eventLog.isLoggable(Level.FINER)) {
-                    eventLog.log(Level.FINER, "{0}", ev);
+                if (eventLog.isLoggable(PlatformLogger.FINER)) {
+                    eventLog.finer("{0}", ev);
                 }
 
                 // Check if input method consumes the event
@@ -642,13 +637,13 @@
                         }
                     }
                 }
-                if( keyEventLog.isLoggable(Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
+                if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
                     keyEventLog.fine("before XFilterEvent:"+ev);
                 }
                 if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
                     continue;
                 }
-                if( keyEventLog.isLoggable(Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
+                if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
                     keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT?
                 }
 
@@ -1335,7 +1330,7 @@
     }
 
     static void dumpPeers() {
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine("Mapped windows:");
             Iterator iter = winMap.entrySet().iterator();
             while (iter.hasNext()) {
@@ -1431,7 +1426,7 @@
                 }
             } catch (InterruptedException ie) {
             // Note: the returned timeStamp can be incorrect in this case.
-                if (log.isLoggable(Level.FINE)) log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
             }
         } finally {
             awtUnlock();
@@ -1530,7 +1525,7 @@
                  */
                 if (desktopProperties.get(SunToolkit.DESKTOPFONTHINTS) == null) {
                     if (XWM.isKDE2()) {
-                        Object hint = FontManager.getFontConfigAAHint();
+                        Object hint = fcManager.getFontConfigAAHint();
                         if (hint != null) {
                             /* set the fontconfig/KDE property so that
                              * getDesktopHints() below will see it
@@ -1764,7 +1759,7 @@
         } finally {
             awtUnlock();
         }
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine("metaMask = " + metaMask);
             log.fine("altMask = " + altMask);
             log.fine("numLockMask = " + numLockMask);
@@ -1786,11 +1781,11 @@
         }
         awtLock();
         try {
-            if (timeoutTaskLog.isLoggable(Level.FINER)) {
+            if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
                 timeoutTaskLog.finer("Removing task " + task);
             }
             if (timeoutTasks == null) {
-                if (timeoutTaskLog.isLoggable(Level.FINER)) {
+                if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
                     timeoutTaskLog.finer("Task is not scheduled");
                 }
                 return;
@@ -1837,11 +1832,11 @@
 
         awtLock();
         try {
-            if (timeoutTaskLog.isLoggable(Level.FINER)) {
-                timeoutTaskLog.log(Level.FINER, "XToolkit.schedule(): current time={0}" +
-                                   ";  interval={1}" +
-                                   ";  task being added={2}" + ";  tasks before addition={3}", new Object[] {
-                                   Long.valueOf(System.currentTimeMillis()), Long.valueOf(interval), task, timeoutTasks});
+            if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+                timeoutTaskLog.finer("XToolkit.schedule(): current time={0}" +
+                                     ";  interval={1}" +
+                                     ";  task being added={2}" + ";  tasks before addition={3}",
+                                     Long.valueOf(System.currentTimeMillis()), Long.valueOf(interval), task, timeoutTasks);
             }
 
             if (timeoutTasks == null) {
@@ -1884,9 +1879,9 @@
      * Called from run() under awtLock.
      */
     private static void callTimeoutTasks() {
-        if (timeoutTaskLog.isLoggable(Level.FINER)) {
-            timeoutTaskLog.log(Level.FINER, "XToolkit.callTimeoutTasks(): current time={0}" +
-                               ";  tasks={1}",  new Object[] {Long.valueOf(System.currentTimeMillis()), timeoutTasks});
+        if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+            timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
+                                 ";  tasks={1}", Long.valueOf(System.currentTimeMillis()), timeoutTasks);
         }
 
         if (timeoutTasks == null || timeoutTasks.isEmpty()) {
@@ -1902,9 +1897,9 @@
             for (Iterator iter = tasks.iterator(); iter.hasNext();) {
                 Runnable task = (Runnable)iter.next();
 
-                if (timeoutTaskLog.isLoggable(Level.FINER)) {
-                    timeoutTaskLog.log(Level.FINER, "XToolkit.callTimeoutTasks(): current time={0}" +
-                                       ";  about to run task={1}", new Object[] {Long.valueOf(currentTime), task});
+                if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+                    timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
+                                         ";  about to run task={1}", Long.valueOf(currentTime), task);
                 }
 
                 try {
@@ -1977,7 +1972,7 @@
          */
 
         long current_time_utc = System.currentTimeMillis();
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
             log.finer("reset_time=" + reset_time_utc + ", current_time=" + current_time_utc
                       + ", server_offset=" + server_offset + ", wrap_time=" + WRAP_TIME_MILLIS);
         }
@@ -1986,7 +1981,7 @@
             reset_time_utc = System.currentTimeMillis() - getCurrentServerTime();
         }
 
-        if (log.isLoggable(Level.FINER)) {
+        if (log.isLoggable(PlatformLogger.FINER)) {
             log.finer("result = " + (reset_time_utc + server_offset));
         }
         return reset_time_utc + server_offset;
@@ -2071,14 +2066,14 @@
 
         if (prop == null) {
             backingStoreType = XConstants.NotUseful;
-            if (backingStoreLog.isLoggable(Level.CONFIG)) {
+            if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
                 backingStoreLog.config("The system property sun.awt.backingStore is not set" +
                                        ", by default backingStore=NotUseful");
             }
             return;
         }
 
-        if (backingStoreLog.isLoggable(Level.CONFIG)) {
+        if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
             backingStoreLog.config("The system property sun.awt.backingStore is " + prop);
         }
         prop = prop.toLowerCase();
@@ -2090,7 +2085,7 @@
             backingStoreType = XConstants.NotUseful;
         }
 
-        if (backingStoreLog.isLoggable(Level.CONFIG)) {
+        if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
             backingStoreLog.config("backingStore(as provided by the system property)=" +
                                    ( backingStoreType == XConstants.NotUseful ? "NotUseful"
                                      : backingStoreType == XConstants.WhenMapped ?
@@ -2100,7 +2095,7 @@
         if (sun.java2d.x11.X11SurfaceData.isDgaAvailable()) {
             backingStoreType = XConstants.NotUseful;
 
-            if (backingStoreLog.isLoggable(Level.CONFIG)) {
+            if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
                 backingStoreLog.config("DGA is available, backingStore=NotUseful");
             }
 
@@ -2115,7 +2110,7 @@
                         == XConstants.NotUseful) {
                     backingStoreType = XConstants.NotUseful;
 
-                    if (backingStoreLog.isLoggable(Level.CONFIG)) {
+                    if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
                         backingStoreLog.config("Backing store is not available on the screen " +
                                                i + ", backingStore=NotUseful");
                     }
@@ -2361,7 +2356,7 @@
             // Wait for selection notify for oops on win
             long event_number = getEventNumber();
             XAtom atom = XAtom.get("WM_S0");
-            eventLog.log(Level.FINER, "WM_S0 selection owner {0}", new Object[] {XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom())});
+            eventLog.finer("WM_S0 selection owner {0}", XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom()));
             XlibWrapper.XConvertSelection(getDisplay(), atom.getAtom(),
                                           XAtom.get("VERSION").getAtom(), oops.getAtom(),
                                           win.getWindow(), XConstants.CurrentTime);
@@ -2387,7 +2382,7 @@
                 // If selection update failed we can simply wait some time
                 // hoping some events will arrive
                 awtUnlock();
-                eventLog.log(Level.FINEST, "Emergency sleep");
+                eventLog.finest("Emergency sleep");
                 try {
                     Thread.sleep(WORKAROUND_SLEEP);
                 } catch (InterruptedException ie) {
@@ -2399,7 +2394,7 @@
             return getEventNumber() - event_number > 2;
         } finally {
             removeEventDispatcher(win.getWindow(), oops_waiter);
-            eventLog.log(Level.FINER, "Exiting syncNativeQueue");
+            eventLog.finer("Exiting syncNativeQueue");
             awtUnlock();
         }
     }
--- a/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,18 +31,17 @@
 import sun.awt.*;
 import java.awt.image.*;
 import java.text.BreakIterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.lang.reflect.InvocationTargetException;
+import sun.util.logging.PlatformLogger;
 
 public class XTrayIconPeer implements TrayIconPeer,
        InfoWindow.Balloon.LiveArguments,
        InfoWindow.Tooltip.LiveArguments
 {
-    private static final Logger ctrLog = Logger.getLogger("sun.awt.X11.XTrayIconPeer.centering");
+    private static final PlatformLogger ctrLog = PlatformLogger.getLogger("sun.awt.X11.XTrayIconPeer.centering");
 
     TrayIcon target;
     TrayIconEventProxy eventProxy;
@@ -107,9 +106,9 @@
 
                     XConfigureEvent ce = ev.get_xconfigure();
 
-                    ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
-                               new Object[] { XTrayIconPeer.this, ce.get_width(), ce.get_height(),
-                                              ce.get_x(), ce.get_y(), old_x, old_y });
+                    ctrLog.fine("ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
+                                XTrayIconPeer.this, ce.get_width(), ce.get_height(),
+                                ce.get_x(), ce.get_y(), old_x, old_y);
 
                     // A workaround for Gnome/Metacity (it doesn't affect the behaviour on KDE).
                     // On Metacity the EmbeddedFrame's parent window bounds are larger
@@ -129,14 +128,14 @@
                         // If both the height and the width differ from the fixed size then WM
                         // must level at least one side to the fixed size. For some reason it may take
                         // a few hops (even after reparenting) and we have to skip the intermediate ones.
-                        ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
-                                   XTrayIconPeer.this);
+                        ctrLog.fine("ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
+                                    XTrayIconPeer.this);
                         return;
 
                     } else if (ce.get_height() > TRAY_ICON_HEIGHT) {
 
-                        ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Centering by \"Y\".",
-                                   XTrayIconPeer.this);
+                        ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"Y\".",
+                                    XTrayIconPeer.this);
 
                         XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), eframeParentID,
                                                       ce.get_x(),
@@ -148,8 +147,8 @@
 
                     } else if (ce.get_width() > TRAY_ICON_WIDTH) {
 
-                        ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Centering by \"X\".",
-                                   XTrayIconPeer.this);
+                        ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"X\".",
+                                    XTrayIconPeer.this);
 
                         XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), eframeParentID,
                                                       ce.get_x()+ce.get_width()/2 - TRAY_ICON_WIDTH/2,
@@ -166,8 +165,8 @@
 
                         if (ex_height != 0) {
 
-                            ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".",
-                                       XTrayIconPeer.this);
+                            ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".",
+                                        XTrayIconPeer.this);
 
                             XlibWrapper.XMoveWindow(XToolkit.getDisplay(), eframeParentID,
                                                     ce.get_x(),
@@ -175,15 +174,15 @@
 
                         } else if (ex_width != 0) {
 
-                            ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".",
-                                       XTrayIconPeer.this);
+                            ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".",
+                                        XTrayIconPeer.this);
 
                             XlibWrapper.XMoveWindow(XToolkit.getDisplay(), eframeParentID,
                                                     ce.get_x() + ex_width/2 - TRAY_ICON_WIDTH/2,
                                                     ce.get_y());
                         } else {
-                            ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Move detected. Skipping.",
-                                       XTrayIconPeer.this);
+                            ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Skipping.",
+                                        XTrayIconPeer.this);
                         }
                     }
                     old_x = ce.get_x();
--- a/jdk/src/solaris/classes/sun/awt/X11/XWINProtocol.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWINProtocol.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,11 +27,10 @@
 package sun.awt.X11;
 
 import java.awt.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
-    final static Logger log = Logger.getLogger("sun.awt.X11.XWINProtocol");
+    final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWINProtocol");
 
 /* Gnome WM spec  */
     XAtom XA_WIN_SUPPORTING_WM_CHECK = XAtom.get("_WIN_SUPPORTING_WM_CHECK");
@@ -64,7 +63,7 @@
             req.set_format(32);
             req.set_data(0, (WIN_STATE_MAXIMIZED_HORIZ | WIN_STATE_MAXIMIZED_VERT));
             req.set_data(1, win_state);
-            if (log.isLoggable(Level.FINE)) log.fine("Sending WIN_STATE to root to change the state to " + win_state);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("Sending WIN_STATE to root to change the state to " + win_state);
             try {
                 XToolkit.awtLock();
                 XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -112,7 +111,7 @@
                 win_state &= ~WIN_STATE_MAXIMIZED_HORIZ;
             }
             if ((old_win_state ^ win_state) != 0) {
-                if (log.isLoggable(Level.FINE)) log.fine("Setting WIN_STATE on " + window + " to change the state to " + win_state);
+                if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting WIN_STATE on " + window + " to change the state to " + win_state);
                 XA_WIN_STATE.setCard32Property(window, win_state);
             }
         }
@@ -157,7 +156,7 @@
             req.set_data(0, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP);
             req.set_data(1, 0);
             req.set_data(2, 0);
-            if (log.isLoggable(Level.FINE)) log.fine("Setting layer " + layer + " by root message : " + req);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting layer " + layer + " by root message : " + req);
             XToolkit.awtLock();
             try {
                 XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -172,7 +171,7 @@
             }
             req.dispose();
         } else {
-            if (log.isLoggable(Level.FINE)) log.fine("Setting layer property to " + layer);
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting layer property to " + layer);
             XA_WIN_LAYER.setCard32Property(window, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP);
         }
     }
@@ -198,7 +197,7 @@
         }
         WinWindow = checkAnchor(XA_WIN_SUPPORTING_WM_CHECK, XAtom.XA_CARDINAL);
         supportChecked = true;
-        if (log.isLoggable(Level.FINE)) log.fine("### " + this + " is active: " + (WinWindow != 0));
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " is active: " + (WinWindow != 0));
     }
 
     boolean active() {
@@ -207,13 +206,13 @@
     }
     boolean doStateProtocol() {
         boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_STATE);
-        if (log.isLoggable(Level.FINE)) log.fine("### " + this + " supports state: " + res);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " supports state: " + res);
         return res;
     }
 
     boolean doLayerProtocol() {
         boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_LAYER);
-        if (log.isLoggable(Level.FINE)) log.fine("### " + this + " supports layer: " + res);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " supports layer: " + res);
         return res;
     }
 }
--- a/jdk/src/solaris/classes/sun/awt/X11/XWM.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWM.java	Wed Jul 05 17:01:52 2017 +0200
@@ -37,10 +37,10 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.LinkedList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import sun.util.logging.PlatformLogger;
+
 
 /**
  * Class incapsulating knowledge about window managers in general
@@ -49,9 +49,9 @@
 final class XWM
 {
 
-    private final static Logger log = Logger.getLogger("sun.awt.X11.XWM");
-    private final static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XWM");
-    private final static Logger stateLog = Logger.getLogger("sun.awt.X11.states.XWM");
+    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWM");
+    private final static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWM");
+    private final static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XWM");
 
     static final XAtom XA_MWM_HINTS = new XAtom();
 
@@ -142,7 +142,7 @@
     XWM(int WMID) {
         this.WMID = WMID;
         initializeProtocols();
-        if (log.isLoggable(Level.FINE)) log.fine("Window manager: " + toString());
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Window manager: " + toString());
     }
     int getID() {
         return WMID;
@@ -246,7 +246,7 @@
              * having a window manager running. I.e. it does not reparent
              * top level shells.
              */
-            if (insLog.isLoggable(Level.FINE)) {
+            if (insLog.isLoggable(PlatformLogger.FINE)) {
                 insLog.finer("eXcursion means NO_WM");
             }
             return true;
@@ -264,7 +264,7 @@
             long selection_owner =
                 XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(),
                                                XAtom.get(selection_name).getAtom());
-            if (insLog.isLoggable(Level.FINE)) {
+            if (insLog.isLoggable(PlatformLogger.FINE)) {
                 insLog.finer("selection owner of " + selection_name
                              + " is " + selection_owner);
             }
@@ -293,7 +293,7 @@
                                                     XToolkit.getDefaultRootWindow(),
                                                     XConstants.CWEventMask,
                                                     substruct.pData);
-                if (insLog.isLoggable(Level.FINE)) {
+                if (insLog.isLoggable(PlatformLogger.FINE)) {
                     insLog.finer("It looks like there is no WM thus NO_WM");
                 }
             }
@@ -355,7 +355,7 @@
                     return 0;
                 }
             } catch (Exception e) {
-                if (log.isLoggable(Level.FINER)) {
+                if (log.isLoggable(PlatformLogger.FINER)) {
                     e.printStackTrace();
                 }
                 return 0;
@@ -401,7 +401,7 @@
     static boolean isCDE() {
 
         if (!XA_DT_SM_WINDOW_INFO.isInterned()) {
-            log.log(Level.FINER, "{0} is not interned", new Object[] {XA_DT_SM_WINDOW_INFO});
+            log.finer("{0} is not interned", XA_DT_SM_WINDOW_INFO);
             return false;
         }
 
@@ -432,7 +432,7 @@
 
             /* Now check that this window has _DT_SM_STATE_INFO (ignore contents) */
             if (!XA_DT_SM_STATE_INFO.isInterned()) {
-                log.log(Level.FINER, "{0} is not interned", new Object[] {XA_DT_SM_STATE_INFO});
+                log.finer("{0} is not interned", XA_DT_SM_STATE_INFO);
                 return false;
             }
             WindowPropertyGetter getter2 =
@@ -596,7 +596,7 @@
          */
 
         if (!XA_ICEWM_WINOPTHINT.isInterned()) {
-            log.log(Level.FINER, "{0} is not interned", new Object[] {XA_ICEWM_WINOPTHINT});
+            log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
             return false;
         }
 
@@ -629,7 +629,7 @@
      */
     static boolean isIceWM() {
         if (!XA_ICEWM_WINOPTHINT.isInterned()) {
-            log.log(Level.FINER, "{0} is not interned", new Object[] {XA_ICEWM_WINOPTHINT});
+            log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
             return false;
         }
 
@@ -694,7 +694,7 @@
         return wm;
     }
     static int getWMID() {
-        if (insLog.isLoggable(Level.FINEST)) {
+        if (insLog.isLoggable(PlatformLogger.FINEST)) {
             insLog.finest("awt_wmgr = " + awt_wmgr);
         }
         /*
@@ -718,7 +718,7 @@
             // Later, WM will initialize its own version of protocol
             XNETProtocol l_net_protocol = g_net_protocol = new XNETProtocol();
             l_net_protocol.detect();
-            if (log.isLoggable(Level.FINE) && l_net_protocol.active()) {
+            if (log.isLoggable(PlatformLogger.FINE) && l_net_protocol.active()) {
                 log.fine("_NET_WM_NAME is " + l_net_protocol.getWMName());
             }
             XWINProtocol win = g_win_protocol = new XWINProtocol();
@@ -798,7 +798,7 @@
             }
 
             hints.set_flags(hints.get_flags() & ~mask);
-            if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
+            if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
             XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(),
                                           window.getWindow(),
                                           hints.pData);
@@ -855,7 +855,7 @@
 
         XAtomList decorDel = new XAtomList();
         decorations = normalizeMotifDecor(decorations);
-        if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations));
+        if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations));
         if ((decorations & MWMConstants.MWM_DECOR_TITLE) == 0) {
             decorDel.add(XA_OL_DECOR_HEADER);
         }
@@ -872,7 +872,7 @@
             insLog.finer("Deleting OL_DECOR");
             XA_OL_DECOR_DEL.DeleteProperty(window);
         } else {
-            if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting OL_DECOR to " + decorDel);
+            if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting OL_DECOR to " + decorDel);
             XA_OL_DECOR_DEL.setAtomListProperty(window, decorDel);
         }
     }
@@ -900,7 +900,7 @@
         hints.set_functions(functions);
         hints.set_decorations(decorations);
 
-        if (stateLog.isLoggable(Level.FINER)) stateLog.finer("Setting MWM_HINTS to " + hints);
+        if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("Setting MWM_HINTS to " + hints);
         window.setMWMHints(hints);
     }
 
@@ -962,7 +962,7 @@
      * Make specified shell resizable.
      */
     static void setShellResizable(XDecoratedPeer window) {
-        if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell resizable " + window);
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell resizable " + window);
         XToolkit.awtLock();
         try {
             Rectangle shellBounds = window.getShellBounds();
@@ -992,7 +992,7 @@
     static void setShellNotResizable(XDecoratedPeer window, WindowDimensions newDimensions, Rectangle shellBounds,
                                      boolean justChangeSize)
     {
-        if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions +
+        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions +
                                                        ", shellBounds " + shellBounds +", just change size: " + justChangeSize);
         XToolkit.awtLock();
         try {
@@ -1285,7 +1285,7 @@
                   res = defaultInsets;
             }
         }
-        if (insLog.isLoggable(Level.FINEST)) insLog.finest("WM guessed insets: " + res);
+        if (insLog.isLoggable(PlatformLogger.FINEST)) insLog.finest("WM guessed insets: " + res);
         return res;
     }
     /*
@@ -1354,7 +1354,7 @@
         XNETProtocol net_protocol = getWM().getNETProtocol();
         if (net_protocol != null && net_protocol.active()) {
             Insets insets = getInsetsFromProp(window, XA_NET_FRAME_EXTENTS);
-            insLog.log(Level.FINE, "_NET_FRAME_EXTENTS: {0}", insets);
+            insLog.fine("_NET_FRAME_EXTENTS: {0}", insets);
 
             if (insets != null) {
                 return insets;
@@ -1495,7 +1495,7 @@
          *       [mwm, e!, kwin, fvwm2 ... ]
          */
         Insets correctWM = XWM.getInsetsFromExtents(window);
-        insLog.log(Level.FINER, "Got insets from property: {0}", correctWM);
+        insLog.finer("Got insets from property: {0}", correctWM);
 
         if (correctWM == null) {
             correctWM = new Insets(0,0,0,0);
@@ -1556,7 +1556,7 @@
                   }
                   case XWM.OTHER_WM:
                   default: {                /* this is very similar to the E! case above */
-                      insLog.log(Level.FINEST, "Getting correct insets for OTHER_WM/default, parent: {0}", parent);
+                      insLog.finest("Getting correct insets for OTHER_WM/default, parent: {0}", parent);
                       syncTopLevelPos(parent, lwinAttr);
                       int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
                                                                     window, lwinAttr.pData);
@@ -1583,8 +1583,8 @@
                           && lwinAttr.get_width()+2*lwinAttr.get_border_width() == pattr.get_width()
                           && lwinAttr.get_height()+2*lwinAttr.get_border_width() == pattr.get_height())
                       {
-                          insLog.log(Level.FINEST, "Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
-                                     new Object[] {lwinAttr, pattr, parent, window});
+                          insLog.finest("Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
+                                        lwinAttr, pattr, parent, window);
                           lwinAttr.set_x(pattr.get_x());
                           lwinAttr.set_y(pattr.get_y());
                           lwinAttr.set_border_width(lwinAttr.get_border_width()+pattr.get_border_width());
@@ -1611,8 +1611,8 @@
                        * widths and inner/outer distinction, so for the time
                        * being, just ignore it.
                        */
-                      insLog.log(Level.FINEST, "Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
-                                 new Object[] {lwinAttr, pattr, parent, window});
+                      insLog.finest("Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
+                                    lwinAttr, pattr, parent, window);
                       correctWM = new Insets(lwinAttr.get_y() + lwinAttr.get_border_width(),
                                              lwinAttr.get_x() + lwinAttr.get_border_width(),
                                              pattr.get_height() - (lwinAttr.get_y() + lwinAttr.get_height() + 2*lwinAttr.get_border_width()),
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java	Wed Jul 05 17:01:52 2017 +0200
@@ -35,8 +35,7 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.*;
 
@@ -46,11 +45,11 @@
 import sun.java2d.SurfaceData;
 
 public class XWindow extends XBaseWindow implements X11ComponentPeer {
-    private static Logger log = Logger.getLogger("sun.awt.X11.XWindow");
-    private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XWindow");
-    private static Logger eventLog = Logger.getLogger("sun.awt.X11.event.XWindow");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XWindow");
-    private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XWindow");
+    private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWindow");
+    private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWindow");
+    private static PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XWindow");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XWindow");
+    private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XWindow");
   /* If a motion comes in while a multi-click is pending,
    * allow a smudge factor so that moving the mouse by a small
    * amount does not wipe out the multi-click state variables.
@@ -414,7 +413,7 @@
                     ((Component)e.getSource()).dispatchEvent(e);
                 }
             }, PeerEvent.ULTIMATE_PRIORITY_EVENT);
-        if (focusLog.isLoggable(Level.FINER) && (e instanceof FocusEvent)) focusLog.finer("Sending " + e);
+        if (focusLog.isLoggable(PlatformLogger.FINER) && (e instanceof FocusEvent)) focusLog.finer("Sending " + e);
         XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe);
     }
 
@@ -670,7 +669,7 @@
         if (isEventDisabled(xev)) {
             return;
         }
-        if (eventLog.isLoggable(Level.FINE)) eventLog.fine(xbe.toString());
+        if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(xbe.toString());
         long when;
         int modifiers;
         boolean popupTrigger = false;
@@ -704,7 +703,7 @@
             /*
                multiclick checking
             */
-            if (eventLog.isLoggable(Level.FINEST)) eventLog.finest("lastWindow = " + lastWindow + ", lastButton "
+            if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest("lastWindow = " + lastWindow + ", lastButton "
                                                                    + lastButton + ", lastTime " + lastTime + ", multiClickTime "
                                                                    + XToolkit.getMultiClickTime());
             if (lastWindow == this && lastButton == lbutton && (when - lastTime) < XToolkit.getMultiClickTime()) {
@@ -895,7 +894,7 @@
         super.handleXCrossingEvent(xev);
         XCrossingEvent xce = xev.get_xcrossing();
 
-        if (eventLog.isLoggable(Level.FINEST)) eventLog.finest(xce.toString());
+        if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xce.toString());
 
         if (xce.get_type() == XConstants.EnterNotify) {
             enterNotify(xce.get_window());
@@ -997,8 +996,8 @@
         Rectangle oldBounds = getBounds();
 
         super.handleConfigureNotifyEvent(xev);
-        insLog.log(Level.FINER, "Configure, {0}, event disabled: {1}",
-                   new Object[] {xev.get_xconfigure(), isEventDisabled(xev)});
+        insLog.finer("Configure, {0}, event disabled: {1}",
+                     xev.get_xconfigure(), isEventDisabled(xev));
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1017,7 +1016,7 @@
 
     public void handleMapNotifyEvent(XEvent xev) {
         super.handleMapNotifyEvent(xev);
-        log.log(Level.FINE, "Mapped {0}", new Object[] {this});
+        log.fine("Mapped {0}", this);
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1074,7 +1073,7 @@
     public void handleKeyPress(XEvent xev) {
         super.handleKeyPress(xev);
         XKeyEvent ev = xev.get_xkey();
-        if (eventLog.isLoggable(Level.FINE)) eventLog.fine(ev.toString());
+        if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(ev.toString());
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1087,14 +1086,14 @@
         int unicodeKey = 0;
         keysym[0] = XConstants.NoSymbol;
 
-        if (keyEventLog.isLoggable(Level.FINE)) {
+        if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
             logIncomingKeyEvent( ev );
         }
         if ( //TODO check if there's an active input method instance
              // without calling a native method. Is it necessary though?
             haveCurrentX11InputMethodInstance()) {
             if (x11inputMethodLookupString(ev.pData, keysym)) {
-                if (keyEventLog.isLoggable(Level.FINE)) {
+                if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
                     keyEventLog.fine("--XWindow.java XIM did process event; return; dec keysym processed:"+(keysym[0])+
                                    "; hex keysym processed:"+Long.toHexString(keysym[0])
                                    );
@@ -1102,7 +1101,7 @@
                 return;
             }else {
                 unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
-                if (keyEventLog.isLoggable(Level.FINE)) {
+                if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
                     keyEventLog.fine("--XWindow.java XIM did NOT process event, hex keysym:"+Long.toHexString(keysym[0])+"\n"+
                                      "                                         unicode key:"+Integer.toHexString((int)unicodeKey));
                 }
@@ -1112,7 +1111,7 @@
             // Produce do-it-yourself keysym and perhaps unicode character.
             keysym[0] = xkeycodeToKeysym(ev);
             unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
-            if (keyEventLog.isLoggable(Level.FINE)) {
+            if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
                 keyEventLog.fine("--XWindow.java XIM is absent;             hex keysym:"+Long.toHexString(keysym[0])+"\n"+
                                  "                                         unicode key:"+Integer.toHexString((int)unicodeKey));
             }
@@ -1135,7 +1134,7 @@
         // is undefined, we still have a guess of what has been engraved on a keytop.
         int unicodeFromPrimaryKeysym = keysymToUnicode( xkeycodeToPrimaryKeysym(ev) ,0);
 
-        if (keyEventLog.isLoggable(Level.FINE)) {
+        if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
             keyEventLog.fine(">>>Fire Event:"+
                (ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+
                "jkeycode:decimal="+jkc.getJavaKeycode()+
@@ -1178,7 +1177,7 @@
     public void handleKeyRelease(XEvent xev) {
         super.handleKeyRelease(xev);
         XKeyEvent ev = xev.get_xkey();
-        if (eventLog.isLoggable(Level.FINE)) eventLog.fine(ev.toString());
+        if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(ev.toString());
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1190,7 +1189,7 @@
         int unicodeKey = 0;
         keysym[0] = XConstants.NoSymbol;
 
-        if (keyEventLog.isLoggable(Level.FINE)) {
+        if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
             logIncomingKeyEvent( ev );
         }
         // Keysym should be converted to Unicode, if possible and necessary,
@@ -1201,7 +1200,7 @@
         if( jkc == null ) {
             jkc = new XKeysym.Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_UNDEFINED, java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN);
         }
-        if (keyEventLog.isLoggable(Level.FINE)) {
+        if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
             keyEventLog.fine(">>>Fire Event:"+
                (ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+
                "jkeycode:decimal="+jkc.getJavaKeycode()+
@@ -1333,10 +1332,10 @@
     void updateSizeHints(int x, int y, int width, int height) {
         long flags = XUtilConstants.PSize | (isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition));
         if (!isResizable()) {
-            log.log(Level.FINER, "Window {0} is not resizable", new Object[] {this});
+            log.finer("Window {0} is not resizable", this);
             flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize;
         } else {
-            log.log(Level.FINER, "Window {0} is resizable", new Object[] {this});
+            log.finer("Window {0} is resizable", this);
         }
         setSizeHints(flags, x, y, width, height);
     }
@@ -1344,10 +1343,10 @@
     void updateSizeHints(int x, int y) {
         long flags = isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition);
         if (!isResizable()) {
-            log.log(Level.FINER, "Window {0} is not resizable", new Object[] {this});
+            log.finer("Window {0} is not resizable", this);
             flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize | XUtilConstants.PSize;
         } else {
-            log.log(Level.FINER, "Window {0} is resizable", new Object[] {this});
+            log.finer("Window {0} is resizable", this);
         }
         setSizeHints(flags, x, y, width, height);
     }
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -41,8 +41,7 @@
 import java.util.Set;
 import java.util.Vector;
 
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.AWTAccessor;
 import sun.awt.ComponentAccessor;
@@ -58,11 +57,11 @@
 class XWindowPeer extends XPanelPeer implements WindowPeer,
                                                 DisplayChangedListener {
 
-    private static final Logger log = Logger.getLogger("sun.awt.X11.XWindowPeer");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XWindowPeer");
-    private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XWindowPeer");
-    private static final Logger grabLog = Logger.getLogger("sun.awt.X11.grab.XWindowPeer");
-    private static final Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XWindowPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWindowPeer");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XWindowPeer");
+    private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWindowPeer");
+    private static final PlatformLogger grabLog = PlatformLogger.getLogger("sun.awt.X11.grab.XWindowPeer");
+    private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XWindowPeer");
 
     // should be synchronized on awtLock
     private static Set<XWindowPeer> windows = new HashSet<XWindowPeer>();
@@ -201,7 +200,7 @@
         Window owner = t_window.getOwner();
         if (owner != null) {
             ownerPeer = (XWindowPeer)owner.getPeer();
-            if (focusLog.isLoggable(Level.FINER)) {
+            if (focusLog.isLoggable(PlatformLogger.FINER)) {
                 focusLog.fine("Owner is " + owner);
                 focusLog.fine("Owner peer is " + ownerPeer);
                 focusLog.fine("Owner X window " + Long.toHexString(ownerPeer.getWindow()));
@@ -214,7 +213,7 @@
                 XToolkit.awtLock();
                 try {
                     // Set WM_TRANSIENT_FOR
-                    if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
+                    if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
                                                                        + " for " + Long.toHexString(ownerWindow));
                     setToplevelTransientFor(this, ownerPeer, false, true);
 
@@ -259,7 +258,7 @@
             for (Iterator<Image> i = iconImages.iterator(); i.hasNext(); ) {
                 Image image = i.next();
                 if (image == null) {
-                    if (log.isLoggable(Level.FINEST)) {
+                    if (log.isLoggable(PlatformLogger.FINEST)) {
                         log.finest("XWindowPeer.updateIconImages: Skipping the image passed into Java because it's null.");
                     }
                     continue;
@@ -268,7 +267,7 @@
                 try {
                     iconInfo = new XIconInfo(image);
                 } catch (Exception e){
-                    if (log.isLoggable(Level.FINEST)) {
+                    if (log.isLoggable(PlatformLogger.FINEST)) {
                         log.finest("XWindowPeer.updateIconImages: Perhaps the image passed into Java is broken. Skipping this icon.");
                     }
                     continue;
@@ -339,9 +338,9 @@
             }
         }
 
-        if (iconLog.isLoggable(Level.FINEST)) {
-            iconLog.log(Level.FINEST, ">>> Length_ of buffer of icons data: " + totalLength +
-                                      ", maximum length: " + MAXIMUM_BUFFER_LENGTH_NET_WM_ICON);
+        if (iconLog.isLoggable(PlatformLogger.FINEST)) {
+            iconLog.finest(">>> Length_ of buffer of icons data: " + totalLength +
+                           ", maximum length: " + MAXIMUM_BUFFER_LENGTH_NET_WM_ICON);
         }
 
         return result;
@@ -351,10 +350,10 @@
      * Dumps each icon from the list
      */
     static void dumpIcons(java.util.List<XIconInfo> icons) {
-        if (iconLog.isLoggable(Level.FINEST)) {
-            iconLog.log(Level.FINEST, ">>> Sizes of icon images:");
+        if (iconLog.isLoggable(PlatformLogger.FINEST)) {
+            iconLog.finest(">>> Sizes of icon images:");
             for (Iterator<XIconInfo> i = icons.iterator(); i.hasNext(); ) {
-                iconLog.log(Level.FINEST, "    {0}", i.next());
+                iconLog.finest("    {0}", i.next());
             }
         }
     }
@@ -631,7 +630,7 @@
             return;
         }
 
-        if (log.isLoggable(Level.FINEST)) {
+        if (log.isLoggable(PlatformLogger.FINEST)) {
             log.finest("XWindowPeer: Check if we've been moved to a new screen since we're running in Xinerama mode");
         }
 
@@ -668,7 +667,7 @@
             }
         }
         if (newScreenNum != curScreenNum) {
-            if (log.isLoggable(Level.FINEST)) {
+            if (log.isLoggable(PlatformLogger.FINEST)) {
                 log.finest("XWindowPeer: Moved to a new screen");
             }
             executeDisplayChangedOnEDT(newGC);
@@ -743,7 +742,7 @@
         // override_redirect all we can do is check whether our parent
         // is active. If it is - we can freely synthesize focus transfer.
         // Luckily, this logic is already implemented in requestWindowFocus.
-        if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Requesting window focus");
+        if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Requesting window focus");
         requestWindowFocus(time, timeProvided);
     }
 
@@ -769,7 +768,7 @@
     public void handleFocusEvent(XEvent xev) {
         XFocusChangeEvent xfe = xev.get_xfocus();
         FocusEvent fe;
-        focusLog.log(Level.FINE, "{0}", new Object[] {xfe});
+        focusLog.fine("{0}", xfe);
         if (isEventDisabled(xev)) {
             return;
         }
@@ -952,7 +951,7 @@
     }
 
     private void updateAlwaysOnTop() {
-        log.log(Level.FINE, "Promoting always-on-top state {0}", Boolean.valueOf(alwaysOnTop));
+        log.fine("Promoting always-on-top state {0}", Boolean.valueOf(alwaysOnTop));
         XWM.getWM().setLayer(this,
                              alwaysOnTop ?
                              XLayerProtocol.LAYER_ALWAYS_ON_TOP :
@@ -1388,7 +1387,7 @@
             synchronized(getStateLock()) {
                 XDialogPeer blockerPeer = (XDialogPeer) ComponentAccessor.getPeer(d);
                 if (blocked) {
-                    log.log(Level.FINE, "{0} is blocked by {1}", new Object[] { this, blockerPeer});
+                    log.fine("{0} is blocked by {1}", this, blockerPeer);
                     modalBlocker = d;
 
                     if (isReparented() || XWM.isNonReparentingWM()) {
@@ -1741,7 +1740,7 @@
     }
 
     public void xSetVisible(boolean visible) {
-        if (log.isLoggable(Level.FINE)) log.fine("Setting visible on " + this + " to " + visible);
+        if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
         XToolkit.awtLock();
         try {
             this.visible = visible;
@@ -1864,9 +1863,9 @@
 
     public void handleXCrossingEvent(XEvent xev) {
         XCrossingEvent xce = xev.get_xcrossing();
-        if (grabLog.isLoggable(Level.FINE)) {
-            grabLog.log(Level.FINE, "{0}, when grabbed {1}, contains {2}",
-                        new Object[] {xce, isGrabbed(), containsGlobal(xce.get_x_root(), xce.get_y_root())});
+        if (grabLog.isLoggable(PlatformLogger.FINE)) {
+            grabLog.fine("{0}, when grabbed {1}, contains {2}",
+                         xce, isGrabbed(), containsGlobal(xce.get_x_root(), xce.get_y_root()));
         }
         if (isGrabbed()) {
             // When window is grabbed, all events are dispatched to
@@ -1877,7 +1876,7 @@
             // since it generates MOUSE_ENTERED/MOUSE_EXITED for frame and dialog.
             // (fix for 6390326)
             XBaseWindow target = XToolkit.windowToXWindow(xce.get_window());
-            grabLog.log(Level.FINER, "  -  Grab event target {0}", new Object[] {target});
+            grabLog.finer("  -  Grab event target {0}", target);
             if (target != null && target != this) {
                 target.dispatchEvent(xev);
                 return;
@@ -1888,9 +1887,9 @@
 
     public void handleMotionNotify(XEvent xev) {
         XMotionEvent xme = xev.get_xmotion();
-        if (grabLog.isLoggable(Level.FINE)) {
-            grabLog.log(Level.FINER, "{0}, when grabbed {1}, contains {2}",
-                        new Object[] {xme, isGrabbed(), containsGlobal(xme.get_x_root(), xme.get_y_root())});
+        if (grabLog.isLoggable(PlatformLogger.FINE)) {
+            grabLog.finer("{0}, when grabbed {1}, contains {2}",
+                          xme, isGrabbed(), containsGlobal(xme.get_x_root(), xme.get_y_root()));
         }
         if (isGrabbed()) {
             boolean dragging = false;
@@ -1919,7 +1918,7 @@
                 xme.set_x(localCoord.x);
                 xme.set_y(localCoord.y);
             }
-            grabLog.log(Level.FINER, "  -  Grab event target {0}", new Object[] {target});
+            grabLog.finer("  -  Grab event target {0}", target);
             if (target != null) {
                 if (target != getContentXWindow() && target != this) {
                     target.dispatchEvent(xev);
@@ -1951,9 +1950,9 @@
         if (xbe.get_button() > SunToolkit.MAX_BUTTONS_SUPPORTED) {
             return;
         }
-        if (grabLog.isLoggable(Level.FINE)) {
-            grabLog.log(Level.FINE, "{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})",
-                        new Object[] {xbe, isGrabbed(), containsGlobal(xbe.get_x_root(), xbe.get_y_root()), getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight()});
+        if (grabLog.isLoggable(PlatformLogger.FINE)) {
+            grabLog.fine("{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})",
+                         xbe, isGrabbed(), containsGlobal(xbe.get_x_root(), xbe.get_y_root()), getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight());
         }
         if (isGrabbed()) {
             // When window is grabbed, all events are dispatched to
@@ -1962,7 +1961,7 @@
             // translation)
             XBaseWindow target = XToolkit.windowToXWindow(xbe.get_window());
             try {
-                grabLog.log(Level.FINER, "  -  Grab event target {0} (press target {1})", new Object[] {target, pressTarget});
+                grabLog.finer("  -  Grab event target {0} (press target {1})", target, pressTarget);
                 if (xbe.get_type() == XConstants.ButtonPress
                     && xbe.get_button() == XConstants.buttons[0])
                 {
@@ -1995,7 +1994,7 @@
                         // Outside this toplevel hierarchy
                         // According to the specification of UngrabEvent, post it
                         // when press occurs outside of the window and not on its owned windows
-                        grabLog.log(Level.FINE, "Generating UngrabEvent on {0} because not inside of shell", this);
+                        grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this);
                         postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                         return;
                     }
@@ -2013,18 +2012,18 @@
                             // toplevel == null - outside of
                             // hierarchy, toplevel is Dialog - should
                             // send ungrab (but shouldn't for Window)
-                            grabLog.log(Level.FINE, "Generating UngrabEvent on {0} because hierarchy ended", this);
+                            grabLog.fine("Generating UngrabEvent on {0} because hierarchy ended", this);
                             postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                         }
                     } else {
                         // toplevel is null - outside of hierarchy
-                        grabLog.log(Level.FINE, "Generating UngrabEvent on {0} because toplevel is null", this);
+                        grabLog.fine("Generating UngrabEvent on {0} because toplevel is null", this);
                         postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                         return;
                     }
                 } else {
                     // target doesn't map to XAWT window - outside of hierarchy
-                    grabLog.log(Level.FINE, "Generating UngrabEvent on because target is null {0}", this);
+                    grabLog.fine("Generating UngrabEvent on because target is null {0}", this);
                     postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                     return;
                 }
--- a/jdk/src/solaris/classes/sun/awt/X11/XWrapperBase.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWrapperBase.java	Wed Jul 05 17:01:52 2017 +0200
@@ -26,10 +26,10 @@
 package sun.awt.X11;
 
 // This class serves as the base class for all the wrappers.
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 abstract class XWrapperBase {
-    static final Logger log = Logger.getLogger("sun.awt.X11.wrappers");
+    static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.wrappers");
 
     public String toString() {
         String ret = "";
--- a/jdk/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,7 +27,8 @@
 import java.io.*;
 import java.nio.charset.*;
 import java.text.MessageFormat;
-import java.util.logging.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 public class WrapperGenerator {
     /* XLibParser converts Xlib.h to a Java Object that encapsulates the
@@ -835,7 +836,7 @@
 
                 pw.println("package "+package_name+";\n");
                 pw.println("import sun.misc.*;\n");
-                pw.println("import java.util.logging.*;");
+                pw.println("import sun.util.logging.PlatformLogger;");
                 String baseClass = stp.getBaseClass();
                 if (baseClass == null) {
                     baseClass = defaultBaseClass;
--- a/jdk/src/solaris/classes/sun/awt/X11/keysym2ucs.h	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/keysym2ucs.h	Wed Jul 05 17:01:52 2017 +0200
@@ -67,8 +67,7 @@
 tojava import java.util.Hashtable;
 tojava import sun.misc.Unsafe;
 tojava
-tojava import java.util.logging.Level;
-tojava import java.util.logging.Logger;
+tojava import sun.util.logging.PlatformLogger;
 tojava
 tojava public class XKeysym {
 tojava
@@ -108,7 +107,7 @@
 tojava     static Hashtable<Integer, Long> javaKeycode2KeysymHash = new Hashtable<Integer, Long>();
 tojava     static long keysym_lowercase = unsafe.allocateMemory(Native.getLongSize());
 tojava     static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
-tojava     private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XKeysym");
+tojava     private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym");
 tojava     public static char convertKeysym( long ks, int state ) {
 tojava
 tojava         /* First check for Latin-1 characters (1:1 mapping) */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/sun/awt/X11FontManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,850 @@
+package sun.awt;
+
+import java.awt.GraphicsEnvironment;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StreamTokenizer;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.plaf.FontUIResource;
+import sun.awt.motif.MFontConfiguration;
+import sun.font.CompositeFont;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
+import sun.font.FontConfigManager;
+import sun.font.FcFontConfiguration;
+import sun.font.FontAccess;
+import sun.font.FontUtilities;
+import sun.font.NativeFont;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * The X11 implementation of {@link FontManager}.
+ */
+public class X11FontManager extends SunFontManager {
+
+    // constants identifying XLFD and font ID fields
+    private static final int FOUNDRY_FIELD = 1;
+    private static final int FAMILY_NAME_FIELD = 2;
+    private static final int WEIGHT_NAME_FIELD = 3;
+    private static final int SLANT_FIELD = 4;
+    private static final int SETWIDTH_NAME_FIELD = 5;
+    private static final int ADD_STYLE_NAME_FIELD = 6;
+    private static final int PIXEL_SIZE_FIELD = 7;
+    private static final int POINT_SIZE_FIELD = 8;
+    private static final int RESOLUTION_X_FIELD = 9;
+    private static final int RESOLUTION_Y_FIELD = 10;
+    private static final int SPACING_FIELD = 11;
+    private static final int AVERAGE_WIDTH_FIELD = 12;
+    private static final int CHARSET_REGISTRY_FIELD = 13;
+    private static final int CHARSET_ENCODING_FIELD = 14;
+
+    /*
+     * fontNameMap is a map from a fontID (which is a substring of an XLFD like
+     * "-monotype-arial-bold-r-normal-iso8859-7")
+     * to font file path like
+     * /usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType/ArialBoldItalic.ttf
+     * It's used in a couple of methods like
+     * getFileNameFomPlatformName(..) to help locate the font file.
+     * We use this substring of a full XLFD because the font configuration files
+     * define the XLFDs in a way that's easier to make into a request.
+     * E.g., the -0-0-0-0-p-0- reported by X is -*-%d-*-*-p-*- in the font
+     * configuration files. We need to remove that part for comparisons.
+     */
+    private static Map fontNameMap = new HashMap();
+
+    /*
+     * xlfdMap is a map from a platform path like
+     * /usr/openwin/lib/locale/ja/X11/fonts/TT/HG-GothicB.ttf to an XLFD like
+     * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
+     * Because there may be multiple native names, because the font is used
+     * to support multiple X encodings for example, the value of an entry in
+     * this map is always a vector where we store all the native names.
+     * For fonts which we don't understand the key isn't a pathname, its
+     * the full XLFD string like :-
+     * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
+     */
+    private static Map xlfdMap = new HashMap();
+
+    /* xFontDirsMap is also a map from a font ID to a font filepath.
+     * The difference from fontNameMap is just that it does not have
+     * resolved symbolic links. Normally this is not interesting except
+     * that we need to know the directory in which a font was found to
+     * add it to the X font server path, since although the files may
+     * be linked, the fonts.dir is different and specific to the encoding
+     * handled by that directory. This map is nulled out after use to free
+     * heap space. If the optimal path is taken, such that all fonts in
+     * font configuration files are referenced by filename, then the font
+     * dir can be directly derived as its parent directory.
+     * If a font is used by two XLFDs, each corresponding to a different
+     * X11 font directory, then precautions must be taken to include both
+     * directories.
+     */
+     private static Map xFontDirsMap;
+
+     /*
+      * This is the set of font directories needed to be on the X font path
+      * to enable AWT heavyweights to find all of the font configuration fonts.
+      * It is populated by :
+      * - awtfontpath entries in the fontconfig.properties
+      * - parent directories of "core" fonts used in the fontconfig.properties
+      * - looking up font dirs in the xFontDirsMap where the key is a fontID
+      *   (cut down version of the XLFD read from the font configuration file).
+      * This set is nulled out after use to free heap space.
+      */
+     private static HashSet<String> fontConfigDirs = null;
+
+    /* These maps are used on Linux where we reference the Lucida oblique
+     * fonts in fontconfig files even though they aren't in the standard
+     * font directory. This explicitly remaps the XLFDs for these to the
+     * correct base font. This is needed to prevent composite fonts from
+     * defaulting to the Lucida Sans which is a bad substitute for the
+     * monospaced Lucida Sans Typewriter. Also these maps prevent the
+     * JRE from doing wasted work at start up.
+     */
+    HashMap<String, String> oblmap = null;
+
+
+    /*
+     * Used to eliminate redundant work. When a font directory is
+     * registered it added to this list. Subsequent registrations for the
+     * same directory can then be skipped by checking this Map.
+     * Access to this map is not synchronised here since creation
+     * of the singleton GE instance is already synchronised and that is
+     * the only code path that accesses this map.
+     */
+     private static HashMap registeredDirs = new HashMap();
+
+     /* Array of directories to be added to the X11 font path.
+      * Used by static method called from Toolkits which use X11 fonts.
+      * Specifically this means MToolkit
+      */
+     private static String[] fontdirs = null;
+
+    private static String[] defaultPlatformFont = null;
+
+    private FontConfigManager fcManager = null;
+
+    public static X11FontManager getInstance() {
+        return (X11FontManager) SunFontManager.getInstance();
+    }
+
+    /**
+     * Takes family name property in the following format:
+     * "-linotype-helvetica-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1"
+     * and returns the name of the corresponding physical font.
+     * This code is used to resolve font configuration fonts, and expects
+     * only to get called for these fonts.
+     */
+    @Override
+    public String getFileNameFromPlatformName(String platName) {
+
+        /* If the FontConfig file doesn't use xlfds, or its
+         * FcFontConfiguration, this may be already a file name.
+         */
+        if (platName.startsWith("/")) {
+            return platName;
+        }
+
+        String fileName = null;
+        String fontID = specificFontIDForName(platName);
+
+        /* If the font filename has been explicitly assigned in the
+         * font configuration file, use it. This avoids accessing
+         * the wrong fonts on Linux, where different fonts (some
+         * of which may not be usable by 2D) may share the same
+         * specific font ID. It may also speed up the lookup.
+         */
+        fileName = super.getFileNameFromPlatformName(platName);
+        if (fileName != null) {
+            if (isHeadless() && fileName.startsWith("-")) {
+                /* if it's headless, no xlfd should be used */
+                    return null;
+            }
+            if (fileName.startsWith("/")) {
+                /* If a path is assigned in the font configuration file,
+                 * it is required that the config file also specify using the
+                 * new awtfontpath key the X11 font directories
+                 * which must be added to the X11 font path to support
+                 * AWT access to that font. For that reason we no longer
+                 * have code here to add the parent directory to the list
+                 * of font config dirs, since the parent directory may not
+                 * be sufficient if fonts are symbolically linked to a
+                 * different directory.
+                 *
+                 * Add this XLFD (platform name) to the list of known
+                 * ones for this file.
+                 */
+                Vector xVal = (Vector) xlfdMap.get(fileName);
+                if (xVal == null) {
+                    /* Try to be robust on Linux distros which move fonts
+                     * around by verifying that the fileName represents a
+                     * file that exists.  If it doesn't, set it to null
+                     * to trigger a search.
+                     */
+                    if (getFontConfiguration().needToSearchForFile(fileName)) {
+                        fileName = null;
+                    }
+                    if (fileName != null) {
+                        xVal = new Vector();
+                        xVal.add(platName);
+                        xlfdMap.put(fileName, xVal);
+                    }
+                } else {
+                    if (!xVal.contains(platName)) {
+                        xVal.add(platName);
+                    }
+                }
+            }
+            if (fileName != null) {
+                fontNameMap.put(fontID, fileName);
+                return fileName;
+            }
+        }
+
+        if (fontID != null) {
+            fileName = (String)fontNameMap.get(fontID);
+            /* On Linux check for the Lucida Oblique fonts */
+            if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) {
+                if (oblmap == null) {
+                    initObliqueLucidaFontMap();
+                }
+                String oblkey = getObliqueLucidaFontID(fontID);
+                if (oblkey != null) {
+                    fileName = oblmap.get(oblkey);
+                }
+            }
+            if (fontPath == null &&
+                (fileName == null || !fileName.startsWith("/"))) {
+                if (FontUtilities.debugFonts()) {
+                    FontUtilities.getLogger()
+                          .warning("** Registering all font paths because " +
+                                   "can't find file for " + platName);
+                }
+                fontPath = getPlatformFontPath(noType1Font);
+                registerFontDirs(fontPath);
+                if (FontUtilities.debugFonts()) {
+                    FontUtilities.getLogger()
+                            .warning("** Finished registering all font paths");
+                }
+                fileName = (String)fontNameMap.get(fontID);
+            }
+            if (fileName == null && !isHeadless()) {
+                /* Query X11 directly to see if this font is available
+                 * as a native font.
+                 */
+                fileName = getX11FontName(platName);
+            }
+            if (fileName == null) {
+                fontID = switchFontIDForName(platName);
+                fileName = (String)fontNameMap.get(fontID);
+            }
+            if (fileName != null) {
+                fontNameMap.put(fontID, fileName);
+            }
+        }
+        return fileName;
+    }
+
+    @Override
+    protected String[] getNativeNames(String fontFileName,
+            String platformName) {
+        Vector nativeNames;
+        if ((nativeNames=(Vector)xlfdMap.get(fontFileName))==null) {
+            if (platformName == null) {
+                return null;
+            } else {
+                /* back-stop so that at least the name used in the
+                 * font configuration file is known as a native name
+                 */
+                String []natNames = new String[1];
+                natNames[0] = platformName;
+                return natNames;
+            }
+        } else {
+            int len = nativeNames.size();
+            return (String[])nativeNames.toArray(new String[len]);
+        }
+    }
+
+    /* NOTE: this method needs to be executed in a privileged context.
+     * The superclass constructor which is the primary caller of
+     * this method executes entirely in such a context. Additionally
+     * the loadFonts() method does too. So all should be well.
+
+     */
+    @Override
+    protected void registerFontDir(String path) {
+        /* fonts.dir file format looks like :-
+         * 47
+         * Arial.ttf -monotype-arial-regular-r-normal--0-0-0-0-p-0-iso8859-1
+         * Arial-Bold.ttf -monotype-arial-bold-r-normal--0-0-0-0-p-0-iso8859-1
+         * ...
+         */
+        if (FontUtilities.debugFonts()) {
+            FontUtilities.getLogger().info("ParseFontDir " + path);
+        }
+        File fontsDotDir = new File(path + File.separator + "fonts.dir");
+        FileReader fr = null;
+        try {
+            if (fontsDotDir.canRead()) {
+                fr = new FileReader(fontsDotDir);
+                BufferedReader br = new BufferedReader(fr, 8192);
+                StreamTokenizer st = new StreamTokenizer(br);
+                st.eolIsSignificant(true);
+                int ttype = st.nextToken();
+                if (ttype == StreamTokenizer.TT_NUMBER) {
+                    int numEntries = (int)st.nval;
+                    ttype = st.nextToken();
+                    if (ttype == StreamTokenizer.TT_EOL) {
+                        st.resetSyntax();
+                        st.wordChars(32, 127);
+                        st.wordChars(128 + 32, 255);
+                        st.whitespaceChars(0, 31);
+
+                        for (int i=0; i < numEntries; i++) {
+                            ttype = st.nextToken();
+                            if (ttype == StreamTokenizer.TT_EOF) {
+                                break;
+                            }
+                            if (ttype != StreamTokenizer.TT_WORD) {
+                                break;
+                            }
+                            int breakPos = st.sval.indexOf(' ');
+                            if (breakPos <= 0) {
+                                /* On TurboLinux 8.0 a fonts.dir file had
+                                 * a line with integer value "24" which
+                                 * appeared to be the number of remaining
+                                 * entries in the file. This didn't add to
+                                 * the value on the first line of the file.
+                                 * Seemed like XFree86 didn't like this line
+                                 * much either. It failed to parse the file.
+                                 * Ignore lines like this completely, and
+                                 * don't let them count as an entry.
+                                 */
+                                numEntries++;
+                                ttype = st.nextToken();
+                                if (ttype != StreamTokenizer.TT_EOL) {
+                                    break;
+                                }
+
+                                continue;
+                            }
+                            if (st.sval.charAt(0) == '!') {
+                                /* TurboLinux 8.0 comment line: ignore.
+                                 * can't use st.commentChar('!') to just
+                                 * skip because this line mustn't count
+                                 * against numEntries.
+                                 */
+                                numEntries++;
+                                ttype = st.nextToken();
+                                if (ttype != StreamTokenizer.TT_EOL) {
+                                    break;
+                                }
+                                continue;
+                            }
+                            String fileName = st.sval.substring(0, breakPos);
+                            /* TurboLinux 8.0 uses some additional syntax to
+                             * indicate algorithmic styling values.
+                             * Ignore ':' separated files at the beginning
+                             * of the fileName
+                             */
+                            int lastColon = fileName.lastIndexOf(':');
+                            if (lastColon > 0) {
+                                if (lastColon+1 >= fileName.length()) {
+                                    continue;
+                                }
+                                fileName = fileName.substring(lastColon+1);
+                            }
+                            String fontPart = st.sval.substring(breakPos+1);
+                            String fontID = specificFontIDForName(fontPart);
+                            String sVal = (String) fontNameMap.get(fontID);
+
+                            if (FontUtilities.debugFonts()) {
+                                PlatformLogger logger = FontUtilities.getLogger();
+                                logger.info("file=" + fileName +
+                                            " xlfd=" + fontPart);
+                                logger.info("fontID=" + fontID +
+                                            " sVal=" + sVal);
+                            }
+                            String fullPath = null;
+                            try {
+                                File file = new File(path,fileName);
+                                /* we may have a resolved symbolic link
+                                 * this becomes important for an xlfd we
+                                 * still need to know the location it was
+                                 * found to update the X server font path
+                                 * for use by AWT heavyweights - and when 2D
+                                 * wants to use the native rasteriser.
+                                 */
+                                if (xFontDirsMap == null) {
+                                    xFontDirsMap = new HashMap();
+                                }
+                                xFontDirsMap.put(fontID, path);
+                                fullPath = file.getCanonicalPath();
+                            } catch (IOException e) {
+                                fullPath = path + File.separator + fileName;
+                            }
+                            Vector xVal = (Vector) xlfdMap.get(fullPath);
+                            if (FontUtilities.debugFonts()) {
+                                FontUtilities.getLogger()
+                                      .info("fullPath=" + fullPath +
+                                            " xVal=" + xVal);
+                            }
+                            if ((xVal == null || !xVal.contains(fontPart)) &&
+                                (sVal == null) || !sVal.startsWith("/")) {
+                                if (FontUtilities.debugFonts()) {
+                                    FontUtilities.getLogger()
+                                          .info("Map fontID:"+fontID +
+                                                "to file:" + fullPath);
+                                }
+                                fontNameMap.put(fontID, fullPath);
+                                if (xVal == null) {
+                                    xVal = new Vector();
+                                    xlfdMap.put (fullPath, xVal);
+                                }
+                                xVal.add(fontPart);
+                            }
+
+                            ttype = st.nextToken();
+                            if (ttype != StreamTokenizer.TT_EOL) {
+                                break;
+                            }
+                        }
+                    }
+                }
+                fr.close();
+            }
+        } catch (IOException ioe1) {
+        } finally {
+            if (fr != null) {
+                try {
+                    fr.close();
+                }  catch (IOException ioe2) {
+                }
+            }
+        }
+    }
+
+    @Override
+    public void loadFonts() {
+        super.loadFonts();
+        /* These maps are greatly expanded during a loadFonts but
+         * can be reset to their initial state afterwards.
+         * Since preferLocaleFonts() and preferProportionalFonts() will
+         * trigger a partial repopulating from the FontConfiguration
+         * it has to be the inital (empty) state for the latter two, not
+         * simply nulling out.
+         * xFontDirsMap is a special case in that the implementation
+         * will typically not ever need to initialise it so it can be null.
+         */
+        xFontDirsMap = null;
+        xlfdMap = new HashMap(1);
+        fontNameMap = new HashMap(1);
+    }
+
+    private String getObliqueLucidaFontID(String fontID) {
+        if (fontID.startsWith("-lucidasans-medium-i-normal") ||
+            fontID.startsWith("-lucidasans-bold-i-normal") ||
+            fontID.startsWith("-lucidatypewriter-medium-i-normal") ||
+            fontID.startsWith("-lucidatypewriter-bold-i-normal")) {
+            return fontID.substring(0, fontID.indexOf("-i-"));
+        } else {
+            return null;
+        }
+    }
+
+    private static String getX11FontName(String platName) {
+        String xlfd = platName.replaceAll("%d", "*");
+        if (NativeFont.fontExists(xlfd)) {
+            return xlfd;
+        } else {
+            return null;
+        }
+    }
+
+    private void initObliqueLucidaFontMap() {
+        oblmap = new HashMap<String, String>();
+        oblmap.put("-lucidasans-medium",
+                   jreLibDirName+"/fonts/LucidaSansRegular.ttf");
+        oblmap.put("-lucidasans-bold",
+                   jreLibDirName+"/fonts/LucidaSansDemiBold.ttf");
+        oblmap.put("-lucidatypewriter-medium",
+                   jreLibDirName+"/fonts/LucidaTypewriterRegular.ttf");
+        oblmap.put("-lucidatypewriter-bold",
+                   jreLibDirName+"/fonts/LucidaTypewriterBold.ttf");
+    }
+
+    private boolean isHeadless() {
+        GraphicsEnvironment ge =
+            GraphicsEnvironment.getLocalGraphicsEnvironment();
+        return GraphicsEnvironment.isHeadless();
+    }
+
+    private String specificFontIDForName(String name) {
+
+        int[] hPos = new int[14];
+        int hyphenCnt = 1;
+        int pos = 1;
+
+        while (pos != -1 && hyphenCnt < 14) {
+            pos = name.indexOf('-', pos);
+            if (pos != -1) {
+                hPos[hyphenCnt++] = pos;
+                    pos++;
+            }
+        }
+
+        if (hyphenCnt != 14) {
+            if (FontUtilities.debugFonts()) {
+                FontUtilities.getLogger()
+                    .severe("Font Configuration Font ID is malformed:" + name);
+            }
+            return name; // what else can we do?
+        }
+
+        StringBuffer sb =
+            new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
+                                            hPos[SETWIDTH_NAME_FIELD]));
+        sb.append(name.substring(hPos[CHARSET_REGISTRY_FIELD-1]));
+        String retval = sb.toString().toLowerCase (Locale.ENGLISH);
+        return retval;
+    }
+
+    private String switchFontIDForName(String name) {
+
+        int[] hPos = new int[14];
+        int hyphenCnt = 1;
+        int pos = 1;
+
+        while (pos != -1 && hyphenCnt < 14) {
+            pos = name.indexOf('-', pos);
+            if (pos != -1) {
+                hPos[hyphenCnt++] = pos;
+                    pos++;
+            }
+        }
+
+        if (hyphenCnt != 14) {
+            if (FontUtilities.debugFonts()) {
+                FontUtilities.getLogger()
+                    .severe("Font Configuration Font ID is malformed:" + name);
+            }
+            return name; // what else can we do?
+        }
+
+        String slant = name.substring(hPos[SLANT_FIELD-1]+1,
+                                           hPos[SLANT_FIELD]);
+        String family = name.substring(hPos[FAMILY_NAME_FIELD-1]+1,
+                                           hPos[FAMILY_NAME_FIELD]);
+        String registry = name.substring(hPos[CHARSET_REGISTRY_FIELD-1]+1,
+                                           hPos[CHARSET_REGISTRY_FIELD]);
+        String encoding = name.substring(hPos[CHARSET_ENCODING_FIELD-1]+1);
+
+        if (slant.equals("i")) {
+            slant = "o";
+        } else if (slant.equals("o")) {
+            slant = "i";
+        }
+        // workaround for #4471000
+        if (family.equals("itc zapfdingbats")
+            && registry.equals("sun")
+            && encoding.equals("fontspecific")){
+            registry = "adobe";
+        }
+        StringBuffer sb =
+            new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
+                                            hPos[SLANT_FIELD-1]+1));
+        sb.append(slant);
+        sb.append(name.substring(hPos[SLANT_FIELD],
+                                 hPos[SETWIDTH_NAME_FIELD]+1));
+        sb.append(registry);
+        sb.append(name.substring(hPos[CHARSET_ENCODING_FIELD-1]));
+        String retval = sb.toString().toLowerCase (Locale.ENGLISH);
+        return retval;
+    }
+
+    /**
+     * Returns the face name for the given XLFD.
+     */
+    public String getFileNameFromXLFD(String name) {
+        String fileName = null;
+        String fontID = specificFontIDForName(name);
+        if (fontID != null) {
+            fileName = (String)fontNameMap.get(fontID);
+            if (fileName == null) {
+                fontID = switchFontIDForName(name);
+                fileName = (String)fontNameMap.get(fontID);
+            }
+            if (fileName == null) {
+                fileName = getDefaultFontFile();
+            }
+        }
+        return fileName;
+    }
+
+    /* Register just the paths, (it doesn't register the fonts).
+     * If a font configuration file has specified a baseFontPath
+     * fontPath is just those directories, unless on usage we
+     * find it doesn't contain what we need for the logical fonts.
+     * Otherwise, we register all the paths on Solaris, because
+     * the fontPath we have here is the complete one from
+     * parsing /var/sadm/install/contents, not just
+     * what's on the X font path (may be this should be
+     * changed).
+     * But for now what it means is that if we didn't do
+     * this then if the font weren't listed anywhere on the
+     * less complete font path we'd trigger loadFonts which
+     * actually registers the fonts. This may actually be
+     * the right thing tho' since that would also set up
+     * the X font path without which we wouldn't be able to
+     * display some "native" fonts.
+     * So something to revisit is that probably fontPath
+     * here ought to be only the X font path + jre font dir.
+     * loadFonts should have a separate native call to
+     * get the rest of the platform font path.
+     *
+     * Registering the directories can now be avoided in the
+     * font configuration initialisation when filename entries
+     * exist in the font configuration file for all fonts.
+     * (Perhaps a little confusingly a filename entry is
+     * actually keyed using the XLFD used in the font entries,
+     * and it maps *to* a real filename).
+     * In the event any are missing, registration of all
+     * directories will be invoked to find the real files.
+     *
+     * But registering the directory performed other
+     * functions such as filling in the map of all native names
+     * for the font. So when this method isn't invoked, they still
+     * must be found. This is mitigated by getNativeNames now
+     * being able to return at least the platform name, but mostly
+     * by ensuring that when a filename key is found, that
+     * xlfd key is stored as one of the set of platform names
+     * for the font. Its a set because typical font configuration
+     * files reference the same CJK font files using multiple
+     * X11 encodings. For the code that adds this to the map
+     * see X11GE.getFileNameFromPlatformName(..)
+     * If you don't get all of these then some code points may
+     * not use the Xserver, and will not get the PCF bitmaps
+     * that are available for some point sizes.
+     * So, in the event that there is such a problem,
+     * unconditionally making this call may be necessary, at
+     * some cost to JRE start-up
+     */
+    @Override
+    protected void registerFontDirs(String pathName) {
+
+        StringTokenizer parser = new StringTokenizer(pathName,
+                                                     File.pathSeparator);
+        try {
+            while (parser.hasMoreTokens()) {
+                String dirPath = parser.nextToken();
+                if (dirPath != null && !registeredDirs.containsKey(dirPath)) {
+                    registeredDirs.put(dirPath, null);
+                    registerFontDir(dirPath);
+                }
+            }
+        } catch (NoSuchElementException e) {
+        }
+    }
+
+    // An X font spec (xlfd) includes an encoding. The same TrueType font file
+    // may be referenced from different X font directories in font.dir files
+    // to support use in multiple encodings by X apps.
+    // So for the purposes of font configuration logical fonts where AWT
+    // heavyweights need to access the font via X APIs we need to ensure that
+    // the directory for precisely the encodings needed by this are added to
+    // the x font path. This requires that we note the platform names
+    // specified in font configuration files and use that to identify the
+    // X font directory that contains a font.dir file for that platform name
+    // and add it to the X font path (if display is local)
+    // Here we make use of an already built map of xlfds to font locations
+    // to add the font location to the set of those required to build the
+    // x font path needed by AWT.
+    // These are added to the x font path later.
+    // All this is necessary because on Solaris the font.dir directories
+    // may contain not real font files, but symbolic links to the actual
+    // location but that location is not suitable for the x font path, since
+    // it probably doesn't have a font.dir at all and certainly not one
+    // with the required encodings
+    // If the fontconfiguration file is properly set up so that all fonts
+    // are mapped to files then we will never trigger initialising
+    // xFontDirsMap (it will be null). In this case the awtfontpath entries
+    // must specify all the X11 directories needed by AWT.
+    @Override
+    protected void addFontToPlatformFontPath(String platformName) {
+        // Lazily initialize fontConfigDirs.
+        getPlatformFontPathFromFontConfig();
+        if (xFontDirsMap != null) {
+            String fontID = specificFontIDForName(platformName);
+            String dirName = (String)xFontDirsMap.get(fontID);
+            if (dirName != null) {
+                fontConfigDirs.add(dirName);
+            }
+        }
+        return;
+    }
+
+    private void getPlatformFontPathFromFontConfig() {
+        if (fontConfigDirs == null) {
+            fontConfigDirs = getFontConfiguration().getAWTFontPathSet();
+            if (FontUtilities.debugFonts() && fontConfigDirs != null) {
+                String[] names = fontConfigDirs.toArray(new String[0]);
+                for (int i=0;i<names.length;i++) {
+                    FontUtilities.getLogger().info("awtfontpath : " + names[i]);
+                }
+            }
+        }
+    }
+
+    @Override
+    protected void registerPlatformFontsUsedByFontConfiguration() {
+        // Lazily initialize fontConfigDirs.
+        getPlatformFontPathFromFontConfig();
+        if (fontConfigDirs == null) {
+            return;
+        }
+        if (FontUtilities.isLinux) {
+            fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
+        }
+        fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
+    }
+
+    /* Called by MToolkit to set the X11 font path */
+    public static void setNativeFontPath() {
+        if (fontdirs == null) {
+            return;
+        }
+
+        // need to register these individually rather than by one call
+        // to ensure that one bad directory doesn't cause all to be rejected
+        for (int i=0; i<fontdirs.length; i++) {
+            if (FontUtilities.debugFonts()) {
+                FontUtilities.getLogger().info("Add " + fontdirs[i] + " to X11 fontpath");
+            }
+            setNativeFontPath(fontdirs[i]);
+        }
+    }
+
+    private synchronized static native void setNativeFontPath(String fontPath);
+
+
+    // Implements SunGraphicsEnvironment.createFontConfiguration.
+    protected FontConfiguration createFontConfiguration() {
+        /* The logic here decides whether to use a preconfigured
+         * fontconfig.properties file, or synthesise one using platform APIs.
+         * On Solaris (as opposed to OpenSolaris) we try to use the
+         * pre-configured ones, but if the files it specifies are missing
+         * we fail-safe to synthesising one. This might happen if Solaris
+         * changes its fonts.
+         * For OpenSolaris I don't expect us to ever create fontconfig files,
+         * so it will always synthesise. Note that if we misidentify
+         * OpenSolaris as Solaris, then the test for the presence of
+         * Solaris-only font files will correct this.
+         * For Linux we require an exact match of distro and version to
+         * use the preconfigured file, and also that it points to
+         * existent fonts.
+         * If synthesising fails, we fall back to any preconfigured file
+         * and do the best we can. For the commercial JDK this will be
+         * fine as it includes the Lucida fonts. OpenJDK should not hit
+         * this as the synthesis should always work on its platforms.
+         */
+        FontConfiguration mFontConfig = new MFontConfiguration(this);
+        if (FontUtilities.isOpenSolaris ||
+            (FontUtilities.isLinux &&
+             (!mFontConfig.foundOsSpecificFile() ||
+              !mFontConfig.fontFilesArePresent()) ||
+             (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
+            FcFontConfiguration fcFontConfig =
+                new FcFontConfiguration(this);
+            if (fcFontConfig.init()) {
+                return fcFontConfig;
+            }
+        }
+        mFontConfig.init();
+        return mFontConfig;
+    }
+    public FontConfiguration
+        createFontConfiguration(boolean preferLocaleFonts,
+                                boolean preferPropFonts) {
+
+        return new MFontConfiguration(this,
+                                      preferLocaleFonts, preferPropFonts);
+    }
+
+    public synchronized native String getFontPath(boolean noType1Fonts);
+
+    public String[] getDefaultPlatformFont() {
+        if (defaultPlatformFont != null) {
+            return defaultPlatformFont;
+        }
+        String[] info = new String[2];
+        getFontConfigManager().initFontConfigFonts(false);
+        FontConfigManager.FcCompFont[] fontConfigFonts =
+            getFontConfigManager().getFontConfigFonts();
+        for (int i=0; i<fontConfigFonts.length; i++) {
+            if ("sans".equals(fontConfigFonts[i].fcFamily) &&
+                0 == fontConfigFonts[i].style) {
+                info[0] = fontConfigFonts[i].firstFont.familyName;
+                info[1] = fontConfigFonts[i].firstFont.fontFile;
+                break;
+            }
+        }
+        /* Absolute last ditch attempt in the face of fontconfig problems.
+         * If we didn't match, pick the first, or just make something
+         * up so we don't NPE.
+         */
+        if (info[0] == null) {
+            if (fontConfigFonts.length > 0 &&
+                fontConfigFonts[0].firstFont.fontFile != null) {
+                info[0] = fontConfigFonts[0].firstFont.familyName;
+                info[1] = fontConfigFonts[0].firstFont.fontFile;
+            } else {
+                info[0] = "Dialog";
+                info[1] = "/dialog.ttf";
+            }
+        }
+        defaultPlatformFont = info;
+        return defaultPlatformFont;
+    }
+
+    public synchronized FontConfigManager getFontConfigManager() {
+
+        if (fcManager == null) {
+            fcManager = new FontConfigManager();
+        }
+
+        return fcManager;
+    }
+
+    @Override
+    protected FontUIResource getFontConfigFUIR(String family, int style, int size) {
+
+        CompositeFont font2D = getFontConfigManager().getFontConfigFont(family, style);
+
+        if (font2D == null) { // Not expected, just a precaution.
+           return new FontUIResource(family, style, size);
+        }
+
+        /* The name of the font will be that of the physical font in slot,
+         * but by setting the handle to that of the CompositeFont it
+         * renders as that CompositeFont.
+         * It also needs to be marked as a created font which is the
+         * current mechanism to signal that deriveFont etc must copy
+         * the handle from the original font.
+         */
+        FontUIResource fuir =
+            new FontUIResource(font2D.getFamilyName(null), style, size);
+        FontAccess.getFontAccess().setFont2D(fuir, font2D.handle);
+        FontAccess.getFontAccess().setCreatedFont(fuir);
+        return fuir;
+    }
+}
--- a/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java	Wed Jul 05 17:01:52 2017 +0200
@@ -41,7 +41,6 @@
 import java.net.UnknownHostException;
 
 import java.util.*;
-import java.util.logging.*;
 
 import sun.awt.motif.MFontConfiguration;
 import sun.font.FcFontConfiguration;
@@ -51,6 +50,7 @@
 import sun.java2d.SunGraphicsEnvironment;
 import sun.java2d.SurfaceManagerFactory;
 import sun.java2d.UnixSurfaceManagerFactory;
+import sun.util.logging.PlatformLogger;
 
 /**
  * This is an implementation of a GraphicsEnvironment object for the
@@ -63,82 +63,11 @@
 public class X11GraphicsEnvironment
     extends SunGraphicsEnvironment
 {
-    private static final Logger log = Logger.getLogger("sun.awt.X11GraphicsEnvironment");
-    private static final Logger screenLog = Logger.getLogger("sun.awt.screen.X11GraphicsEnvironment");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11GraphicsEnvironment");
+    private static final PlatformLogger screenLog = PlatformLogger.getLogger("sun.awt.screen.X11GraphicsEnvironment");
 
     private static Boolean xinerState;
 
-    /*
-     * This is the set of font directories needed to be on the X font path
-     * to enable AWT heavyweights to find all of the font configuration fonts.
-     * It is populated by :
-     * - awtfontpath entries in the fontconfig.properties
-     * - parent directories of "core" fonts used in the fontconfig.properties
-     * - looking up font dirs in the xFontDirsMap where the key is a fontID
-     *   (cut down version of the XLFD read from the font configuration file).
-     * This set is nulled out after use to free heap space.
-     */
-    private static HashSet<String> fontConfigDirs = null;
-
-   /*
-    * fontNameMap is a map from a fontID (which is a substring of an XLFD like
-    * "-monotype-arial-bold-r-normal-iso8859-7")
-    * to font file path like
-    * /usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType/ArialBoldItalic.ttf
-    * It's used in a couple of methods like
-    * getFileNameFomPlatformName(..) to help locate the font file.
-    * We use this substring of a full XLFD because the font configuration files
-    * define the XLFDs in a way that's easier to make into a request.
-    * E.g., the -0-0-0-0-p-0- reported by X is -*-%d-*-*-p-*- in the font
-    * configuration files. We need to remove that part for comparisons.
-    */
-    private static Map fontNameMap = new HashMap();
-
-    /* xFontDirsMap is also a map from a font ID to a font filepath.
-     * The difference from fontNameMap is just that it does not have
-     * resolved symbolic links. Normally this is not interesting except
-     * that we need to know the directory in which a font was found to
-     * add it to the X font server path, since although the files may
-     * be linked, the fonts.dir is different and specific to the encoding
-     * handled by that directory. This map is nulled out after use to free
-     * heap space. If the optimal path is taken, such that all fonts in
-     * font configuration files are referenced by filename, then the font
-     * dir can be directly derived as its parent directory.
-     * If a font is used by two XLFDs, each corresponding to a different
-     * X11 font directory, then precautions must be taken to include both
-     * directories.
-     */
-     private static Map xFontDirsMap;
-
-    /*
-     * xlfdMap is a map from a platform path like
-     * /usr/openwin/lib/locale/ja/X11/fonts/TT/HG-GothicB.ttf to an XLFD like
-     * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
-     * Because there may be multiple native names, because the font is used
-     * to support multiple X encodings for example, the value of an entry in
-     * this map is always a vector where we store all the native names.
-     * For fonts which we don't understand the key isn't a pathname, its
-     * the full XLFD string like :-
-     * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
-     */
-     private static Map xlfdMap = new HashMap();
-
-    /*
-     * Used to eliminate redundant work. When a font directory is
-     * registered it added to this list. Subsequent registrations for the
-     * same directory can then be skipped by checking this Map.
-     * Access to this map is not synchronised here since creation
-     * of the singleton GE instance is already synchronised and that is
-     * the only code path that accesses this map.
-     */
-     private static HashMap registeredDirs = new HashMap();
-
-    /* Array of directories to be added to the X11 font path.
-     * Used by static method called from Toolkits which use X11 fonts.
-     * Specifically this means MToolkit
-     */
-    private static String[] fontdirs = null;
-
     static {
         java.security.AccessController.doPrivileged(
                           new java.security.PrivilegedAction() {
@@ -234,7 +163,6 @@
         return getScreenDevices()[getDefaultScreenNum()];
     }
 
-    @Override
     public boolean isDisplayLocal() {
         if (isDisplayLocal == null) {
             SunToolkit.awtLock();
@@ -311,657 +239,7 @@
         return result.booleanValue();
     }
 
-    /* These maps are used on Linux where we reference the Lucida oblique
-     * fonts in fontconfig files even though they aren't in the standard
-     * font directory. This explicitly remaps the XLFDs for these to the
-     * correct base font. This is needed to prevent composite fonts from
-     * defaulting to the Lucida Sans which is a bad substitute for the
-     * monospaced Lucida Sans Typewriter. Also these maps prevent the
-     * JRE from doing wasted work at start up.
-     */
-    HashMap<String, String> oblmap = null;
 
-    private String getObliqueLucidaFontID(String fontID) {
-        if (fontID.startsWith("-lucidasans-medium-i-normal") ||
-            fontID.startsWith("-lucidasans-bold-i-normal") ||
-            fontID.startsWith("-lucidatypewriter-medium-i-normal") ||
-            fontID.startsWith("-lucidatypewriter-bold-i-normal")) {
-            return fontID.substring(0, fontID.indexOf("-i-"));
-        } else {
-            return null;
-        }
-    }
-
-   private void initObliqueLucidaFontMap() {
-       oblmap = new HashMap<String, String>();
-       oblmap.put("-lucidasans-medium",
-                  jreLibDirName+"/fonts/LucidaSansRegular.ttf");
-       oblmap.put("-lucidasans-bold",
-                  jreLibDirName+"/fonts/LucidaSansDemiBold.ttf");
-       oblmap.put("-lucidatypewriter-medium",
-                  jreLibDirName+"/fonts/LucidaTypewriterRegular.ttf");
-       oblmap.put("-lucidatypewriter-bold",
-                  jreLibDirName+"/fonts/LucidaTypewriterBold.ttf");
-   }
-
-    /**
-     * Takes family name property in the following format:
-     * "-linotype-helvetica-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1"
-     * and returns the name of the corresponding physical font.
-     * This code is used to resolve font configuration fonts, and expects
-     * only to get called for these fonts.
-     */
-    public String getFileNameFromPlatformName(String platName) {
-
-        /* If the FontConfig file doesn't use xlfds, or its
-         * FcFontConfiguration, this may be already a file name.
-         */
-        if (platName.startsWith("/")) {
-            return platName;
-        }
-
-        String fileName = null;
-        String fontID = specificFontIDForName(platName);
-
-        /* If the font filename has been explicitly assigned in the
-         * font configuration file, use it. This avoids accessing
-         * the wrong fonts on Linux, where different fonts (some
-         * of which may not be usable by 2D) may share the same
-         * specific font ID. It may also speed up the lookup.
-         */
-        fileName = super.getFileNameFromPlatformName(platName);
-        if (fileName != null) {
-            if (isHeadless() && fileName.startsWith("-")) {
-                /* if it's headless, no xlfd should be used */
-                    return null;
-            }
-            if (fileName.startsWith("/")) {
-                /* If a path is assigned in the font configuration file,
-                 * it is required that the config file also specify using the
-                 * new awtfontpath key the X11 font directories
-                 * which must be added to the X11 font path to support
-                 * AWT access to that font. For that reason we no longer
-                 * have code here to add the parent directory to the list
-                 * of font config dirs, since the parent directory may not
-                 * be sufficient if fonts are symbolically linked to a
-                 * different directory.
-                 *
-                 * Add this XLFD (platform name) to the list of known
-                 * ones for this file.
-                 */
-                Vector xVal = (Vector) xlfdMap.get(fileName);
-                if (xVal == null) {
-                    /* Try to be robust on Linux distros which move fonts
-                     * around by verifying that the fileName represents a
-                     * file that exists.  If it doesn't, set it to null
-                     * to trigger a search.
-                     */
-                    if (getFontConfiguration().needToSearchForFile(fileName)) {
-                        fileName = null;
-                    }
-                    if (fileName != null) {
-                        xVal = new Vector();
-                        xVal.add(platName);
-                        xlfdMap.put(fileName, xVal);
-                    }
-                } else {
-                    if (!xVal.contains(platName)) {
-                        xVal.add(platName);
-                    }
-                }
-            }
-            if (fileName != null) {
-                fontNameMap.put(fontID, fileName);
-                return fileName;
-            }
-        }
-
-        if (fontID != null) {
-            fileName = (String)fontNameMap.get(fontID);
-            /* On Linux check for the Lucida Oblique fonts */
-            if (fileName == null && isLinux && !isOpenJDK()) {
-                if (oblmap == null) {
-                    initObliqueLucidaFontMap();
-                }
-                String oblkey = getObliqueLucidaFontID(fontID);
-                if (oblkey != null) {
-                    fileName = oblmap.get(oblkey);
-                }
-            }
-            if (fontPath == null &&
-                (fileName == null || !fileName.startsWith("/"))) {
-                if (debugFonts) {
-                    logger.warning("** Registering all font paths because " +
-                                   "can't find file for " + platName);
-                }
-                fontPath = getPlatformFontPath(noType1Font);
-                registerFontDirs(fontPath);
-                if (debugFonts) {
-                    logger.warning("** Finished registering all font paths");
-                }
-                fileName = (String)fontNameMap.get(fontID);
-            }
-            if (fileName == null && !isHeadless()) {
-                /* Query X11 directly to see if this font is available
-                 * as a native font.
-                 */
-                fileName = getX11FontName(platName);
-            }
-            if (fileName == null) {
-                fontID = switchFontIDForName(platName);
-                fileName = (String)fontNameMap.get(fontID);
-            }
-            if (fileName != null) {
-                fontNameMap.put(fontID, fileName);
-            }
-        }
-        return fileName;
-    }
-
-    private static String getX11FontName(String platName) {
-        String xlfd = platName.replaceAll("%d", "*");
-        if (NativeFont.fontExists(xlfd)) {
-            return xlfd;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Returns the face name for the given XLFD.
-     */
-    public String getFileNameFromXLFD(String name) {
-        String fileName = null;
-        String fontID = specificFontIDForName(name);
-        if (fontID != null) {
-            fileName = (String)fontNameMap.get(fontID);
-            if (fileName == null) {
-                fontID = switchFontIDForName(name);
-                fileName = (String)fontNameMap.get(fontID);
-            }
-            if (fileName == null) {
-                fileName = getDefaultFontFile();
-            }
-        }
-        return fileName;
-    }
-
-    // constants identifying XLFD and font ID fields
-    private static final int FOUNDRY_FIELD = 1;
-    private static final int FAMILY_NAME_FIELD = 2;
-    private static final int WEIGHT_NAME_FIELD = 3;
-    private static final int SLANT_FIELD = 4;
-    private static final int SETWIDTH_NAME_FIELD = 5;
-    private static final int ADD_STYLE_NAME_FIELD = 6;
-    private static final int PIXEL_SIZE_FIELD = 7;
-    private static final int POINT_SIZE_FIELD = 8;
-    private static final int RESOLUTION_X_FIELD = 9;
-    private static final int RESOLUTION_Y_FIELD = 10;
-    private static final int SPACING_FIELD = 11;
-    private static final int AVERAGE_WIDTH_FIELD = 12;
-    private static final int CHARSET_REGISTRY_FIELD = 13;
-    private static final int CHARSET_ENCODING_FIELD = 14;
-
-    private String switchFontIDForName(String name) {
-
-        int[] hPos = new int[14];
-        int hyphenCnt = 1;
-        int pos = 1;
-
-        while (pos != -1 && hyphenCnt < 14) {
-            pos = name.indexOf('-', pos);
-            if (pos != -1) {
-                hPos[hyphenCnt++] = pos;
-                    pos++;
-            }
-        }
-
-        if (hyphenCnt != 14) {
-            if (debugFonts) {
-                logger.severe("Font Configuration Font ID is malformed:" + name);
-            }
-            return name; // what else can we do?
-        }
-
-        String slant = name.substring(hPos[SLANT_FIELD-1]+1,
-                                           hPos[SLANT_FIELD]);
-        String family = name.substring(hPos[FAMILY_NAME_FIELD-1]+1,
-                                           hPos[FAMILY_NAME_FIELD]);
-        String registry = name.substring(hPos[CHARSET_REGISTRY_FIELD-1]+1,
-                                           hPos[CHARSET_REGISTRY_FIELD]);
-        String encoding = name.substring(hPos[CHARSET_ENCODING_FIELD-1]+1);
-
-        if (slant.equals("i")) {
-            slant = "o";
-        } else if (slant.equals("o")) {
-            slant = "i";
-        }
-        // workaround for #4471000
-        if (family.equals("itc zapfdingbats")
-            && registry.equals("sun")
-            && encoding.equals("fontspecific")){
-            registry = "adobe";
-        }
-        StringBuffer sb =
-            new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
-                                            hPos[SLANT_FIELD-1]+1));
-        sb.append(slant);
-        sb.append(name.substring(hPos[SLANT_FIELD],
-                                 hPos[SETWIDTH_NAME_FIELD]+1));
-        sb.append(registry);
-        sb.append(name.substring(hPos[CHARSET_ENCODING_FIELD-1]));
-        String retval = sb.toString().toLowerCase (Locale.ENGLISH);
-        return retval;
-    }
-
-
-    private String specificFontIDForName(String name) {
-
-        int[] hPos = new int[14];
-        int hyphenCnt = 1;
-        int pos = 1;
-
-        while (pos != -1 && hyphenCnt < 14) {
-            pos = name.indexOf('-', pos);
-            if (pos != -1) {
-                hPos[hyphenCnt++] = pos;
-                    pos++;
-            }
-        }
-
-        if (hyphenCnt != 14) {
-            if (debugFonts) {
-                logger.severe("Font Configuration Font ID is malformed:" + name);
-            }
-            return name; // what else can we do?
-        }
-
-        StringBuffer sb =
-            new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
-                                            hPos[SETWIDTH_NAME_FIELD]));
-        sb.append(name.substring(hPos[CHARSET_REGISTRY_FIELD-1]));
-        String retval = sb.toString().toLowerCase (Locale.ENGLISH);
-        return retval;
-    }
-
-    protected String[] getNativeNames(String fontFileName,
-                                      String platformName) {
-        Vector nativeNames;
-        if ((nativeNames=(Vector)xlfdMap.get(fontFileName))==null) {
-            if (platformName == null) {
-                return null;
-            } else {
-                /* back-stop so that at least the name used in the
-                 * font configuration file is known as a native name
-                 */
-                String []natNames = new String[1];
-                natNames[0] = platformName;
-                return natNames;
-            }
-        } else {
-            int len = nativeNames.size();
-            return (String[])nativeNames.toArray(new String[len]);
-        }
-    }
-
-
-    // An X font spec (xlfd) includes an encoding. The same TrueType font file
-    // may be referenced from different X font directories in font.dir files
-    // to support use in multiple encodings by X apps.
-    // So for the purposes of font configuration logical fonts where AWT
-    // heavyweights need to access the font via X APIs we need to ensure that
-    // the directory for precisely the encodings needed by this are added to
-    // the x font path. This requires that we note the platform names
-    // specified in font configuration files and use that to identify the
-    // X font directory that contains a font.dir file for that platform name
-    // and add it to the X font path (if display is local)
-    // Here we make use of an already built map of xlfds to font locations
-    // to add the font location to the set of those required to build the
-    // x font path needed by AWT.
-    // These are added to the x font path later.
-    // All this is necessary because on Solaris the font.dir directories
-    // may contain not real font files, but symbolic links to the actual
-    // location but that location is not suitable for the x font path, since
-    // it probably doesn't have a font.dir at all and certainly not one
-    // with the required encodings
-    // If the fontconfiguration file is properly set up so that all fonts
-    // are mapped to files then we will never trigger initialising
-    // xFontDirsMap (it will be null). In this case the awtfontpath entries
-    // must specify all the X11 directories needed by AWT.
-    protected void addFontToPlatformFontPath(String platformName) {
-        if (xFontDirsMap != null) {
-            String fontID = specificFontIDForName(platformName);
-            String dirName = (String)xFontDirsMap.get(fontID);
-            if (dirName != null) {
-                fontConfigDirs.add(dirName);
-            }
-        }
-        return;
-    }
-
-    protected void getPlatformFontPathFromFontConfig() {
-        if (fontConfigDirs == null) {
-            fontConfigDirs = getFontConfiguration().getAWTFontPathSet();
-            if (debugFonts && fontConfigDirs != null) {
-                String[] names = fontConfigDirs.toArray(new String[0]);
-                for (int i=0;i<names.length;i++) {
-                    logger.info("awtfontpath : " + names[i]);
-                }
-            }
-        }
-    }
-
-    protected void registerPlatformFontsUsedByFontConfiguration() {
-        if (fontConfigDirs == null) {
-            return;
-        }
-        if (isLinux) {
-            fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
-        }
-        fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
-    }
-
-    /* Called by MToolkit to set the X11 font path */
-    public static void setNativeFontPath() {
-        if (fontdirs == null) {
-            return;
-        }
-
-        // need to register these individually rather than by one call
-        // to ensure that one bad directory doesn't cause all to be rejected
-        for (int i=0; i<fontdirs.length; i++) {
-            if (debugFonts) {
-                logger.info("Add " + fontdirs[i] + " to X11 fontpath");
-            }
-            FontManager.setNativeFontPath(fontdirs[i]);
-        }
-    }
-
-    /* Register just the paths, (it doesn't register the fonts).
-     * If a font configuration file has specified a baseFontPath
-     * fontPath is just those directories, unless on usage we
-     * find it doesn't contain what we need for the logical fonts.
-     * Otherwise, we register all the paths on Solaris, because
-     * the fontPath we have here is the complete one from
-     * parsing /var/sadm/install/contents, not just
-     * what's on the X font path (may be this should be
-     * changed).
-     * But for now what it means is that if we didn't do
-     * this then if the font weren't listed anywhere on the
-     * less complete font path we'd trigger loadFonts which
-     * actually registers the fonts. This may actually be
-     * the right thing tho' since that would also set up
-     * the X font path without which we wouldn't be able to
-     * display some "native" fonts.
-     * So something to revisit is that probably fontPath
-     * here ought to be only the X font path + jre font dir.
-     * loadFonts should have a separate native call to
-     * get the rest of the platform font path.
-     *
-     * Registering the directories can now be avoided in the
-     * font configuration initialisation when filename entries
-     * exist in the font configuration file for all fonts.
-     * (Perhaps a little confusingly a filename entry is
-     * actually keyed using the XLFD used in the font entries,
-     * and it maps *to* a real filename).
-     * In the event any are missing, registration of all
-     * directories will be invoked to find the real files.
-     *
-     * But registering the directory performed other
-     * functions such as filling in the map of all native names
-     * for the font. So when this method isn't invoked, they still
-     * must be found. This is mitigated by getNativeNames now
-     * being able to return at least the platform name, but mostly
-     * by ensuring that when a filename key is found, that
-     * xlfd key is stored as one of the set of platform names
-     * for the font. Its a set because typical font configuration
-     * files reference the same CJK font files using multiple
-     * X11 encodings. For the code that adds this to the map
-     * see X11GE.getFileNameFromPlatformName(..)
-     * If you don't get all of these then some code points may
-     * not use the Xserver, and will not get the PCF bitmaps
-     * that are available for some point sizes.
-     * So, in the event that there is such a problem,
-     * unconditionally making this call may be necessary, at
-     * some cost to JRE start-up
-     */
-    protected void registerFontDirs(String pathName) {
-
-        StringTokenizer parser = new StringTokenizer(pathName,
-                                                     File.pathSeparator);
-        try {
-            while (parser.hasMoreTokens()) {
-                String dirPath = parser.nextToken();
-                if (dirPath != null && !registeredDirs.containsKey(dirPath)) {
-                    registeredDirs.put(dirPath, null);
-                    registerFontDir(dirPath);
-                }
-            }
-        } catch (NoSuchElementException e) {
-        }
-    }
-
-    /* NOTE: this method needs to be executed in a privileged context.
-     * The superclass constructor which is the primary caller of
-     * this method executes entirely in such a context. Additionally
-     * the loadFonts() method does too. So all should be well.
-
-     */
-    protected void registerFontDir(String path) {
-        /* fonts.dir file format looks like :-
-         * 47
-         * Arial.ttf -monotype-arial-regular-r-normal--0-0-0-0-p-0-iso8859-1
-         * Arial-Bold.ttf -monotype-arial-bold-r-normal--0-0-0-0-p-0-iso8859-1
-         * ...
-         */
-        if (debugFonts) {
-            logger.info("ParseFontDir " + path);
-        }
-        File fontsDotDir = new File(path + File.separator + "fonts.dir");
-        FileReader fr = null;
-        try {
-            if (fontsDotDir.canRead()) {
-                fr = new FileReader(fontsDotDir);
-                BufferedReader br = new BufferedReader(fr, 8192);
-                StreamTokenizer st = new StreamTokenizer(br);
-                st.eolIsSignificant(true);
-                int ttype = st.nextToken();
-                if (ttype == StreamTokenizer.TT_NUMBER) {
-                    int numEntries = (int)st.nval;
-                    ttype = st.nextToken();
-                    if (ttype == StreamTokenizer.TT_EOL) {
-                        st.resetSyntax();
-                        st.wordChars(32, 127);
-                        st.wordChars(128 + 32, 255);
-                        st.whitespaceChars(0, 31);
-
-                        for (int i=0; i < numEntries; i++) {
-                            ttype = st.nextToken();
-                            if (ttype == StreamTokenizer.TT_EOF) {
-                                break;
-                            }
-                            if (ttype != StreamTokenizer.TT_WORD) {
-                                break;
-                            }
-                            int breakPos = st.sval.indexOf(' ');
-                            if (breakPos <= 0) {
-                                /* On TurboLinux 8.0 a fonts.dir file had
-                                 * a line with integer value "24" which
-                                 * appeared to be the number of remaining
-                                 * entries in the file. This didn't add to
-                                 * the value on the first line of the file.
-                                 * Seemed like XFree86 didn't like this line
-                                 * much either. It failed to parse the file.
-                                 * Ignore lines like this completely, and
-                                 * don't let them count as an entry.
-                                 */
-                                numEntries++;
-                                ttype = st.nextToken();
-                                if (ttype != StreamTokenizer.TT_EOL) {
-                                    break;
-                                }
-
-                                continue;
-                            }
-                            if (st.sval.charAt(0) == '!') {
-                                /* TurboLinux 8.0 comment line: ignore.
-                                 * can't use st.commentChar('!') to just
-                                 * skip because this line mustn't count
-                                 * against numEntries.
-                                 */
-                                numEntries++;
-                                ttype = st.nextToken();
-                                if (ttype != StreamTokenizer.TT_EOL) {
-                                    break;
-                                }
-                                continue;
-                            }
-                            String fileName = st.sval.substring(0, breakPos);
-                            /* TurboLinux 8.0 uses some additional syntax to
-                             * indicate algorithmic styling values.
-                             * Ignore ':' separated files at the beginning
-                             * of the fileName
-                             */
-                            int lastColon = fileName.lastIndexOf(':');
-                            if (lastColon > 0) {
-                                if (lastColon+1 >= fileName.length()) {
-                                    continue;
-                                }
-                                fileName = fileName.substring(lastColon+1);
-                            }
-                            String fontPart = st.sval.substring(breakPos+1);
-                            String fontID = specificFontIDForName(fontPart);
-                            String sVal = (String) fontNameMap.get(fontID);
-
-                            if (debugFonts) {
-                                logger.info("file=" + fileName +
-                                            " xlfd=" + fontPart);
-                                logger.info("fontID=" + fontID +
-                                            " sVal=" + sVal);
-                            }
-                            String fullPath = null;
-                            try {
-                                File file = new File(path,fileName);
-                                /* we may have a resolved symbolic link
-                                 * this becomes important for an xlfd we
-                                 * still need to know the location it was
-                                 * found to update the X server font path
-                                 * for use by AWT heavyweights - and when 2D
-                                 * wants to use the native rasteriser.
-                                 */
-                                if (xFontDirsMap == null) {
-                                    xFontDirsMap = new HashMap();
-                                }
-                                xFontDirsMap.put(fontID, path);
-                                fullPath = file.getCanonicalPath();
-                            } catch (IOException e) {
-                                fullPath = path + File.separator + fileName;
-                            }
-                            Vector xVal = (Vector) xlfdMap.get(fullPath);
-                            if (debugFonts) {
-                                logger.info("fullPath=" + fullPath +
-                                            " xVal=" + xVal);
-                            }
-                            if ((xVal == null || !xVal.contains(fontPart)) &&
-                                (sVal == null) || !sVal.startsWith("/")) {
-                                if (debugFonts) {
-                                    logger.info("Map fontID:"+fontID +
-                                                "to file:" + fullPath);
-                                }
-                                fontNameMap.put(fontID, fullPath);
-                                if (xVal == null) {
-                                    xVal = new Vector();
-                                    xlfdMap.put (fullPath, xVal);
-                                }
-                                xVal.add(fontPart);
-                            }
-
-                            ttype = st.nextToken();
-                            if (ttype != StreamTokenizer.TT_EOL) {
-                                break;
-                            }
-                        }
-                    }
-                }
-                fr.close();
-            }
-        } catch (IOException ioe1) {
-        } finally {
-            if (fr != null) {
-                try {
-                    fr.close();
-                }  catch (IOException ioe2) {
-                }
-            }
-        }
-    }
-
-    @Override
-    public void loadFonts() {
-        super.loadFonts();
-        /* These maps are greatly expanded during a loadFonts but
-         * can be reset to their initial state afterwards.
-         * Since preferLocaleFonts() and preferProportionalFonts() will
-         * trigger a partial repopulating from the FontConfiguration
-         * it has to be the inital (empty) state for the latter two, not
-         * simply nulling out.
-         * xFontDirsMap is a special case in that the implementation
-         * will typically not ever need to initialise it so it can be null.
-         */
-        xFontDirsMap = null;
-        xlfdMap = new HashMap(1);
-        fontNameMap = new HashMap(1);
-    }
-
-    // Implements SunGraphicsEnvironment.createFontConfiguration.
-    protected FontConfiguration createFontConfiguration() {
-
-        /* The logic here decides whether to use a preconfigured
-         * fontconfig.properties file, or synthesise one using platform APIs.
-         * On Solaris (as opposed to OpenSolaris) we try to use the
-         * pre-configured ones, but if the files it specifies are missing
-         * we fail-safe to synthesising one. This might happen if Solaris
-         * changes its fonts.
-         * For OpenSolaris I don't expect us to ever create fontconfig files,
-         * so it will always synthesise. Note that if we misidentify
-         * OpenSolaris as Solaris, then the test for the presence of
-         * Solaris-only font files will correct this.
-         * For Linux we require an exact match of distro and version to
-         * use the preconfigured file, and also that it points to
-         * existent fonts.
-         * If synthesising fails, we fall back to any preconfigured file
-         * and do the best we can. For the commercial JDK this will be
-         * fine as it includes the Lucida fonts. OpenJDK should not hit
-         * this as the synthesis should always work on its platforms.
-         */
-        FontConfiguration mFontConfig = new MFontConfiguration(this);
-        if (isOpenSolaris ||
-            (isLinux &&
-             (!mFontConfig.foundOsSpecificFile() ||
-              !mFontConfig.fontFilesArePresent()) ||
-             (isSolaris && !mFontConfig.fontFilesArePresent()))) {
-            FcFontConfiguration fcFontConfig =
-                new FcFontConfiguration(this);
-            if (fcFontConfig.init()) {
-                return fcFontConfig;
-            }
-        }
-        mFontConfig.init();
-        return mFontConfig;
-    }
-    public FontConfiguration
-        createFontConfiguration(boolean preferLocaleFonts,
-                                boolean preferPropFonts) {
-
-        FontConfiguration config = getFontConfiguration();
-        if (config instanceof FcFontConfiguration) {
-            // Doesn't need to implement the alternate support.
-            return config;
-        }
-
-        return new MFontConfiguration(this,
-                                      preferLocaleFonts, preferPropFonts);
-    }
 
     /**
      * Returns face name for default font, or null if
@@ -1006,8 +284,8 @@
             // pRunningXinerama() simply returns a global boolean variable,
             // so there is no need to synchronize here
             xinerState = Boolean.valueOf(pRunningXinerama());
-            if (screenLog.isLoggable(Level.FINER)) {
-                screenLog.log(Level.FINER, "Running Xinerama: " + xinerState);
+            if (screenLog.isLoggable(PlatformLogger.FINER)) {
+                screenLog.finer("Running Xinerama: " + xinerState);
             }
         }
         return xinerState.booleanValue();
@@ -1090,24 +368,24 @@
             (unionRect.width / 2) + unionRect.x < center.x + 1 &&
             (unionRect.height / 2) + unionRect.y < center.y + 1) {
 
-            if (screenLog.isLoggable(Level.FINER)) {
-                screenLog.log(Level.FINER, "Video Wall: center point is at center of all displays.");
+            if (screenLog.isLoggable(PlatformLogger.FINER)) {
+                screenLog.finer("Video Wall: center point is at center of all displays.");
             }
             return unionRect;
         }
 
         // next, check if at center of one monitor
         if (centerMonitorRect != null) {
-            if (screenLog.isLoggable(Level.FINER)) {
-                screenLog.log(Level.FINER, "Center point at center of a particular " +
-                                           "monitor, but not of the entire virtual display.");
+            if (screenLog.isLoggable(PlatformLogger.FINER)) {
+                screenLog.finer("Center point at center of a particular " +
+                                "monitor, but not of the entire virtual display.");
             }
             return centerMonitorRect;
         }
 
         // otherwise, the center is at some weird spot: return unionRect
-        if (screenLog.isLoggable(Level.FINER)) {
-            screenLog.log(Level.FINER, "Center point is somewhere strange - return union of all bounds.");
+        if (screenLog.isLoggable(PlatformLogger.FINER)) {
+            screenLog.finer("Center point is somewhere strange - return union of all bounds.");
         }
         return unionRect;
     }
--- a/jdk/src/solaris/classes/sun/awt/X11InputMethod.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11InputMethod.java	Wed Jul 05 17:01:52 2017 +0200
@@ -57,7 +57,7 @@
 import java.io.FileReader;
 import java.io.BufferedReader;
 import java.io.IOException;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 import java.util.StringTokenizer;
 import java.util.regex.Pattern;
 
@@ -68,7 +68,7 @@
  * @author JavaSoft International
  */
 public abstract class X11InputMethod extends InputMethodAdapter {
-    private static final Logger log = Logger.getLogger("sun.awt.X11InputMethod");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11InputMethod");
     /*
      * The following XIM* values must be the same as those defined in
      * Xlib.h
@@ -324,8 +324,8 @@
             return;
 
         if (lastXICFocussedComponent != null){
-            if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "XICFocused {0}, AWTFocused {1}", new Object[] {
-                lastXICFocussedComponent, awtFocussedComponent});
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("XICFocused {0}, AWTFocused {1}",
+                                                              lastXICFocussedComponent, awtFocussedComponent);
         }
 
         if (pData == 0) {
--- a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,37 +30,42 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStreamReader;
+import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Locale;
-import java.util.logging.Logger;
 import java.util.Properties;
 import java.util.Scanner;
 import sun.awt.FontConfiguration;
+import sun.awt.X11FontManager;
 import sun.awt.X11GraphicsEnvironment;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
 import sun.java2d.SunGraphicsEnvironment;
-import java.nio.charset.Charset;
+import sun.util.logging.PlatformLogger;
 
 public class MFontConfiguration extends FontConfiguration {
 
     private static FontConfiguration fontConfig = null;
-    private static Logger logger;
+    private static PlatformLogger logger;
 
-    public MFontConfiguration(SunGraphicsEnvironment environment) {
-        super(environment);
-        if (SunGraphicsEnvironment.debugFonts) {
-            logger = Logger.getLogger("sun.awt.FontConfiguration");
+    public MFontConfiguration(SunFontManager fm) {
+        super(fm);
+        if (FontUtilities.debugFonts()) {
+            logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
         }
         initTables();
     }
 
 
-    public MFontConfiguration(SunGraphicsEnvironment environment,
+    public MFontConfiguration(SunFontManager fm,
                               boolean preferLocaleFonts,
                               boolean preferPropFonts) {
-        super(environment, preferLocaleFonts, preferPropFonts);
-        if (SunGraphicsEnvironment.debugFonts) {
-            logger = Logger.getLogger("sun.awt.FontConfiguration");
+        super(fm, preferLocaleFonts, preferPropFonts);
+        if (FontUtilities.debugFonts()) {
+            logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
         }
         initTables();
     }
@@ -90,7 +95,7 @@
         reorderMap.put("UTF-8.th", "thai");
         reorderMap.put("UTF-8.zh.TW", "chinese-big5");
         reorderMap.put("UTF-8.zh.HK", split("chinese-big5,chinese-hkscs"));
-        if (sun.font.FontManager.isSolaris8) {
+        if (FontUtilities.isSolaris8) {
             reorderMap.put("UTF-8.zh.CN", split("chinese-gb2312,chinese-big5"));
         } else {
             reorderMap.put("UTF-8.zh.CN",
@@ -100,7 +105,7 @@
                        split("chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1"));
         reorderMap.put("Big5", "chinese-big5");
         reorderMap.put("Big5-HKSCS", split("chinese-big5,chinese-hkscs"));
-        if (! sun.font.FontManager.isSolaris8 && ! sun.font.FontManager.isSolaris9) {
+        if (! FontUtilities.isSolaris8 && ! FontUtilities.isSolaris9) {
             reorderMap.put("GB2312", split("chinese-gbk,chinese-gb2312"));
         } else {
             reorderMap.put("GB2312","chinese-gb2312");
@@ -209,7 +214,7 @@
 
     protected String mapFileName(String fileName) {
         if (fileName != null && fileName.startsWith(fontsDirPrefix)) {
-            return SunGraphicsEnvironment.jreFontDirName
+            return SunFontManager.jreFontDirName
                     + fileName.substring(fontsDirPrefix.length());
         }
         return fileName;
@@ -310,7 +315,7 @@
             !needToSearchForFile(fileName)) {
             return fileName;
         }
-        return ((X11GraphicsEnvironment) environment).getFileNameFromXLFD(componentFontName);
+        return ((X11FontManager) fontManager).getFileNameFromXLFD(componentFontName);
     }
 
     /**
--- a/jdk/src/solaris/classes/sun/awt/motif/MToolkit.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/motif/MToolkit.java	Wed Jul 05 17:01:52 2017 +0200
@@ -43,7 +43,6 @@
 import java.util.Properties;
 import java.util.Map;
 import java.util.Iterator;
-import java.util.logging.*;
 
 import sun.awt.AppContext;
 import sun.awt.AWTAutoShutdown;
@@ -61,6 +60,7 @@
 import java.awt.dnd.peer.DragSourceContextPeer;
 
 //import sun.awt.motif.MInputMethod;
+import sun.awt.X11FontManager;
 import sun.awt.X11GraphicsConfig;
 import sun.awt.X11GraphicsEnvironment;
 import sun.awt.XSettings;
@@ -73,10 +73,11 @@
 import sun.misc.Unsafe;
 
 import sun.security.action.GetBooleanAction;
+import sun.util.logging.PlatformLogger;
 
 public class MToolkit extends UNIXToolkit implements Runnable {
 
-    private static final Logger log = Logger.getLogger("sun.awt.motif.MToolkit");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.motif.MToolkit");
 
     // the system clipboard - CLIPBOARD selection
     //X11Clipboard clipboard;
@@ -124,7 +125,7 @@
          * and when we know that MToolkit is the one that will be used,
          * since XToolkit doesn't need the X11 font path set
          */
-        X11GraphicsEnvironment.setNativeFontPath();
+        X11FontManager.getInstance().setNativeFontPath();
 
         motifdnd = ((Boolean)java.security.AccessController.doPrivileged(
             new GetBooleanAction("awt.dnd.motifdnd"))).booleanValue();
@@ -616,8 +617,8 @@
     protected Boolean lazilyLoadDynamicLayoutSupportedProperty(String name) {
         boolean nativeDynamic = isDynamicLayoutSupportedNative();
 
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "nativeDynamic == " + nativeDynamic);
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer("nativeDynamic == " + nativeDynamic);
         }
 
         return Boolean.valueOf(nativeDynamic);
--- a/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java	Wed Jul 05 17:01:52 2017 +0200
@@ -35,18 +35,19 @@
 import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.logging.Logger;
 import java.util.Properties;
 import java.util.Scanner;
 import sun.awt.FontConfiguration;
 import sun.awt.FontDescriptor;
 import sun.awt.SunToolkit;
+import sun.awt.X11FontManager;
 import sun.font.CompositeFontDescriptor;
 import sun.font.FontManager;
-import sun.font.FontManager.FontConfigInfo;
-import sun.font.FontManager.FcCompFont;
-import sun.font.FontManager.FontConfigFont;
+import sun.font.FontConfigManager.FontConfigInfo;
+import sun.font.FontConfigManager.FcCompFont;
+import sun.font.FontConfigManager.FontConfigFont;
 import sun.java2d.SunGraphicsEnvironment;
+import sun.util.logging.PlatformLogger;
 
 public class FcFontConfiguration extends FontConfiguration {
 
@@ -68,16 +69,16 @@
 
     private FcCompFont[] fcCompFonts = null;
 
-    public FcFontConfiguration(SunGraphicsEnvironment environment) {
-        super(environment);
+    public FcFontConfiguration(SunFontManager fm) {
+        super(fm);
         init();
     }
 
     /* This isn't called but is needed to satisfy super-class contract. */
-    public FcFontConfiguration(SunGraphicsEnvironment environment,
+    public FcFontConfiguration(SunFontManager fm,
                                boolean preferLocaleFonts,
                                boolean preferPropFonts) {
-        super(environment, preferLocaleFonts, preferPropFonts);
+        super(fm, preferLocaleFonts, preferPropFonts);
         init();
     }
 
@@ -89,24 +90,23 @@
 
         setFontConfiguration();
         readFcInfo();
+        X11FontManager fm = (X11FontManager) fontManager;
+        FontConfigManager fcm = fm.getFontConfigManager();
         if (fcCompFonts == null) {
-            fcCompFonts = FontManager.loadFontConfig();
+            fcCompFonts = fcm.loadFontConfig();
             if (fcCompFonts != null) {
                 try {
                     writeFcInfo();
                 } catch (Exception e) {
-                    if (SunGraphicsEnvironment.debugFonts) {
-                        Logger logger =
-                            Logger.getLogger("sun.awt.FontConfiguration");
-                        logger.warning("Exception writing fcInfo " + e);
+                    if (FontUtilities.debugFonts()) {
+                        warning("Exception writing fcInfo " + e);
                     }
                 }
-            } else if (SunGraphicsEnvironment.debugFonts) {
-                Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
-                logger.warning("Failed to get info from libfontconfig");
+            } else if (FontUtilities.debugFonts()) {
+                warning("Failed to get info from libfontconfig");
             }
         } else {
-            FontManager.populateFontConfig(fcCompFonts);
+            fcm.populateFontConfig(fcCompFonts);
         }
 
         if (fcCompFonts == null) {
@@ -184,7 +184,9 @@
     @Override
     public String[] getPlatformFontNames() {
         HashSet<String> nameSet = new HashSet<String>();
-        FcCompFont[] fcCompFonts = FontManager.loadFontConfig();
+        X11FontManager fm = (X11FontManager) fontManager;
+        FontConfigManager fcm = fm.getFontConfigManager();
+        FcCompFont[] fcCompFonts = fcm.loadFontConfig();
         for (int i=0; i<fcCompFonts.length; i++) {
             for (int j=0; j<fcCompFonts[i].allFonts.length; j++) {
                 nameSet.add(fcCompFonts[i].allFonts[j].fontFile);
@@ -223,7 +225,9 @@
     @Override
     public CompositeFontDescriptor[] get2DCompositeFontInfo() {
 
-        FcCompFont[] fcCompFonts = FontManager.loadFontConfig();
+        X11FontManager fm = (X11FontManager) fontManager;
+        FontConfigManager fcm = fm.getFontConfigManager();
+        FcCompFont[] fcCompFonts = fcm.loadFontConfig();
 
         CompositeFontDescriptor[] result =
                 new CompositeFontDescriptor[NUM_FONTS * NUM_STYLES];
@@ -321,9 +325,8 @@
                 osVersion = getVersionString(f);
             }
         } catch (Exception e) {
-            if (SunGraphicsEnvironment.debugFonts) {
-                Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
-                logger.warning("Exception identifying Linux distro.");
+            if (FontUtilities.debugFonts()) {
+                warning("Exception identifying Linux distro.");
             }
         }
     }
@@ -356,7 +359,9 @@
     private void writeFcInfo() {
         Properties props = new Properties();
         props.setProperty("version", fileVersion);
-        FontConfigInfo fcInfo = FontManager.getFontConfigInfo();
+        X11FontManager fm = (X11FontManager) fontManager;
+        FontConfigManager fcm = fm.getFontConfigManager();
+        FontConfigInfo fcInfo = fcm.getFontConfigInfo();
         props.setProperty("fcversion", Integer.toString(fcInfo.fcVersion));
         if (fcInfo.cacheDirs != null) {
             for (int i=0;i<fcInfo.cacheDirs.length;i++) {
@@ -391,15 +396,13 @@
                       "JDK Font Configuration Generated File: *Do Not Edit*");
             fos.close();
             boolean renamed = tempFile.renameTo(fcInfoFile);
-            if (!renamed && SunGraphicsEnvironment.debugFonts) {
+            if (!renamed && FontUtilities.debugFonts()) {
                 System.out.println("rename failed");
-                Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
-                logger.warning("Failed renaming file to "+ getFcInfoFile());
+                warning("Failed renaming file to "+ getFcInfoFile());
             }
         } catch (Exception e) {
-            if (SunGraphicsEnvironment.debugFonts) {
-                Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
-                logger.warning("IOException writing to "+ getFcInfoFile());
+            if (FontUtilities.debugFonts()) {
+                warning("IOException writing to "+ getFcInfoFile());
             }
         }
     }
@@ -415,14 +418,15 @@
             return;
         }
         Properties props = new Properties();
+        X11FontManager fm = (X11FontManager) fontManager;
+        FontConfigManager fcm = fm.getFontConfigManager();
         try {
             FileInputStream fis = new FileInputStream(fcFile);
             props.load(fis);
             fis.close();
         } catch (IOException e) {
-            if (SunGraphicsEnvironment.debugFonts) {
-                Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
-                logger.warning("IOException reading from "+fcFile.toString());
+            if (FontUtilities.debugFonts()) {
+                warning("IOException reading from "+fcFile.toString());
             }
             return;
         }
@@ -439,15 +443,12 @@
             try {
                 fcVersion = Integer.parseInt(fcVersionStr);
                 if (fcVersion != 0 &&
-                    fcVersion != FontManager.getFontConfigVersion()) {
+                    fcVersion != fcm.getFontConfigVersion()) {
                     return;
                 }
             } catch (Exception e) {
-                if (SunGraphicsEnvironment.debugFonts) {
-                    Logger logger =
-                        Logger.getLogger("sun.awt.FontConfiguration");
-                    logger.warning("Exception parsing version " +
-                                   fcVersionStr);
+                if (FontUtilities.debugFonts()) {
+                    warning("Exception parsing version " + fcVersionStr);
                 }
                 return;
             }
@@ -509,10 +510,14 @@
             }
             fcCompFonts = fci;
         } catch (Throwable t) {
-            if (SunGraphicsEnvironment.debugFonts) {
-                Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
-                logger.warning(t.toString());
+            if (FontUtilities.debugFonts()) {
+                warning(t.toString());
             }
         }
     }
+
+    private static void warning(String msg) {
+        PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
+        logger.warning(msg);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/sun/font/FontConfigManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,472 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.util.Locale;
+
+import sun.awt.SunHints;
+import sun.awt.SunToolkit;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * Small utility class to manage FontConfig.
+ */
+public class FontConfigManager {
+
+    static boolean fontConfigFailed = false;
+
+    /* This is populated by native */
+    private static final FontConfigInfo fcInfo = new FontConfigInfo();
+
+    /* Begin support for GTK Look and Feel - query libfontconfig and
+     * return a composite Font to Swing that uses the desktop font(s).
+     */
+
+    /* These next three classes are just data structures.
+     */
+    public static class FontConfigFont {
+        public String familyName;        // eg Bitstream Vera Sans
+        public String styleStr;          // eg Bold
+        public String fullName;          // eg Bitstream Vera Sans Bold
+        public String fontFile;          // eg /usr/X11/lib/fonts/foo.ttf
+    }
+
+    public static class FcCompFont {
+        public String fcName;            // eg sans
+        public String fcFamily;          // eg sans
+        public String jdkName;           // eg sansserif
+        public int style;                // eg 0=PLAIN
+        public FontConfigFont firstFont;
+        public FontConfigFont[] allFonts;
+        //boolean preferBitmaps;    // if embedded bitmaps preferred over AA
+        public CompositeFont compFont;   // null if not yet created/known.
+    }
+
+    public static class FontConfigInfo {
+        public int fcVersion;
+        public String[] cacheDirs = new String[4];
+    }
+
+    /* fontconfig recognises slants roman, italic, as well as oblique,
+     * and a slew of weights, where the ones that matter here are
+     * regular and bold.
+     * To fully qualify what we want, we can for example ask for (eg)
+     * Font.PLAIN             : "serif:regular:roman"
+     * Font.BOLD              : "serif:bold:roman"
+     * Font.ITALIC            : "serif:regular:italic"
+     * Font.BOLD|Font.ITALIC  : "serif:bold:italic"
+     */
+    private static String[] fontConfigNames = {
+        "sans:regular:roman",
+        "sans:bold:roman",
+        "sans:regular:italic",
+        "sans:bold:italic",
+
+        "serif:regular:roman",
+        "serif:bold:roman",
+        "serif:regular:italic",
+        "serif:bold:italic",
+
+        "monospace:regular:roman",
+        "monospace:bold:roman",
+        "monospace:regular:italic",
+        "monospace:bold:italic",
+    };
+
+    /* This array has the array elements created in Java code and is
+     * passed down to native to be filled in.
+     */
+    private FcCompFont[] fontConfigFonts;
+
+    /**
+     * Instantiates a new FontConfigManager getting the default instance
+     * of FontManager from the FontManagerFactory.
+     */
+    public FontConfigManager() {
+    }
+
+    public static String[] getFontConfigNames() {
+        return fontConfigNames;
+    }
+
+    /* Called from code that needs to know what are the AA settings
+     * that apps using FC would pick up for the default desktop font.
+     * Note apps can change the default desktop font. etc, so this
+     * isn't certain to be right but its going to correct for most cases.
+     * Native return values map to the text aa values in sun.awt.SunHints.
+     * which is used to look up the renderinghint value object.
+     */
+    public static Object getFontConfigAAHint() {
+        return getFontConfigAAHint("sans");
+    }
+
+    /* This is public solely so that for debugging purposes it can be called
+     * with other names, which might (eg) include a size, eg "sans-24"
+     * The return value is a text aa rendering hint value.
+     * Normally we should call the no-args version.
+     */
+    public static Object getFontConfigAAHint(String fcFamily) {
+        if (FontUtilities.isWindows) {
+            return null;
+        } else {
+            int hint = getFontConfigAASettings(getFCLocaleStr(), fcFamily);
+            if (hint < 0) {
+                return null;
+            } else {
+                return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
+                                          hint);
+            }
+        }
+    }
+
+
+    private static String getFCLocaleStr() {
+        Locale l = SunToolkit.getStartupLocale();
+        String localeStr = l.getLanguage();
+        String country = l.getCountry();
+        if (!country.equals("")) {
+            localeStr = localeStr + "-" + country;
+        }
+        return localeStr;
+    }
+
+    /* This does cause the native libfontconfig to be loaded and unloaded,
+     * but it does not incur the overhead of initialisation of its
+     * data structures, so shouldn't have a measurable impact.
+     */
+    public static native int getFontConfigVersion();
+
+    /* This can be made public if it's needed to force a re-read
+     * rather than using the cached values. The re-read would be needed
+     * only if some event signalled that the fontconfig has changed.
+     * In that event this method would need to return directly the array
+     * to be used by the caller in case it subsequently changed.
+     */
+    public synchronized void initFontConfigFonts(boolean includeFallbacks) {
+
+        if (fontConfigFonts != null) {
+            if (!includeFallbacks || (fontConfigFonts[0].allFonts != null)) {
+                return;
+            }
+        }
+
+        if (FontUtilities.isWindows || fontConfigFailed) {
+            return;
+        }
+
+        long t0 = 0;
+        if (FontUtilities.isLogging()) {
+            t0 = System.nanoTime();
+        }
+
+        String[] fontConfigNames = FontConfigManager.getFontConfigNames();
+        FcCompFont[] fontArr = new FcCompFont[fontConfigNames.length];
+
+        for (int i = 0; i< fontArr.length; i++) {
+            fontArr[i] = new FcCompFont();
+            fontArr[i].fcName = fontConfigNames[i];
+            int colonPos = fontArr[i].fcName.indexOf(':');
+            fontArr[i].fcFamily = fontArr[i].fcName.substring(0, colonPos);
+            fontArr[i].jdkName = FontUtilities.mapFcName(fontArr[i].fcFamily);
+            fontArr[i].style = i % 4; // depends on array order.
+        }
+        getFontConfig(getFCLocaleStr(), fcInfo, fontArr, includeFallbacks);
+        FontConfigFont anyFont = null;
+        /* If don't find anything (eg no libfontconfig), then just return */
+        for (int i = 0; i< fontArr.length; i++) {
+            FcCompFont fci = fontArr[i];
+            if (fci.firstFont == null) {
+                if (FontUtilities.isLogging()) {
+                    PlatformLogger logger = FontUtilities.getLogger();
+                    logger.info("Fontconfig returned no font for " +
+                                fontArr[i].fcName);
+                }
+                fontConfigFailed = true;
+            } else if (anyFont == null) {
+                anyFont = fci.firstFont;
+            }
+        }
+
+        if (anyFont == null) {
+            if (FontUtilities.isLogging()) {
+                PlatformLogger logger = FontUtilities.getLogger();
+                logger.info("Fontconfig returned no fonts at all.");
+                return;
+            }
+        } else if (fontConfigFailed) {
+            for (int i = 0; i< fontArr.length; i++) {
+                if (fontArr[i].firstFont == null) {
+                    fontArr[i].firstFont = anyFont;
+                }
+            }
+        }
+
+        fontConfigFonts = fontArr;
+
+        if (FontUtilities.isLogging()) {
+
+            PlatformLogger logger = FontUtilities.getLogger();
+
+            long t1 = System.nanoTime();
+            logger.info("Time spent accessing fontconfig="
+                        + ((t1 - t0) / 1000000) + "ms.");
+
+            for (int i = 0; i< fontConfigFonts.length; i++) {
+                FcCompFont fci = fontConfigFonts[i];
+                logger.info("FC font " + fci.fcName+" maps to family " +
+                            fci.firstFont.familyName +
+                            " in file " + fci.firstFont.fontFile);
+                if (fci.allFonts != null) {
+                    for (int f=0;f<fci.allFonts.length;f++) {
+                        FontConfigFont fcf = fci.allFonts[f];
+                        logger.info("Family=" + fcf.familyName +
+                                    " Style="+ fcf.styleStr +
+                                    " Fullname="+fcf.fullName +
+                                    " File="+fcf.fontFile);
+                    }
+                }
+            }
+        }
+    }
+
+    public PhysicalFont registerFromFcInfo(FcCompFont fcInfo) {
+
+        SunFontManager fm = SunFontManager.getInstance();
+
+        /* If it's a TTC file we need to know that as we will need to
+         * make sure we return the right font */
+        String fontFile = fcInfo.firstFont.fontFile;
+        int offset = fontFile.length()-4;
+        if (offset <= 0) {
+            return null;
+        }
+        String ext = fontFile.substring(offset).toLowerCase();
+        boolean isTTC = ext.equals(".ttc");
+
+        /* If this file is already registered, can just return its font.
+         * However we do need to check in case it's a TTC as we need
+         * a specific font, so rather than directly returning it, let
+         * findFont2D resolve that.
+         */
+        PhysicalFont physFont = fm.getRegisteredFontFile(fontFile);
+        if (physFont != null) {
+            if (isTTC) {
+                Font2D f2d = fm.findFont2D(fcInfo.firstFont.familyName,
+                                           fcInfo.style,
+                                           FontManager.NO_FALLBACK);
+                if (f2d instanceof PhysicalFont) { /* paranoia */
+                    return (PhysicalFont)f2d;
+                } else {
+                    return null;
+                }
+            } else {
+                return physFont;
+            }
+        }
+
+        /* If the font may hide a JRE font (eg fontconfig says it is
+         * Lucida Sans), we want to use the JRE version, so make it
+         * point to the JRE font.
+         */
+        physFont = fm.findJREDeferredFont(fcInfo.firstFont.familyName,
+                                          fcInfo.style);
+
+        /* It is also possible the font file is on the "deferred" list,
+         * in which case we can just initialise it now.
+         */
+        if (physFont == null &&
+            fm.isDeferredFont(fontFile) == true) {
+            physFont = fm.initialiseDeferredFont(fcInfo.firstFont.fontFile);
+            /* use findFont2D to get the right font from TTC's */
+            if (physFont != null) {
+                if (isTTC) {
+                    Font2D f2d = fm.findFont2D(fcInfo.firstFont.familyName,
+                                               fcInfo.style,
+                                               FontManager.NO_FALLBACK);
+                    if (f2d instanceof PhysicalFont) { /* paranoia */
+                        return (PhysicalFont)f2d;
+                    } else {
+                        return null;
+                    }
+                } else {
+                    return physFont;
+                }
+            }
+        }
+
+        /* In the majority of cases we reach here, and need to determine
+         * the type and rank to register the font.
+         */
+        if (physFont == null) {
+            int fontFormat = SunFontManager.FONTFORMAT_NONE;
+            int fontRank = Font2D.UNKNOWN_RANK;
+
+            if (ext.equals(".ttf") || isTTC) {
+                fontFormat = SunFontManager.FONTFORMAT_TRUETYPE;
+                fontRank = Font2D.TTF_RANK;
+            } else if (ext.equals(".pfa") || ext.equals(".pfb")) {
+                fontFormat = SunFontManager.FONTFORMAT_TYPE1;
+                fontRank = Font2D.TYPE1_RANK;
+            }
+            physFont = fm.registerFontFile(fcInfo.firstFont.fontFile, null,
+                                      fontFormat, true, fontRank);
+        }
+        return physFont;
+    }
+
+    /*
+     * We need to return a Composite font which has as the font in
+     * its first slot one obtained from fontconfig.
+     */
+    public CompositeFont getFontConfigFont(String name, int style) {
+
+        name = name.toLowerCase();
+
+        initFontConfigFonts(false);
+
+        FcCompFont fcInfo = null;
+        for (int i=0; i<fontConfigFonts.length; i++) {
+            if (name.equals(fontConfigFonts[i].fcFamily) &&
+                style == fontConfigFonts[i].style) {
+                fcInfo = fontConfigFonts[i];
+                break;
+            }
+        }
+        if (fcInfo == null) {
+            fcInfo = fontConfigFonts[0];
+        }
+
+        if (FontUtilities.isLogging()) {
+            FontUtilities.getLogger()
+                          .info("FC name=" + name + " style=" + style +
+                                " uses " + fcInfo.firstFont.familyName +
+                                " in file: " + fcInfo.firstFont.fontFile);
+        }
+
+        if (fcInfo.compFont != null) {
+            return fcInfo.compFont;
+        }
+
+        /* jdkFont is going to be used for slots 1..N and as a fallback.
+         * Slot 0 will be the physical font from fontconfig.
+         */
+        FontManager fm = FontManagerFactory.getInstance();
+        CompositeFont jdkFont = (CompositeFont)
+            fm.findFont2D(fcInfo.jdkName, style, FontManager.LOGICAL_FALLBACK);
+
+        if (fcInfo.firstFont.familyName == null ||
+            fcInfo.firstFont.fontFile == null) {
+            return (fcInfo.compFont = jdkFont);
+        }
+
+        /* First, see if the family and exact style is already registered.
+         * If it is, use it. If it's not, then try to register it.
+         * If that registration fails (signalled by null) just return the
+         * regular JDK composite.
+         * Algorithmically styled fonts won't match on exact style, so
+         * will fall through this code, but the regisration code will
+         * find that file already registered and return its font.
+         */
+        FontFamily family = FontFamily.getFamily(fcInfo.firstFont.familyName);
+        PhysicalFont physFont = null;
+        if (family != null) {
+            Font2D f2D = family.getFontWithExactStyleMatch(fcInfo.style);
+            if (f2D instanceof PhysicalFont) {
+                physFont = (PhysicalFont)f2D;
+            }
+        }
+
+        if (physFont == null ||
+            !fcInfo.firstFont.fontFile.equals(physFont.platName)) {
+            physFont = registerFromFcInfo(fcInfo);
+            if (physFont == null) {
+                return (fcInfo.compFont = jdkFont);
+            }
+            family = FontFamily.getFamily(physFont.getFamilyName(null));
+        }
+
+        /* Now register the fonts in the family (the other styles) after
+         * checking that they aren't already registered and are actually in
+         * a different file. They may be the same file in CJK cases.
+         * For cases where they are different font files - eg as is common for
+         * Latin fonts, then we rely on fontconfig to report these correctly.
+         * Assume that all styles of this font are found by fontconfig,
+         * so we can find all the family members which must be registered
+         * together to prevent synthetic styling.
+         */
+        for (int i=0; i<fontConfigFonts.length; i++) {
+            FcCompFont fc = fontConfigFonts[i];
+            if (fc != fcInfo &&
+                physFont.getFamilyName(null).equals(fc.firstFont.familyName) &&
+                !fc.firstFont.fontFile.equals(physFont.platName) &&
+                family.getFontWithExactStyleMatch(fc.style) == null) {
+
+                registerFromFcInfo(fontConfigFonts[i]);
+            }
+        }
+
+        /* Now we have a physical font. We will back this up with the JDK
+         * logical font (sansserif, serif, or monospaced) that corresponds
+         * to the Pango/GTK/FC logical font name.
+         */
+        return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
+    }
+
+    /**
+     *
+     * @param locale
+     * @param fcFamily
+     * @return
+     */
+    public FcCompFont[] getFontConfigFonts() {
+        return fontConfigFonts;
+    }
+
+    /* Return an array of FcCompFont structs describing the primary
+     * font located for each of fontconfig/GTK/Pango's logical font names.
+     */
+    private static native void getFontConfig(String locale,
+                                             FontConfigInfo fcInfo,
+                                             FcCompFont[] fonts,
+                                             boolean includeFallbacks);
+
+    void populateFontConfig(FcCompFont[] fcInfo) {
+        fontConfigFonts = fcInfo;
+    }
+
+    FcCompFont[] loadFontConfig() {
+        initFontConfigFonts(true);
+        return fontConfigFonts;
+    }
+
+    FontConfigInfo getFontConfigInfo() {
+        initFontConfigFonts(true);
+        return fcInfo;
+    }
+
+    private static native int
+    getFontConfigAASettings(String locale, String fcFamily);
+}
--- a/jdk/src/solaris/classes/sun/font/NativeFont.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/font/NativeFont.java	Wed Jul 05 17:01:52 2017 +0200
@@ -242,7 +242,8 @@
                 mapper = new NativeGlyphMapper(this);
             } else {
                 /* we need to delegate */
-                delegateFont = FontManager.getDefaultPhysicalFont();
+                SunFontManager fm = SunFontManager.getInstance();
+                delegateFont = fm.getDefaultPhysicalFont();
                 mapper = delegateFont.getMapper();
             }
         }
@@ -254,7 +255,8 @@
             return new NativeStrike(this, desc);
         } else {
             if (delegateFont == null) {
-                delegateFont = FontManager.getDefaultPhysicalFont();
+                SunFontManager fm = SunFontManager.getInstance();
+                delegateFont = fm.getDefaultPhysicalFont();
             }
             /* If no FileFont's are found, delegate font may be
              * a NativeFont, so we need to avoid recursing here.
@@ -314,7 +316,8 @@
 
     PhysicalFont getDelegateFont() {
         if (delegateFont == null) {
-            delegateFont = FontManager.getDefaultPhysicalFont();
+            SunFontManager fm = SunFontManager.getInstance();
+            delegateFont = fm.getDefaultPhysicalFont();
         }
         return delegateFont;
     }
--- a/jdk/src/solaris/classes/sun/font/NativeStrike.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/font/NativeStrike.java	Wed Jul 05 17:01:52 2017 +0200
@@ -112,11 +112,12 @@
          double scale = Math.abs(desc.devTx.getScaleX());
          pScalerContext = createScalerContext(nameBytes, ptSize, scale);
          if (pScalerContext == 0L) {
-             FontManager.deRegisterBadFont(nativeFont);
+             SunFontManager.getInstance().deRegisterBadFont(nativeFont);
              pScalerContext = createNullScalerContext();
              numGlyphs = 0;
-             if (FontManager.logging) {
-                 FontManager.logger.severe("Could not create native strike " +
+             if (FontUtilities.isLogging()) {
+                 FontUtilities.getLogger()
+                                   .severe("Could not create native strike " +
                                            new String(nameBytes));
              }
              return;
@@ -134,7 +135,7 @@
      private boolean usingIntGlyphImages() {
          if (intGlyphImages != null) {
             return true;
-        } else if (FontManager.longAddresses) {
+        } else if (longAddresses) {
             return false;
         } else {
             /* We could obtain minGlyphIndex and index relative to that
@@ -153,7 +154,7 @@
      }
 
      private long[] getLongGlyphImages() {
-        if (longGlyphImages == null && FontManager.longAddresses) {
+        if (longGlyphImages == null && longAddresses) {
 
             /* We could obtain minGlyphIndex and index relative to that
              * if we need to save space.
--- a/jdk/src/solaris/classes/sun/net/www/protocol/http/NTLMAuthentication.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/net/www/protocol/http/NTLMAuthentication.java	Wed Jul 05 17:01:52 2017 +0200
@@ -244,13 +244,6 @@
         }
     }
 
-    /* This is a no-op for NTLM, because there is no authentication information
-     * provided by the server to the client
-     */
-    public void checkResponse (String header, String method, URL url) throws IOException {
-    }
-
-
     private void copybytes (byte[] dest, int destpos, String src, String enc) {
         try {
             byte[] x = src.getBytes(enc);
--- a/jdk/src/solaris/classes/sun/print/IPPPrintService.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/classes/sun/print/IPPPrintService.java	Wed Jul 05 17:01:52 2017 +0200
@@ -661,9 +661,10 @@
                 }
             }
         } else if (category == OrientationRequested.class) {
-            if (flavor.equals(DocFlavor.INPUT_STREAM.POSTSCRIPT) ||
-                flavor.equals(DocFlavor.URL.POSTSCRIPT) ||
-                flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT)) {
+            if ((flavor != null) &&
+                (flavor.equals(DocFlavor.INPUT_STREAM.POSTSCRIPT) ||
+                 flavor.equals(DocFlavor.URL.POSTSCRIPT) ||
+                 flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT))) {
                 return null;
             }
 
--- a/jdk/src/solaris/native/sun/awt/fontpath.c	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/solaris/native/sun/awt/fontpath.c	Wed Jul 05 17:01:52 2017 +0200
@@ -150,15 +150,26 @@
     static jboolean isLocalSet = False;
     jboolean ret;
 
-    if (isLocalSet) {
-        return isLocal;
+    if (! isLocalSet) {
+      jclass geCls = (*env)->FindClass(env, "java/awt/GraphicsEnvironment");
+      jmethodID getLocalGE = (*env)->GetStaticMethodID(env, geCls,
+                                                 "getLocalGraphicsEnvironment",
+                                           "()Ljava/awt/GraphicsEnvironment;");
+      jobject ge = (*env)->CallStaticObjectMethod(env, geCls, getLocalGE);
+
+      jclass sgeCls = (*env)->FindClass(env,
+                                        "sun/java2d/SunGraphicsEnvironment");
+      if ((*env)->IsInstanceOf(env, ge, sgeCls)) {
+        jmethodID isDisplayLocal = (*env)->GetMethodID(env, sgeCls,
+                                                       "isDisplayLocal",
+                                                       "()Z");
+        isLocal = (*env)->CallBooleanMethod(env, ge, isDisplayLocal);
+      } else {
+        isLocal = True;
+      }
+      isLocalSet = True;
     }
 
-    isLocal = JNU_CallStaticMethodByName(env, NULL,
-                                         "sun/awt/X11GraphicsEnvironment",
-                                         "_isDisplayLocal",
-                                         "()Z").z;
-    isLocalSet = True;
     return isLocal;
 }
 
@@ -516,8 +527,8 @@
     return path;
 }
 
-JNIEXPORT jstring JNICALL Java_sun_font_FontManager_getFontPath
-(JNIEnv *env, jclass obj, jboolean noType1) {
+JNIEXPORT jstring JNICALL Java_sun_awt_X11FontManager_getFontPath
+(JNIEnv *env, jobject thiz, jboolean noType1) {
     jstring ret;
     static char *ptr = NULL; /* retain result across calls */
 
@@ -564,7 +575,7 @@
 }
 #endif /* !HEADLESS */
 
-JNIEXPORT void JNICALL Java_sun_font_FontManager_setNativeFontPath
+JNIEXPORT void JNICALL Java_sun_font_X11FontManager_setNativeFontPath
 (JNIEnv *env, jclass obj, jstring theString) {
 #ifdef HEADLESS
     return;
@@ -592,21 +603,6 @@
 #endif
 }
 
-/* This isn't yet used on unix, the implementation is added since shared
- * code calls this method in preparation for future use.
- */
-/* Obtain all the fontname -> filename mappings.
- * This is called once and the results returned to Java code which can
- * use it for lookups to reduce or avoid the need to search font files.
- */
-JNIEXPORT void JNICALL
-Java_sun_font_FontManager_populateFontFileNameMap
-(JNIEnv *env, jclass obj, jobject fontToFileMap,
- jobject fontToFamilyMap, jobject familyToFontListMap, jobject locale)
-{
-    return;
-}
-
 #include <dlfcn.h>
 #ifndef __linux__ /* i.e. is solaris */
 #include <link.h>
@@ -865,7 +861,7 @@
 #define TEXT_AA_LCD_VBGR 7
 
 JNIEXPORT jint JNICALL
-Java_sun_font_FontManager_getFontConfigAASettings
+Java_sun_font_FontConfigManager_getFontConfigAASettings
 (JNIEnv *env, jclass obj, jstring localeStr, jstring fcNameStr) {
 
     FcNameParseFuncType FcNameParse;
@@ -975,7 +971,7 @@
 }
 
 JNIEXPORT jint JNICALL
-Java_sun_font_FontManager_getFontConfigVersion
+Java_sun_font_FontConfigManager_getFontConfigVersion
     (JNIEnv *env, jclass obj) {
 
     void* libfontconfig;
@@ -1000,7 +996,7 @@
 
 
 JNIEXPORT void JNICALL
-Java_sun_font_FontManager_getFontConfig
+Java_sun_font_FontConfigManager_getFontConfig
 (JNIEnv *env, jclass obj, jstring localeStr, jobject fcInfoObj,
  jobjectArray fcCompFontArray,  jboolean includeFallbacks) {
 
@@ -1034,11 +1030,11 @@
     char* debugMinGlyphsStr = getenv("J2D_DEBUG_MIN_GLYPHS");
 
     jclass fcInfoClass =
-        (*env)->FindClass(env, "sun/font/FontManager$FontConfigInfo");
+        (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigInfo");
     jclass fcCompFontClass =
-        (*env)->FindClass(env, "sun/font/FontManager$FcCompFont");
+        (*env)->FindClass(env, "sun/font/FontConfigManager$FcCompFont");
     jclass fcFontClass =
-         (*env)->FindClass(env, "sun/font/FontManager$FontConfigFont");
+         (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigFont");
 
     if (fcInfoObj == NULL || fcCompFontArray == NULL || fcInfoClass == NULL ||
         fcCompFontClass == NULL || fcFontClass == NULL) {
@@ -1054,11 +1050,11 @@
                                   "fcName", "Ljava/lang/String;");
     fcFirstFontID =
         (*env)->GetFieldID(env, fcCompFontClass, "firstFont",
-                           "Lsun/font/FontManager$FontConfigFont;");
+                           "Lsun/font/FontConfigManager$FontConfigFont;");
 
     fcAllFontsID =
         (*env)->GetFieldID(env, fcCompFontClass, "allFonts",
-                           "[Lsun/font/FontManager$FontConfigFont;");
+                           "[Lsun/font/FontConfigManager$FontConfigFont;");
 
     fcFontCons = (*env)->GetMethodID(env, fcFontClass, "<init>", "()V");
 
@@ -1207,11 +1203,7 @@
          * Inspect the returned fonts and the ones we like (adds enough glyphs)
          * are added to the arrays and we increment 'fontCount'.
          */
-        if (includeFallbacks) {
-            nfonts = fontset->nfont;
-        } else {
-            nfonts = 1;
-        }
+        nfonts = fontset->nfont;
         family   = (FcChar8**)calloc(nfonts, sizeof(FcChar8*));
         styleStr = (FcChar8**)calloc(nfonts, sizeof(FcChar8*));
         fullname = (FcChar8**)calloc(nfonts, sizeof(FcChar8*));
@@ -1253,7 +1245,7 @@
              * adversely affects load time for minimal value-add.
              * This is still likely far more than we've had in the past.
              */
-            if (nfonts==10) {
+            if (j==10) {
                 minGlyphs = 50;
             }
             if (unionCharset == NULL) {
@@ -1272,6 +1264,9 @@
             (*FcPatternGetString)(fontPattern, FC_FAMILY, 0, &family[j]);
             (*FcPatternGetString)(fontPattern, FC_STYLE, 0, &styleStr[j]);
             (*FcPatternGetString)(fontPattern, FC_FULLNAME, 0, &fullname[j]);
+            if (!includeFallbacks) {
+                break;
+            }
         }
 
         /* Once we get here 'fontCount' is the number of returned fonts
@@ -1313,6 +1308,8 @@
                 }
                 if (includeFallbacks) {
                     (*env)->SetObjectArrayElement(env, fcFontArr, fn++,fcFont);
+                } else {
+                    break;
                 }
             }
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/windows/classes/sun/awt/Win32FontManager.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,280 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+
+package sun.awt;
+
+import java.awt.FontFormatException;
+import java.awt.GraphicsEnvironment;
+import java.io.File;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+
+import sun.awt.Win32GraphicsEnvironment;
+import sun.awt.windows.WFontConfiguration;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
+import sun.font.TrueTypeFont;
+import sun.java2d.HeadlessGraphicsEnvironment;
+import sun.java2d.SunGraphicsEnvironment;
+
+/**
+ * The X11 implementation of {@link FontManager}.
+ */
+public class Win32FontManager extends SunFontManager {
+
+    private static String[] defaultPlatformFont = null;
+
+    private static TrueTypeFont eudcFont;
+
+    static {
+
+        AccessController.doPrivileged(new PrivilegedAction() {
+
+                public Object run() {
+                    String eudcFile = getEUDCFontFile();
+                    if (eudcFile != null) {
+                        try {
+                            eudcFont = new TrueTypeFont(eudcFile, null, 0,
+                                                        true);
+                        } catch (FontFormatException e) {
+                        }
+                    }
+                    return null;
+                }
+
+            });
+    }
+
+    /* Used on Windows to obtain from the windows registry the name
+     * of a file containing the system EUFC font. If running in one of
+     * the locales for which this applies, and one is defined, the font
+     * defined by this file is appended to all composite fonts as a
+     * fallback component.
+     */
+    private static native String getEUDCFontFile();
+
+    public Win32FontManager() {
+        super();
+        AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+
+                    /* Register the JRE fonts so that the native platform can
+                     * access them. This is used only on Windows so that when
+                     * printing the printer driver can access the fonts.
+                     */
+                    registerJREFontsWithPlatform(jreFontDirName);
+                    return null;
+                }
+            });
+    }
+
+    /* Unlike the shared code version, this expects a base file name -
+     * not a full path name.
+     * The font configuration file has base file names and the FontConfiguration
+     * class reports these back to the GraphicsEnvironment, so these
+     * are the componentFileNames of CompositeFonts.
+     */
+    protected void registerFontFile(String fontFileName, String[] nativeNames,
+                                    int fontRank, boolean defer) {
+
+        // REMIND: case compare depends on platform
+        if (registeredFontFiles.contains(fontFileName)) {
+            return;
+        }
+        registeredFontFiles.add(fontFileName);
+
+        int fontFormat;
+        if (getTrueTypeFilter().accept(null, fontFileName)) {
+            fontFormat = SunFontManager.FONTFORMAT_TRUETYPE;
+        } else if (getType1Filter().accept(null, fontFileName)) {
+            fontFormat = SunFontManager.FONTFORMAT_TYPE1;
+        } else {
+            /* on windows we don't use/register native fonts */
+            return;
+        }
+
+        if (fontPath == null) {
+            fontPath = getPlatformFontPath(noType1Font);
+        }
+
+        /* Look in the JRE font directory first.
+         * This is playing it safe as we would want to find fonts in the
+         * JRE font directory ahead of those in the system directory
+         */
+        String tmpFontPath = jreFontDirName+File.pathSeparator+fontPath;
+        StringTokenizer parser = new StringTokenizer(tmpFontPath,
+                                                     File.pathSeparator);
+
+        boolean found = false;
+        try {
+            while (!found && parser.hasMoreTokens()) {
+                String newPath = parser.nextToken();
+                File theFile = new File(newPath, fontFileName);
+                if (theFile.canRead()) {
+                    found = true;
+                    String path = theFile.getAbsolutePath();
+                    if (defer) {
+                        registerDeferredFont(fontFileName, path,
+                                             nativeNames,
+                                             fontFormat, true,
+                                             fontRank);
+                    } else {
+                        registerFontFile(path, nativeNames,
+                                         fontFormat, true,
+                                         fontRank);
+                    }
+                    break;
+                }
+            }
+        } catch (NoSuchElementException e) {
+            System.err.println(e);
+        }
+        if (!found) {
+            addToMissingFontFileList(fontFileName);
+        }
+    }
+
+    @Override
+    protected FontConfiguration createFontConfiguration() {
+
+       FontConfiguration fc = new WFontConfiguration(this);
+       fc.init();
+       return fc;
+    }
+
+    @Override
+    public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
+            boolean preferPropFonts) {
+
+        return new WFontConfiguration(this,
+                                      preferLocaleFonts,preferPropFonts);
+    }
+
+    protected void
+        populateFontFileNameMap(HashMap<String,String> fontToFileMap,
+                                HashMap<String,String> fontToFamilyNameMap,
+                                HashMap<String,ArrayList<String>>
+                                familyToFontListMap,
+                                Locale locale) {
+
+        populateFontFileNameMap0(fontToFileMap, fontToFamilyNameMap,
+                                 familyToFontListMap, locale);
+
+    }
+
+    private static native void
+        populateFontFileNameMap0(HashMap<String,String> fontToFileMap,
+                                 HashMap<String,String> fontToFamilyNameMap,
+                                 HashMap<String,ArrayList<String>>
+                                     familyToFontListMap,
+                                 Locale locale);
+
+    public synchronized native String getFontPath(boolean noType1Fonts);
+
+    public String[] getDefaultPlatformFont() {
+
+        if (defaultPlatformFont != null) {
+            return defaultPlatformFont;
+        }
+
+        String[] info = new String[2];
+        info[0] = "Arial";
+        info[1] = "c:\\windows\\fonts";
+        final String[] dirs = getPlatformFontDirs(true);
+        if (dirs.length > 1) {
+            String dir = (String)
+                AccessController.doPrivileged(new PrivilegedAction() {
+                        public Object run() {
+                            for (int i=0; i<dirs.length; i++) {
+                                String path =
+                                    dirs[i] + File.separator + "arial.ttf";
+                                File file = new File(path);
+                                if (file.exists()) {
+                                    return dirs[i];
+                                }
+                            }
+                            return null;
+                        }
+                    });
+            if (dir != null) {
+                info[1] = dir;
+            }
+        } else {
+            info[1] = dirs[0];
+        }
+        info[1] = info[1] + File.separator + "arial.ttf";
+        defaultPlatformFont = info;
+        return defaultPlatformFont;
+    }
+
+    /* register only TrueType/OpenType fonts
+     * Because these need to be registed just for use when printing,
+     * we defer the actual registration and the static initialiser
+     * for the printing class makes the call to registerJREFontsForPrinting()
+     */
+    static String fontsForPrinting = null;
+    protected void registerJREFontsWithPlatform(String pathName) {
+        fontsForPrinting = pathName;
+    }
+
+    public static void registerJREFontsForPrinting() {
+        final String pathName;
+        synchronized (Win32GraphicsEnvironment.class) {
+            GraphicsEnvironment.getLocalGraphicsEnvironment();
+            if (fontsForPrinting == null) {
+                return;
+            }
+            pathName = fontsForPrinting;
+            fontsForPrinting = null;
+        }
+        java.security.AccessController.doPrivileged(
+            new java.security.PrivilegedAction() {
+                public Object run() {
+                    File f1 = new File(pathName);
+                    String[] ls = f1.list(SunFontManager.getInstance().
+                            getTrueTypeFilter());
+                    if (ls == null) {
+                        return null;
+                    }
+                    for (int i=0; i <ls.length; i++ ) {
+                        File fontFile = new File(f1, ls[i]);
+                        registerFontWithPlatform(fontFile.getAbsolutePath());
+                    }
+                    return null;
+                }
+         });
+    }
+
+    protected static native void registerFontWithPlatform(String fontName);
+
+    protected static native void deRegisterFontWithPlatform(String fontName);
+
+}
--- a/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java	Wed Jul 05 17:01:52 2017 +0200
@@ -43,6 +43,8 @@
 import sun.awt.windows.WPrinterJob;
 import sun.awt.windows.WToolkit;
 import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.SunFontManager;
 import sun.java2d.SunGraphicsEnvironment;
 import sun.java2d.SurfaceManagerFactory;
 import sun.java2d.WindowsSurfaceManagerFactory;
@@ -68,7 +70,6 @@
         // setup flags before initializing native layer
         WindowsFlags.initFlags();
         initDisplayWrapper();
-        eudcFontFileName = getEUDCFontFile();
 
         // Install correct surface manager factory.
         SurfaceManagerFactory.setInstance(new WindowsSurfaceManagerFactory());
@@ -211,14 +212,6 @@
  * ----END DISPLAY CHANGE SUPPORT----
  */
 
-    /* Used on Windows to obtain from the windows registry the name
-     * of a file containing the system EUFC font. If running in one of
-     * the locales for which this applies, and one is defined, the font
-     * defined by this file is appended to all composite fonts as a
-     * fallback component.
-     */
-    private static native String getEUDCFontFile();
-
     /**
      * Whether registerFontFile expects absolute or relative
      * font file names.
@@ -227,114 +220,6 @@
         return false;
     }
 
-    /* Unlike the shared code version, this expects a base file name -
-     * not a full path name.
-     * The font configuration file has base file names and the FontConfiguration
-     * class reports these back to the GraphicsEnvironment, so these
-     * are the componentFileNames of CompositeFonts.
-     */
-    protected void registerFontFile(String fontFileName, String[] nativeNames,
-                                    int fontRank, boolean defer) {
-
-        // REMIND: case compare depends on platform
-        if (registeredFontFiles.contains(fontFileName)) {
-            return;
-        }
-        registeredFontFiles.add(fontFileName);
-
-        int fontFormat;
-        if (ttFilter.accept(null, fontFileName)) {
-            fontFormat = FontManager.FONTFORMAT_TRUETYPE;
-        } else if (t1Filter.accept(null, fontFileName)) {
-            fontFormat = FontManager.FONTFORMAT_TYPE1;
-        } else {
-            /* on windows we don't use/register native fonts */
-            return;
-        }
-
-        if (fontPath == null) {
-            fontPath = getPlatformFontPath(noType1Font);
-        }
-
-        /* Look in the JRE font directory first.
-         * This is playing it safe as we would want to find fonts in the
-         * JRE font directory ahead of those in the system directory
-         */
-        String tmpFontPath = jreFontDirName+File.pathSeparator+fontPath;
-        StringTokenizer parser = new StringTokenizer(tmpFontPath,
-                                                     File.pathSeparator);
-
-        boolean found = false;
-        try {
-            while (!found && parser.hasMoreTokens()) {
-                String newPath = parser.nextToken();
-                boolean ujr = newPath.equals(jreFontDirName);
-                File theFile = new File(newPath, fontFileName);
-                if (theFile.canRead()) {
-                    found = true;
-                    String path = theFile.getAbsolutePath();
-                    if (defer) {
-                        FontManager.registerDeferredFont(fontFileName, path,
-                                                         nativeNames,
-                                                         fontFormat, ujr,
-                                                         fontRank);
-                    } else {
-                        FontManager.registerFontFile(path, nativeNames,
-                                                     fontFormat, ujr,
-                                                     fontRank);
-                    }
-                    break;
-                }
-            }
-        } catch (NoSuchElementException e) {
-            System.err.println(e);
-        }
-        if (!found) {
-            addToMissingFontFileList(fontFileName);
-        }
-    }
-
-    /* register only TrueType/OpenType fonts
-     * Because these need to be registed just for use when printing,
-     * we defer the actual registration and the static initialiser
-     * for the printing class makes the call to registerJREFontsForPrinting()
-     */
-    static String fontsForPrinting = null;
-    protected void registerJREFontsWithPlatform(String pathName) {
-        fontsForPrinting = pathName;
-    }
-
-    public static void registerJREFontsForPrinting() {
-        final String pathName;
-        synchronized (Win32GraphicsEnvironment.class) {
-            GraphicsEnvironment.getLocalGraphicsEnvironment();
-            if (fontsForPrinting == null) {
-                return;
-            }
-            pathName = fontsForPrinting;
-            fontsForPrinting = null;
-        }
-        java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
-                public Object run() {
-                    File f1 = new File(pathName);
-                    String[] ls = f1.list(new TTFilter());
-                    if (ls == null) {
-                        return null;
-                    }
-                    for (int i=0; i <ls.length; i++ ) {
-                        File fontFile = new File(f1, ls[i]);
-                        registerFontWithPlatform(fontFile.getAbsolutePath());
-                    }
-                    return null;
-                }
-         });
-    }
-
-    protected static native void registerFontWithPlatform(String fontName);
-
-    protected static native void deRegisterFontWithPlatform(String fontName);
-
     protected GraphicsDevice makeScreenDevice(int screennum) {
         GraphicsDevice device = null;
         if (WindowsFlags.isD3DEnabled()) {
@@ -348,7 +233,7 @@
 
     // Implements SunGraphicsEnvironment.createFontConfiguration.
     protected FontConfiguration createFontConfiguration() {
-       FontConfiguration fc = new WFontConfiguration(this);
+       FontConfiguration fc = new WFontConfiguration(SunFontManager.getInstance());
        fc.init();
        return fc;
     }
@@ -356,7 +241,12 @@
     public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
                                                      boolean preferPropFonts) {
 
-        return new WFontConfiguration(this, preferLocaleFonts,preferPropFonts);
+        return new WFontConfiguration(SunFontManager.getInstance(),
+                preferLocaleFonts,preferPropFonts);
+    }
+
+    public boolean isDisplayLocal() {
+        return true;
     }
 
     @Override
@@ -394,11 +284,6 @@
         isDWMCompositionEnabled = enabled;
     }
 
-    @Override
-    public boolean isDisplayLocal() {
-        return true;
-    }
-
     /**
      * Used to find out if the OS is Windows Vista or later.
      *
--- a/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Wed Jul 05 17:01:52 2017 +0200
@@ -922,7 +922,7 @@
     // Dispose the HICON
     private static native void disposeIcon(long hIcon);
 
-    public static native int[] getFileChooserBitmapBits();
+    static native int[] getStandardViewButton0(int iconIndex);
 
     // Should be called from the COM thread
     private long getIShellIcon() {
@@ -933,34 +933,6 @@
         return pIShellIcon;
     }
 
-
-    static int[] fileChooserBitmapBits = null;
-    static Image[] fileChooserIcons = new Image[47];
-
-    static Image getFileChooserIcon(int i) {
-        if (fileChooserIcons[i] != null) {
-            return fileChooserIcons[i];
-        } else {
-            if (fileChooserBitmapBits == null) {
-                fileChooserBitmapBits = getFileChooserBitmapBits();
-            }
-            if (fileChooserBitmapBits != null) {
-                int nImages = fileChooserBitmapBits.length / (16*16);
-                int[] bitmapBits = new int[16 * 16];
-                for (int y = 0; y < 16; y++) {
-                    for (int x = 0; x < 16; x++) {
-                        bitmapBits[y * 16 + x] = fileChooserBitmapBits[y * (nImages * 16) + (i * 16) + x];
-                    }
-                }
-                BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
-                img.setRGB(0, 0, 16, 16, bitmapBits, 0, 16);
-                fileChooserIcons[i] = img;
-            }
-        }
-        return fileChooserIcons[i];
-    }
-
-
     private static Image makeIcon(long hIcon, boolean getLargeIcon) {
         if (hIcon != 0L && hIcon != -1L) {
             // Get the bits.  This has the side effect of setting the imageHash value for this object.
--- a/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Wed Jul 05 17:01:52 2017 +0200
@@ -25,7 +25,8 @@
 
 package sun.awt.shell;
 
-import java.awt.Toolkit;
+import java.awt.*;
+import java.awt.image.BufferedImage;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -33,6 +34,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
+import java.util.List;
 import java.util.concurrent.*;
 
 import sun.security.action.LoadLibraryAction;
@@ -98,6 +100,29 @@
         return parent;
     }
 
+    private static final int VIEW_LIST = 2;
+    private static final int VIEW_DETAILS = 3;
+    private static final int VIEW_PARENTFOLDER = 8;
+    private static final int VIEW_NEWFOLDER = 11;
+
+    private static final Image[] STANDARD_VIEW_BUTTONS = new Image[12];
+
+    private static Image getStandardViewButton(int iconIndex) {
+        Image result = STANDARD_VIEW_BUTTONS[iconIndex];
+
+        if (result != null) {
+            return result;
+        }
+
+        BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
+
+        img.setRGB(0, 0, 16, 16, Win32ShellFolder2.getStandardViewButton0(iconIndex), 0, 16);
+
+        STANDARD_VIEW_BUTTONS[iconIndex] = img;
+
+        return img;
+    }
+
     // Special folders
     private static Win32ShellFolder2 desktop;
     private static Win32ShellFolder2 drives;
@@ -105,12 +130,6 @@
     private static Win32ShellFolder2 network;
     private static Win32ShellFolder2 personal;
 
-    private static final boolean USE_SHELL32_ICONS = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
-        public Boolean run() {
-            return OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_XP) >= 0;
-        }
-    });
-
     static Win32ShellFolder2 getDesktop() {
         if (desktop == null) {
             try {
@@ -206,9 +225,9 @@
      *    folders, such as Desktop, Documents, History, Network, Home, etc.
      *    This is used in the shortcut panel of the filechooser on Windows 2000
      *    and Windows Me.
-     *  "fileChooserIcon nn":
-     *    Returns an <code>Image</code> - icon nn from resource 216 in shell32.dll,
-     *      or if not found there from resource 124 in comctl32.dll (Windows only).
+     *  "fileChooserIcon <icon>":
+     *    Returns an <code>Image</code> - icon can be ListView, DetailsView, UpFolder, NewFolder or
+     *    ViewMenu (Windows only).
      *  "optionPaneIcon iconName":
      *    Returns an <code>Image</code> - icon from the system icon list
      *
@@ -303,26 +322,23 @@
             }
             return folders.toArray(new File[folders.size()]);
         } else if (key.startsWith("fileChooserIcon ")) {
-            int i = -1;
-            String name = key.substring(key.indexOf(" ")+1);
-            try {
-                i = Integer.parseInt(name);
-            } catch (NumberFormatException ex) {
-                if (name.equals("ListView")) {
-                    i = (USE_SHELL32_ICONS) ? 21 : 2;
-                } else if (name.equals("DetailsView")) {
-                    i = (USE_SHELL32_ICONS) ? 23 : 3;
-                } else if (name.equals("UpFolder")) {
-                    i = (USE_SHELL32_ICONS) ? 28 : 8;
-                } else if (name.equals("NewFolder")) {
-                    i = (USE_SHELL32_ICONS) ? 31 : 11;
-                } else if (name.equals("ViewMenu")) {
-                    i = (USE_SHELL32_ICONS) ? 21 : 2;
-                }
+            String name = key.substring(key.indexOf(" ") + 1);
+
+            int iconIndex;
+
+            if (name.equals("ListView") || name.equals("ViewMenu")) {
+                iconIndex = VIEW_LIST;
+            } else if (name.equals("DetailsView")) {
+                iconIndex = VIEW_DETAILS;
+            } else if (name.equals("UpFolder")) {
+                iconIndex = VIEW_PARENTFOLDER;
+            } else if (name.equals("NewFolder")) {
+                iconIndex = VIEW_NEWFOLDER;
+            } else {
+                return null;
             }
-            if (i >= 0) {
-                return Win32ShellFolder2.getFileChooserIcon(i);
-            }
+
+            return getStandardViewButton(iconIndex);
         } else if (key.startsWith("optionPaneIcon ")) {
             Win32ShellFolder2.SystemIcon iconType;
             if (key == "optionPaneIcon Error") {
--- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -59,8 +59,7 @@
 import java.awt.dnd.peer.DropTargetPeer;
 import sun.awt.ComponentAccessor;
 
-import java.util.logging.*;
-
+import sun.util.logging.PlatformLogger;
 
 public abstract class WComponentPeer extends WObjectPeer
     implements ComponentPeer, DropTargetPeer
@@ -70,9 +69,9 @@
      */
     protected volatile long hwnd;
 
-    private static final Logger log = Logger.getLogger("sun.awt.windows.WComponentPeer");
-    private static final Logger shapeLog = Logger.getLogger("sun.awt.windows.shape.WComponentPeer");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.windows.focus.WComponentPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WComponentPeer");
+    private static final PlatformLogger shapeLog = PlatformLogger.getLogger("sun.awt.windows.shape.WComponentPeer");
+    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.windows.focus.WComponentPeer");
 
     // ComponentPeer implementation
     SurfaceData surfaceData;
@@ -178,10 +177,10 @@
     void dynamicallyLayoutContainer() {
         // If we got the WM_SIZING, this must be a Container, right?
         // In fact, it must be the top-level Container.
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             Container parent = WToolkit.getNativeContainer((Component)target);
             if (parent != null) {
-                log.log(Level.FINE, "Assertion (parent == null) failed");
+                log.fine("Assertion (parent == null) failed");
             }
         }
         final Container cont = (Container)target;
@@ -283,14 +282,14 @@
             paintArea.add(r, e.getID());
         }
 
-        if (log.isLoggable(Level.FINEST)) {
+        if (log.isLoggable(PlatformLogger.FINEST)) {
             switch(e.getID()) {
             case PaintEvent.UPDATE:
-                log.log(Level.FINEST, "coalescePaintEvent: UPDATE: add: x = " +
+                log.finest("coalescePaintEvent: UPDATE: add: x = " +
                     r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
                 return;
             case PaintEvent.PAINT:
-                log.log(Level.FINEST, "coalescePaintEvent: PAINT: add: x = " +
+                log.finest("coalescePaintEvent: PAINT: add: x = " +
                     r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
                 return;
             }
@@ -360,7 +359,7 @@
     }
 
     void handleJavaFocusEvent(FocusEvent fe) {
-        if (focusLog.isLoggable(Level.FINER)) focusLog.finer(fe.toString());
+        if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(fe.toString());
         setFocus(fe.getID() == FocusEvent.FOCUS_GAINED);
     }
 
@@ -641,7 +640,7 @@
           case WKeyboardFocusManagerPeer.SNFH_FAILURE:
               return false;
           case WKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
-              if (focusLog.isLoggable(Level.FINER)) {
+              if (focusLog.isLoggable(PlatformLogger.FINER)) {
                   focusLog.finer("Proceeding with request to " + lightweightChild + " in " + target);
               }
               Window parentWindow = SunToolkit.getContainingWindow((Component)target);
@@ -654,7 +653,7 @@
               }
               boolean res = wpeer.requestWindowFocus(cause);
 
-              if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Requested window focus: " + res);
+              if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Requested window focus: " + res);
               // If parent window can be made focused and has been made focused(synchronously)
               // then we can proceed with children, otherwise we retreat.
               if (!(res && parentWindow.isFocused())) {
@@ -674,7 +673,7 @@
     }
 
     private boolean rejectFocusRequestHelper(String logMsg) {
-        if (focusLog.isLoggable(Level.FINER)) focusLog.finer(logMsg);
+        if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(logMsg);
         WKeyboardFocusManagerPeer.removeLastFocusRequest((Component)target);
         return false;
     }
@@ -1017,7 +1016,7 @@
      * @since 1.7
      */
     public void applyShape(Region shape) {
-        if (shapeLog.isLoggable(Level.FINER)) {
+        if (shapeLog.isLoggable(PlatformLogger.FINER)) {
             shapeLog.finer(
                     "*** INFO: Setting shape: PEER: " + this
                     + "; TARGET: " + target
--- a/jdk/src/windows/classes/sun/awt/windows/WDesktopProperties.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WDesktopProperties.java	Wed Jul 05 17:01:52 2017 +0200
@@ -34,8 +34,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.SunToolkit;
 
@@ -54,7 +53,7 @@
  * itself when running on a Windows platform.
  */
 class WDesktopProperties {
-    private static final Logger log = Logger.getLogger("sun.awt.windows.WDesktopProperties");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WDesktopProperties");
     private static final String PREFIX = "win.";
     private static final String FILE_PREFIX = "awt.file.";
     private static final String PROP_NAMES = "win.propNames";
@@ -111,7 +110,7 @@
      */
     private synchronized void setBooleanProperty(String key, boolean value) {
         assert( key != null );
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(key + "=" + String.valueOf(value));
         }
         map.put(key, Boolean.valueOf(value));
@@ -122,7 +121,7 @@
      */
     private synchronized void setIntegerProperty(String key, int value) {
         assert( key != null );
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(key + "=" + String.valueOf(value));
         }
         map.put(key, Integer.valueOf(value));
@@ -133,7 +132,7 @@
      */
     private synchronized void setStringProperty(String key, String value) {
         assert( key != null );
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(key + "=" + value);
         }
         map.put(key, value);
@@ -145,7 +144,7 @@
     private synchronized void setColorProperty(String key, int r, int g, int b) {
         assert( key != null && r <= 255 && g <=255 && b <= 255 );
         Color color = new Color(r, g, b);
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(key + "=" + color);
         }
         map.put(key, color);
@@ -173,14 +172,14 @@
             name = mappedName;
         }
         Font    font = new Font(name, style, size);
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(key + "=" + font);
         }
         map.put(key, font);
 
         String sizeKey = key + ".height";
         Integer iSize = Integer.valueOf(size);
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(sizeKey + "=" + iSize);
         }
         map.put(sizeKey, iSize);
@@ -193,7 +192,7 @@
         assert( key != null && winEventName != null );
 
         Runnable soundRunnable = new WinPlaySound(winEventName);
-        if (log.isLoggable(Level.FINE)) {
+        if (log.isLoggable(PlatformLogger.FINE)) {
             log.fine(key + "=" + soundRunnable);
         }
         map.put(key, soundRunnable);
--- a/jdk/src/windows/classes/sun/awt/windows/WFontConfiguration.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WFontConfiguration.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,6 +29,8 @@
 import java.util.Hashtable;
 import sun.awt.FontDescriptor;
 import sun.awt.FontConfiguration;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
 import sun.java2d.SunGraphicsEnvironment;
 import java.nio.charset.*;
 
@@ -37,16 +39,16 @@
     // whether compatibility fallbacks for TimesRoman and Co. are used
     private boolean useCompatibilityFallbacks;
 
-    public WFontConfiguration(SunGraphicsEnvironment environment) {
-        super(environment);
+    public WFontConfiguration(SunFontManager fm) {
+        super(fm);
         useCompatibilityFallbacks = "windows-1252".equals(encoding);
         initTables(encoding);
     }
 
-    public WFontConfiguration(SunGraphicsEnvironment environment,
+    public WFontConfiguration(SunFontManager fm,
                               boolean preferLocaleFonts,
                               boolean preferPropFonts) {
-        super(environment, preferLocaleFonts, preferPropFonts);
+        super(fm, preferLocaleFonts, preferPropFonts);
         useCompatibilityFallbacks = "windows-1252".equals(encoding);
     }
 
--- a/jdk/src/windows/classes/sun/awt/windows/WMenuItemPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WMenuItemPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -31,11 +31,10 @@
 import java.awt.event.ActionEvent;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
 
 class WMenuItemPeer extends WObjectPeer implements MenuItemPeer {
-    private static final Logger log = Logger.getLogger("sun.awt.WMenuItemPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.WMenuItemPeer");
 
     static {
         initIDs();
@@ -166,8 +165,8 @@
                         ResourceBundle rb = ResourceBundle.getBundle("sun.awt.windows.awtLocalization");
                         return Font.decode(rb.getString("menuFont"));
                     } catch (MissingResourceException e) {
-                        if (log.isLoggable(Level.FINE)) {
-                            log.log(Level.FINE, "WMenuItemPeer: " + e.getMessage()+". Using default MenuItem font.", e);
+                        if (log.isLoggable(PlatformLogger.FINE)) {
+                            log.fine("WMenuItemPeer: " + e.getMessage()+". Using default MenuItem font.", e);
                         }
                         return new Font("SanSerif", Font.PLAIN, 11);
                     }
--- a/jdk/src/windows/classes/sun/awt/windows/WPanelPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WPanelPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,11 +30,9 @@
 import java.util.Vector;
 
 import sun.awt.SunGraphicsCallback;
-import java.util.logging.*;
 
 class WPanelPeer extends WCanvasPeer implements PanelPeer {
 
-    private static final Logger log = Logger.getLogger("sun.awt.windows.WPanelPeer");
     // ComponentPeer overrides
 
     public void paint(Graphics g) {
--- a/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java	Wed Jul 05 17:01:52 2017 +0200
@@ -64,7 +64,7 @@
 import sun.font.CharToGlyphMapper;
 import sun.font.CompositeFont;
 import sun.font.Font2D;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
 import sun.font.PhysicalFont;
 import sun.font.TrueTypeFont;
 
@@ -119,6 +119,7 @@
      *                       this graphics context.
      * @since      JDK1.0
      */
+    @Override
     public Graphics create() {
 
         return new WPathGraphics((Graphics2D) getDelegate().create(),
@@ -143,6 +144,7 @@
      * @see #setClip
      * @see #setComposite
      */
+    @Override
     public void draw(Shape s) {
 
         Stroke stroke = getStroke();
@@ -250,10 +252,12 @@
      * @see         java.awt.Graphics#drawChars
      * @since       JDK1.0
      */
+    @Override
     public void drawString(String str, int x, int y) {
         drawString(str, (float) x, (float) y);
     }
 
+    @Override
      public void drawString(String str, float x, float y) {
          drawString(str, x, y, getFont(), getFontRenderContext(), 0f);
      }
@@ -270,6 +274,7 @@
      * the default render context (as canDrawStringToWidth() will return
      * false. That is why it ignores the frc and width arguments.
      */
+    @Override
     protected int platformFontCount(Font font, String str) {
 
         AffineTransform deviceTransform = getTransform();
@@ -294,7 +299,7 @@
          * fail that case. Just do a quick check whether its a TrueTypeFont
          * - ie not a Type1 font etc, and let drawString() resolve the rest.
          */
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
         if (font2D instanceof CompositeFont ||
             font2D instanceof TrueTypeFont) {
             return 1;
@@ -320,14 +325,14 @@
      */
     private boolean strNeedsTextLayout(String str, Font font) {
         char[] chars = str.toCharArray();
-        boolean isComplex = FontManager.isComplexText(chars, 0, chars.length);
+        boolean isComplex = FontUtilities.isComplexText(chars, 0, chars.length);
         if (!isComplex) {
             return false;
         } else if (!useGDITextLayout) {
             return true;
         } else {
             if (preferGDITextLayout ||
-                (isXP() && FontManager.textLayoutIsCompatible(font))) {
+                (isXP() && FontUtilities.textLayoutIsCompatible(font))) {
                 return false;
             } else {
                 return true;
@@ -388,6 +393,7 @@
      * @see #setComposite
      * @see #setClip
      */
+    @Override
     public void drawString(String str, float x, float y,
                            Font font, FontRenderContext frc, float targetW) {
         if (str.length() == 0) {
@@ -498,7 +504,7 @@
         float awScale = getAwScale(scaleFactorX, scaleFactorY);
         int iangle = getAngle(ptx);
 
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
         if (font2D instanceof TrueTypeFont) {
             textOut(str, font, (TrueTypeFont)font2D, frc,
                     scaledFontSizeY, iangle, awScale,
@@ -549,6 +555,7 @@
     /** return true if the Graphics instance can directly print
      * this glyphvector
      */
+    @Override
     protected boolean printGlyphVector(GlyphVector gv, float x, float y) {
         /* We don't want to try to handle per-glyph transforms. GDI can't
          * handle per-glyph rotations, etc. There's no way to express it
@@ -693,7 +700,7 @@
                                    glyphAdvPos, 0,      //destination
                                    glyphPos.length/2);  //num points
 
-        Font2D font2D = FontManager.getFont2D(font);
+        Font2D font2D = FontUtilities.getFont2D(font);
         if (font2D instanceof TrueTypeFont) {
             String family = font2D.getFamilyName(null);
             int style = font.getStyle() | font2D.getStyle();
@@ -792,7 +799,7 @@
              char[] chars = str.toCharArray();
              int len = chars.length;
              GlyphVector gv = null;
-             if (!FontManager.isComplexText(chars, 0, len)) {
+             if (!FontUtilities.isComplexText(chars, 0, len)) {
                  gv = font.createGlyphVector(frc, str);
              }
              if (gv == null) {
--- a/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java	Wed Jul 05 17:01:52 2017 +0200
@@ -98,6 +98,8 @@
 import javax.print.attribute.Size2DSyntax;
 import javax.print.StreamPrintService;
 
+import sun.awt.Win32FontManager;
+
 import sun.print.RasterPrinterJob;
 import sun.print.SunAlternateMedia;
 import sun.print.SunPageSelection;
@@ -359,7 +361,7 @@
 
         initIDs();
 
-        Win32GraphicsEnvironment.registerJREFontsForPrinting();
+        Win32FontManager.registerJREFontsForPrinting();
     }
 
     /* Constructors */
--- a/jdk/src/windows/classes/sun/awt/windows/WScrollPanePeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WScrollPanePeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -29,11 +29,11 @@
 import java.awt.peer.ScrollPanePeer;
 import sun.awt.PeerEvent;
 
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
 
-    private static final Logger log = Logger.getLogger("sun.awt.windows.WScrollPanePeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WScrollPanePeer");
 
     int scrollbarWidth;
     int scrollbarHeight;
@@ -159,8 +159,8 @@
         }
 
         public PeerEvent coalesceEvents(PeerEvent newEvent) {
-            if (log.isLoggable(Level.FINEST)) {
-                log.log(Level.FINEST, "ScrollEvent coalesced: " + newEvent);
+            if (log.isLoggable(PlatformLogger.FINEST)) {
+                log.finest("ScrollEvent coalesced: " + newEvent);
             }
             if (newEvent instanceof ScrollEvent) {
                 return newEvent;
@@ -204,8 +204,8 @@
             } else if (orient == Adjustable.HORIZONTAL) {
                 adj = (ScrollPaneAdjustable)sp.getHAdjustable();
             } else {
-                if (log.isLoggable(Level.FINE)) {
-                    log.log(Level.FINE, "Assertion failed: unknown orient");
+                if (log.isLoggable(PlatformLogger.FINE)) {
+                    log.fine("Assertion failed: unknown orient");
                 }
             }
 
@@ -231,8 +231,8 @@
                   newpos = this.pos;
                   break;
               default:
-                  if (log.isLoggable(Level.FINE)) {
-                      log.log(Level.FINE, "Assertion failed: unknown type");
+                  if (log.isLoggable(PlatformLogger.FINE)) {
+                      log.fine("Assertion failed: unknown type");
                   }
                   return;
             }
@@ -258,10 +258,10 @@
             {
                 hwAncestor = hwAncestor.getParent();
             }
-            if (log.isLoggable(Level.FINE)) {
+            if (log.isLoggable(PlatformLogger.FINE)) {
                 if (hwAncestor == null) {
-                    log.log(Level.FINE, "Assertion (hwAncestor != null) failed, " +
-                            "couldn't find heavyweight ancestor of scroll pane child");
+                    log.fine("Assertion (hwAncestor != null) failed, " +
+                             "couldn't find heavyweight ancestor of scroll pane child");
                 }
             }
             WComponentPeer hwPeer = (WComponentPeer)hwAncestor.getPeer();
--- a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java	Wed Jul 05 17:01:52 2017 +0200
@@ -58,13 +58,15 @@
 import java.util.Map;
 import java.util.Properties;
 
-import java.util.logging.*;
-
+import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.SunFontManager;
 import sun.misc.PerformanceLogger;
+import sun.util.logging.PlatformLogger;
 
 public class WToolkit extends SunToolkit implements Runnable {
 
-    private static final Logger log = Logger.getLogger("sun.awt.windows.WToolkit");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WToolkit");
 
     static GraphicsConfiguration config;
 
@@ -107,8 +109,8 @@
         initIDs();
 
         // Print out which version of Windows is running
-        if (log.isLoggable(Level.FINE)) {
-            log.log(Level.FINE, "Win version: " + getWindowsVersion());
+        if (log.isLoggable(PlatformLogger.FINE)) {
+            log.fine("Win version: " + getWindowsVersion());
         }
 
         java.security.AccessController.doPrivileged(
@@ -572,8 +574,11 @@
 
 
     public FontMetrics getFontMetrics(Font font) {
-        // REMIND: platform font flag should be removed post-merlin.
-        if (sun.font.FontManager.usePlatformFontMetrics()) {
+        // This is an unsupported hack, but left in for a customer.
+        // Do not remove.
+        FontManager fm = FontManagerFactory.getInstance();
+        if (fm instanceof SunFontManager
+            && ((SunFontManager) fm).usePlatformFontMetrics()) {
             return WFontMetrics.getFontMetrics(font);
         }
         return super.getFontMetrics(font);
@@ -824,10 +829,10 @@
         lazilyInitWProps();
         Boolean prop = (Boolean) desktopProperties.get("awt.dynamicLayoutSupported");
 
-        if (log.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "In WTK.isDynamicLayoutSupported()" +
-                    "   nativeDynamic == " + nativeDynamic +
-                    "   wprops.dynamic == " + prop);
+        if (log.isLoggable(PlatformLogger.FINER)) {
+            log.finer("In WTK.isDynamicLayoutSupported()" +
+                      "   nativeDynamic == " + nativeDynamic +
+                      "   wprops.dynamic == " + prop);
         }
 
         if ((prop == null) || (nativeDynamic != prop.booleanValue())) {
@@ -862,8 +867,8 @@
         Map<String, Object> props = wprops.getProperties();
         for (String propName : props.keySet()) {
             Object val = props.get(propName);
-            if (log.isLoggable(Level.FINER)) {
-                log.log(Level.FINER, "changed " + propName + " to " + val);
+            if (log.isLoggable(PlatformLogger.FINER)) {
+                log.finer("changed " + propName + " to " + val);
             }
             setDesktopProperty(propName, val);
         }
--- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java	Wed Jul 05 17:01:52 2017 +0200
@@ -35,7 +35,7 @@
 
 import java.util.*;
 import java.util.List;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
 
 import sun.awt.*;
 
@@ -45,8 +45,8 @@
        DisplayChangedListener
 {
 
-    private static final Logger log = Logger.getLogger("sun.awt.windows.WWindowPeer");
-    private static final Logger screenLog = Logger.getLogger("sun.awt.windows.screen.WWindowPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WWindowPeer");
+    private static final PlatformLogger screenLog = PlatformLogger.getLogger("sun.awt.windows.screen.WWindowPeer");
 
     // we can't use WDialogPeer as blocker may be an instance of WPrintDialogPeer that
     // extends WWindowPeer, not WDialogPeer
@@ -440,8 +440,8 @@
 
     public void updateGC() {
         int scrn = getScreenImOn();
-        if (screenLog.isLoggable(Level.FINER)) {
-            log.log(Level.FINER, "Screen number: " + scrn);
+        if (screenLog.isLoggable(PlatformLogger.FINER)) {
+            log.finer("Screen number: " + scrn);
         }
 
         // get current GD
@@ -465,9 +465,9 @@
         // is now mostly on.
         winGraphicsConfig = (Win32GraphicsConfig)newDev
                             .getDefaultConfiguration();
-        if (screenLog.isLoggable(Level.FINE)) {
+        if (screenLog.isLoggable(PlatformLogger.FINE)) {
             if (winGraphicsConfig == null) {
-                screenLog.log(Level.FINE, "Assertion (winGraphicsConfig != null) failed");
+                screenLog.fine("Assertion (winGraphicsConfig != null) failed");
             }
         }
 
@@ -700,9 +700,8 @@
             TranslucentWindowPainter currentPainter = painter;
             if (currentPainter != null) {
                 currentPainter.updateWindow(repaint);
-            } else if (log.isLoggable(Level.FINER)) {
-                log.log(Level.FINER,
-                        "Translucent window painter is null in updateWindow");
+            } else if (log.isLoggable(PlatformLogger.FINER)) {
+                log.finer("Translucent window painter is null in updateWindow");
             }
         }
     }
@@ -736,8 +735,8 @@
         public void propertyChange(PropertyChangeEvent e) {
             boolean isDisposed = (Boolean)e.getNewValue();
             if (isDisposed != true) {
-                if (log.isLoggable(Level.FINE)) {
-                    log.log(Level.FINE, " Assertion (newValue != true) failed for AppContext.GUI_DISPOSED ");
+                if (log.isLoggable(PlatformLogger.FINE)) {
+                    log.fine(" Assertion (newValue != true) failed for AppContext.GUI_DISPOSED ");
                 }
             }
             AppContext appContext = AppContext.getAppContext();
--- a/jdk/src/windows/classes/sun/net/www/protocol/http/NTLMAuthentication.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/net/www/protocol/http/NTLMAuthentication.java	Wed Jul 05 17:01:52 2017 +0200
@@ -192,9 +192,4 @@
         }
     }
 
-    /* This is a no-op for NTLM, because there is no authentication information
-     * provided by the server to the client
-     */
-    public void checkResponse (String header, String method, URL url) throws IOException {
-    }
 }
--- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Kinit.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Kinit.java	Wed Jul 05 17:01:52 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -252,15 +252,15 @@
                 }
                 KRBError error = ke.getError();
                 int etype = error.getEType();
-                byte[] salt = error.getSalt();
+                String salt = error.getSalt();
                 byte[] s2kparams = error.getParams();
                 if (useKeytab) {
-                    as_req = new KrbAsReq(skeys, true, etype, salt, s2kparams,
-                                        opt, principal, sname,
+                    as_req = new KrbAsReq(skeys, true, etype, salt,
+                                        s2kparams, opt, principal, sname,
                                         null, null, null, null, addresses, null);
                 } else {
-                    as_req = new KrbAsReq(psswd, true, etype, salt, s2kparams,
-                                        opt, principal, sname,
+                    as_req = new KrbAsReq(psswd, true, etype, salt,
+                                        s2kparams, opt, principal, sname,
                                         null, null, null, null, addresses, null);
                 }
                 as_rep = sendASRequest(as_req, useKeytab, realm, psswd, skeys);
--- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java	Wed Jul 05 17:01:52 2017 +0200
@@ -30,17 +30,12 @@
 
 package sun.security.krb5.internal.tools;
 
+import java.net.InetAddress;
 import sun.security.krb5.*;
 import sun.security.krb5.internal.*;
 import sun.security.krb5.internal.ccache.*;
 import sun.security.krb5.internal.ktab.*;
 import sun.security.krb5.internal.crypto.EType;
-import sun.security.krb5.KrbCryptoException;
-import java.lang.RuntimeException;
-import java.io.IOException;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.File;
 
 /**
  * This class can execute as a command-line tool to list entries in
@@ -51,9 +46,9 @@
  */
 public class Klist {
     Object target;
-    // for credentials cache, options are 'f'  and 'e';
+    // for credentials cache, options are 'f', 'e', 'a' and 'n';
     // for  keytab, optionsare 't' and 'K' and 'e'
-    char[] options = new char[3];
+    char[] options = new char[4];
     String name;       // the name of credentials cache and keytable.
     char action;       // actions would be 'c' for credentials cache
     // and 'k' for keytable.
@@ -62,7 +57,7 @@
     /**
      * The main program that can be invoked at command line.
      * <br>Usage: klist
-     * [[-c] [-f] [-e]] [-k [-t] [-K]] [name]
+     * [[-c] [-f] [-e] [-a [-n]]] [-k [-t] [-K]] [name]
      * -c specifes that credential cache is to be listed
      * -k specifies that key tab is to be listed
      * name name of the credentials cache or keytab
@@ -70,6 +65,8 @@
      * <ul>
      * <li><b>-f</b>  shows credentials flags
      * <li><b>-e</b>  shows the encryption type
+     * <li><b>-a</b>  shows addresses
+     * <li><b>-n</b>  do not reverse-resolve addresses
      * </ul>
      * available options for keytabs:
      * <li><b>-t</b> shows keytab entry timestamps
@@ -141,6 +138,12 @@
                 case 'k':
                     action = 'k';
                     break;
+                case 'a':
+                    options[2] = 'a';
+                    break;
+                case 'n':
+                    options[3] = 'n';
+                    break;
                 case 'f':
                     options[1] = 'f';
                     break;
@@ -202,7 +205,7 @@
                 }
                 if (options[2] == 't') {
                     System.out.println("\t Time stamp: " +
-                                       reformat(entries[i].getTimeStamp().toDate().toString()));
+                            reformat(entries[i].getTimeStamp().toDate().toString()));
                 }
             }
         }
@@ -249,12 +252,33 @@
                     System.out.println("     Expires:         " + endtime);
                     if (options[0] == 'e') {
                         etype = EType.toString(creds[i].getEType());
-                        System.out.println("\t Encryption type: " + etype);
+                        System.out.println("     Encryption type: " + etype);
                     }
                     if (options[1] == 'f') {
-                        System.out.println("\t Flags:           " +
+                        System.out.println("     Flags:           " +
                                            creds[i].getTicketFlags().toString());
                     }
+                    if (options[2] == 'a') {
+                        boolean first = true;
+                        InetAddress[] caddr
+                                = creds[i].setKrbCreds().getClientAddresses();
+                        if (caddr != null) {
+                            for (InetAddress ia: caddr) {
+                                String out;
+                                if (options[3] == 'n') {
+                                    out = ia.getHostAddress();
+                                } else {
+                                    out = ia.getCanonicalHostName();
+                                }
+                                System.out.println("     " +
+                                        (first?"Addresses:":"          ") +
+                                        "       " + out);
+                                first = false;
+                            }
+                        } else {
+                            System.out.println("     [No host addresses info]");
+                        }
+                    }
                 } catch (RealmException e) {
                     System.out.println("Error reading principal from "+
                                        "the entry.");
@@ -295,7 +319,7 @@
      */
     void printHelp() {
         System.out.println("\nUsage: klist " +
-                           "[[-c] [-f] [-e]] [-k [-t] [-K]] [name]");
+                           "[[-c] [-f] [-e] [-a [-n]]] [-k [-t] [-K]] [name]");
         System.out.println("   name\t name of credentials cache or " +
                            " keytab with the prefix. File-based cache or "
                            + "keytab's prefix is FILE:.");
@@ -305,6 +329,8 @@
         System.out.println("   options for credentials caches:");
         System.out.println("\t-f \t shows credentials flags");
         System.out.println("\t-e \t shows the encryption type");
+        System.out.println("\t-a \t shows addresses");
+        System.out.println("\t  -n \t   do not reverse-resolve addresses");
         System.out.println("   options for keytabs:");
         System.out.println("\t-t \t shows keytab entry timestamps");
         System.out.println("\t-K \t shows keytab entry key value");
--- a/jdk/src/windows/native/sun/font/fontpath.c	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/native/sun/font/fontpath.c	Wed Jul 05 17:01:52 2017 +0200
@@ -28,12 +28,12 @@
 
 #include <jni.h>
 #include <jni_util.h>
-#include <sun_font_FontManager.h>
+#include <sun_awt_Win32FontManager.h>
 
 #define BSIZE (max(512, MAX_PATH+1))
 
 
-JNIEXPORT jstring JNICALL Java_sun_font_FontManager_getFontPath(JNIEnv *env, jclass obj, jboolean noType1)
+JNIEXPORT jstring JNICALL Java_sun_awt_Win32FontManager_getFontPath(JNIEnv *env, jobject thiz, jboolean noType1)
 {
     char windir[BSIZE];
     char sysdir[BSIZE];
@@ -68,15 +68,6 @@
     return JNU_NewStringPlatform(env, fontpath);
 }
 
-/* This isn't used on windows, the implementation is added in case shared
- * code accidentally calls this method to prevent an UnsatisfiedLinkError
- */
-JNIEXPORT void JNICALL Java_sun_font_FontManager_setNativeFontPath
-(JNIEnv *env, jclass obj, jstring theString)
-{
-    return;
-}
-
 /* The code below is used to obtain information from the windows font APIS
  * and registry on which fonts are available and what font files hold those
  * fonts. The results are used to speed font lookup.
@@ -546,7 +537,7 @@
  * use it for lookups to reduce or avoid the need to search font files.
  */
 JNIEXPORT void JNICALL
-Java_sun_font_FontManager_populateFontFileNameMap
+Java_sun_awt_Win32FontManager_populateFontFileNameMap0
 (JNIEnv *env, jclass obj, jobject fontToFileMap,
  jobject fontToFamilyMap, jobject familyToFontListMap, jobject locale)
 {
--- a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -256,7 +256,6 @@
 static IShellIcon* getIShellIcon(IShellFolder* pIShellFolder) {
     // http://msdn.microsoft.com/library/en-us/shellcc/platform/Shell/programmersguide/shell_int/shell_int_programming/std_ifaces.asp
     HRESULT hres;
-    HICON hIcon = NULL;
     IShellIcon* pIShellIcon;
     if (pIShellFolder != NULL) {
         hres = pIShellFolder->QueryInterface(IID_IShellIcon, (void**)&pIShellIcon);
@@ -965,89 +964,40 @@
 
 /*
  * Class:     sun_awt_shell_Win32ShellFolder2
- * Method:    getFileChooserBitmapBits
- * Signature: ()[I
+ * Method:    getStandardViewButton0
+ * Signature: (I)[I
  */
-JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getFileChooserBitmapBits
-    (JNIEnv* env, jclass cls)
+JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getStandardViewButton0
+    (JNIEnv* env, jclass cls, jint iconIndex)
 {
-    HBITMAP hBitmap = NULL;
-    BITMAP bm;
-    HINSTANCE libComCtl32;
-    HINSTANCE libShell32;
+    jintArray result = NULL;
 
-    libShell32 = LoadLibrary(TEXT("shell32.dll"));
-    if (libShell32 != NULL) {
-        hBitmap = (HBITMAP)LoadImage(libShell32,
-                    IS_WINVISTA ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216),
-                    IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
+    // Create a toolbar
+    HWND hWndToolbar = ::CreateWindowEx(0, TOOLBARCLASSNAME, NULL,
+        0, 0, 0, 0, 0,
+        NULL, NULL, NULL, NULL);
+
+    if (hWndToolbar != NULL) {
+        SendMessage(hWndToolbar, TB_LOADIMAGES, (WPARAM)IDB_VIEW_SMALL_COLOR, (LPARAM)HINST_COMMCTRL);
 
-        if (hBitmap == NULL) {
-            // version of shell32.dll doesn't match OS version.
-            // So we either are in a Vista Compatibility Mode
-            // or shell32.dll was copied from OS of another version
-            hBitmap = (HBITMAP)LoadImage(libShell32,
-                    IS_WINVISTA ? MAKEINTRESOURCE(216) : TEXT("IDB_TB_SH_DEF_16"),
-                    IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
+        HIMAGELIST hImageList = (HIMAGELIST) SendMessage(hWndToolbar, TB_GETIMAGELIST, 0, 0);
+
+        if (hImageList != NULL) {
+            HICON hIcon = ImageList_GetIcon(hImageList, iconIndex, ILD_TRANSPARENT);
+
+            if (hIcon != NULL) {
+                result = Java_sun_awt_shell_Win32ShellFolder2_getIconBits(env, cls, ptr_to_jlong(hIcon), 16);
+
+                DestroyIcon(hIcon);
+            }
+
+            ImageList_Destroy(hImageList);
         }
-    }
-    if (hBitmap == NULL) {
-        libComCtl32 = LoadLibrary(TEXT("comctl32.dll"));
-        if (libComCtl32 != NULL) {
-            hBitmap = (HBITMAP)LoadImage(libComCtl32, MAKEINTRESOURCE(124),
-                                         IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
-        }
-    }
-    if (hBitmap == NULL) {
-        return NULL;
+
+        DestroyWindow(hWndToolbar);
     }
 
-    GetObject(hBitmap, sizeof(bm), (LPSTR)&bm);
-
-    // Get the screen DC
-    HDC dc = GetDC(NULL);
-    if (dc == NULL) {
-        return NULL;
-    }
-
-    // Set up BITMAPINFO
-    BITMAPINFO bmi;
-    memset(&bmi, 0, sizeof(BITMAPINFO));
-    bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    bmi.bmiHeader.biWidth = bm.bmWidth;
-    bmi.bmiHeader.biHeight = -bm.bmHeight;
-    bmi.bmiHeader.biPlanes = 1;
-    bmi.bmiHeader.biBitCount = 32;
-    bmi.bmiHeader.biCompression = BI_RGB;
-    // Extract the color bitmap
-    int numPixels = bm.bmWidth * bm.bmHeight;
-    //long colorBits[192 * 16];
-    long *colorBits = (long*)safe_Malloc(numPixels * sizeof(long));
-    if (GetDIBits(dc, hBitmap, 0, bm.bmHeight, colorBits, &bmi, DIB_RGB_COLORS) == 0) {
-        return NULL;
-    }
-
-    // Release DC
-    ReleaseDC(NULL, dc);
-
-    // The color of the first pixel defines the transparency, according
-    // to the documentation for LR_LOADTRANSPARENT at
-    // http://msdn.microsoft.com/library/psdk/winui/resource_9fhi.htm
-    long transparent = colorBits[0];
-    for (int i=0; i < numPixels; i++) {
-        if (colorBits[i] != transparent) {
-            colorBits[i] |= 0xff000000;
-        }
-    }
-
-    // Create java array
-    jintArray bits = env->NewIntArray(numPixels);
-    // Copy values to java array
-    env->SetIntArrayRegion(bits, 0, numPixels, colorBits);
-    // Fix 4745575 GDI Resource Leak
-    ::DeleteObject(hBitmap);
-    ::FreeLibrary(libComCtl32);
-    return bits;
+    return result;
 }
 
 /*
--- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp	Wed Jul 05 17:01:52 2017 +0200
@@ -25,6 +25,7 @@
 
 #include <awt.h>
 #include <sun_awt_Win32GraphicsEnvironment.h>
+#include <sun_awt_Win32FontManager.h>
 #include "awt_Canvas.h"
 #include "awt_Win32GraphicsDevice.h"
 #include "Devices.h"
@@ -173,14 +174,14 @@
 }
 
 /*
- * Class:     sun_awt_Win32GraphicsEnvironment
+ * Class:     sun_awt_Win32FontManager
  * Method:    registerFontWithPlatform
  * Signature: (Ljava/lang/String;)V
  */
 JNIEXPORT void JNICALL
-Java_sun_awt_Win32GraphicsEnvironment_registerFontWithPlatform(JNIEnv *env,
-                                                              jclass cl,
-                                                              jstring fontName)
+Java_sun_awt_Win32FontManager_registerFontWithPlatform(JNIEnv *env,
+                                                       jclass cl,
+                                                       jstring fontName)
 {
     LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, JNI_FALSE);
     if (file) {
@@ -191,16 +192,16 @@
 
 
 /*
- * Class:     sun_awt_Win32GraphicsEnvironment
+ * Class:     sun_awt_Win32FontManagerEnvironment
  * Method:    deRegisterFontWithPlatform
  * Signature: (Ljava/lang/String;)V
  *
  * This method intended for future use.
  */
 JNIEXPORT void JNICALL
-Java_sun_awt_Win32GraphicsEnvironment_deRegisterFontWithPlatform(JNIEnv *env,
-                                                              jclass cl,
-                                                              jstring fontName)
+Java_sun_awt_Win32FontManager_deRegisterFontWithPlatform(JNIEnv *env,
+                                                         jclass cl,
+                                                         jstring fontName)
 {
     LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, JNI_FALSE);
     if (file) {
@@ -223,7 +224,7 @@
 
 
 JNIEXPORT jstring JNICALL
-Java_sun_awt_Win32GraphicsEnvironment_getEUDCFontFile(JNIEnv *env, jclass cl) {
+Java_sun_awt_Win32FontManager_getEUDCFontFile(JNIEnv *env, jclass cl) {
     int    rc;
     HKEY   key;
     DWORD  type;
--- a/jdk/test/com/sun/jdi/ShellScaffold.sh	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/com/sun/jdi/ShellScaffold.sh	Wed Jul 05 17:01:52 2017 +0200
@@ -193,11 +193,17 @@
 {
     # Return 0 if $1 is the pid of a running process.
     if [ -z "$isWin98" ] ; then
-        #   Never use plain 'ps', which requires a "controlling terminal"
-        #     and will fail  with a "ps: no controlling terminal" error.
-        #     Running under 'rsh' will cause this ps error.
-        # cygwin ps puts an I in column 1 for some reason.
-        $psCmd -e | $grep '^I* *'"$1 " > $devnull 2>&1
+        if [ "$osname" = SunOS ] ; then
+            #Solaris and OpenSolaris use pgrep and not ps in psCmd
+            findPidCmd="$psCmd"
+        else
+            #   Never use plain 'ps', which requires a "controlling terminal"
+            #     and will fail  with a "ps: no controlling terminal" error.
+            #     Running under 'rsh' will cause this ps error.
+            # cygwin ps puts an I in column 1 for some reason.
+            findPidCmd="$psCmd -e"
+        fi
+	$findPidCmd | $grep '^I* *'"$1 " > $devnull 2>&1
         return $?
     fi
 
@@ -292,7 +298,17 @@
          # On linux, core files take a long time, and can leave
          # zombie processes
          if [ "$osname" = SunOS ] ; then
-             psCmd="/usr/ucb/ps -axwww"
+             #Experiments show Solaris '/usr/ucb/ps -axwww' and
+             #'/usr/bin/pgrep -f -l' provide the same small amount of the
+             #argv string (PRARGSZ=80 in /usr/include/sys/procfs.h)
+             # 1) This seems to have been working OK in ShellScaffold.
+             # 2) OpenSolaris does not provide /usr/ucb/ps, so use pgrep
+             #    instead
+             #The alternative would be to use /usr/bin/pargs [pid] to get
+             #all the args for a process, splice them back into one
+             #long string, then grep.
+             UU=`/usr/bin/id -un`
+             psCmd="pgrep -f -l -U $UU"
          else
              ulimit -c 0
              # See bug 6238593.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/font/TextLayout/TestSinhalaChar.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,70 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+/* @test @(#)TestSinhalaChar.java
+ * @summary verify lack of crash on U+0DDD.
+ * @bug 6795060
+ */
+
+import javax.swing.*;
+import javax.swing.border.LineBorder;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+
+public class TestSinhalaChar {
+    public static void main(String[] args) {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                new TestSinhalaChar().run();
+            }
+        });
+    }
+    public static boolean AUTOMATIC_TEST=true;  // true; run test automatically, else manually at button push
+
+    private void run() {
+        JFrame frame = new JFrame("Test Character (no crash = PASS)");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        JPanel panel = new JPanel();
+        final JLabel label = new JLabel("(empty)");
+        label.setSize(400, 100);
+        label.setBorder(new LineBorder(Color.black));
+        label.setFont(new Font("Lucida Bright", Font.PLAIN, 12));
+        if(AUTOMATIC_TEST) {  /* run the test automatically (else, manually) */
+           label.setText(Character.toString('\u0DDD'));
+        } else {
+        JButton button = new JButton("Set Char x0DDD");
+        button.addActionListener(new AbstractAction() {
+            public void actionPerformed(ActionEvent actionEvent) {
+           label.setText(Character.toString('\u0DDD'));
+            }
+        });
+        panel.add(button);
+        }
+        panel.add(label);
+
+        frame.getContentPane().add(panel);
+        frame.pack();
+        frame.setVisible(true);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/PageFormat/PageFormatFromAttributes.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4500750 6848799
+ * @summary Tests creating page format from attributes
+ * @run main PageFormatFromAttributes
+ */
+import java.awt.print.*;
+import javax.print.*;
+import javax.print.attribute.*;
+import javax.print.attribute.standard.*;
+
+public class PageFormatFromAttributes {
+
+    public static void main(String args[]) {
+        PrinterJob job = PrinterJob.getPrinterJob();
+        PrintService service = job.getPrintService();
+        if (service == null) {
+            return; // No printers
+        }
+        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
+        test(job, MediaSizeName.ISO_A4, OrientationRequested.PORTRAIT);
+        test(job, MediaSizeName.ISO_A4, OrientationRequested.LANDSCAPE);
+        test(job, MediaSizeName.ISO_A4,
+             OrientationRequested.REVERSE_LANDSCAPE);
+        test(job, MediaSizeName.ISO_A3, OrientationRequested.PORTRAIT);
+        test(job, MediaSizeName.NA_LETTER, OrientationRequested.PORTRAIT);
+        test(job, MediaSizeName.NA_LETTER, OrientationRequested.LANDSCAPE);
+        test(job, MediaSizeName.NA_LEGAL, OrientationRequested.PORTRAIT);
+    }
+
+    static void test(PrinterJob job,
+                     MediaSizeName media, OrientationRequested orient) {
+
+        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
+        aset.add(media);
+        aset.add(orient);
+
+        PrintService service = job.getPrintService();
+        if (!service.isAttributeValueSupported(media, null, aset) ||
+            !service.isAttributeValueSupported(orient, null, aset)) {
+            return; // Can't test this case.
+        }
+        PageFormat pf = job.getPageFormat(aset);
+        boolean ok = true;
+        switch (pf.getOrientation()) {
+        case PageFormat.PORTRAIT :
+            ok = orient == OrientationRequested.PORTRAIT;
+            break;
+        case PageFormat.LANDSCAPE :
+            ok = orient == OrientationRequested.LANDSCAPE;
+            break;
+        case PageFormat.REVERSE_LANDSCAPE :
+            ok = orient == OrientationRequested.REVERSE_LANDSCAPE;
+            break;
+        }
+        if (!ok) {
+            throw new RuntimeException("orientation not as specified");
+        }
+        MediaSize mediaSize = MediaSize.getMediaSizeForName(media);
+        if (mediaSize == null) {
+            throw new RuntimeException("expected a media size");
+        }
+        double units = Size2DSyntax.INCH/72.0;
+        int w = (int)(mediaSize.getX(1)/units);
+        int h = (int)(mediaSize.getY(1)/units);
+        Paper paper = pf.getPaper();
+        int pw = (int)paper.getWidth();
+        int ph = (int)paper.getHeight();
+        if (pw != w || ph != h) {
+            throw new RuntimeException("size not as specified");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/Compare.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2009 Google, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6582946
+ * @summary Test the primitive wrappers compare and compareTo methods
+ */
+
+import java.util.Random;
+
+public class Compare {
+
+    final Random rnd = new Random();
+
+    boolean toBoolean(long x) { return x > 0; }
+
+    void compareAll(long x, long y) {
+        check(Double.compare(x, y) ==
+              Double.valueOf(x).compareTo(Double.valueOf(y)));
+        check(Float.compare(x, y) ==
+              Float.valueOf(x).compareTo(Float.valueOf(y)));
+        check(Long.compare(x, y) ==
+              Long.valueOf(x).compareTo(Long.valueOf(y)));
+        check(Integer.compare((int) x, (int) y) ==
+              Integer.valueOf((int) x).compareTo(Integer.valueOf((int) y)));
+        check(Short.compare((short) x, (short) y) ==
+              Short.valueOf((short) x).compareTo(Short.valueOf((short) y)));
+        check(Character.compare((char) x, (char) y) ==
+              Character.valueOf((char) x).compareTo(Character.valueOf((char) y)));
+        check(Byte.compare((byte) x, (byte) y) ==
+              Byte.valueOf((byte) x).compareTo(Byte.valueOf((byte) y)));
+        check(Boolean.compare(toBoolean(x), toBoolean(y)) ==
+              Boolean.valueOf(toBoolean(x)).compareTo(Boolean.valueOf(toBoolean(y))));
+
+        check(Double.compare(x, y) == -Double.compare(y, x));
+        check(Float.compare(x, y) == -Float.compare(y, x));
+        check(Long.compare(x, y) == -Long.compare(y, x));
+        check(Integer.compare((int) x, (int) y) ==
+              -Integer.compare((int) y, (int) x));
+        check(Short.compare((short) x, (short) y) ==
+              -Short.compare((short) y, (short) x));
+        check(Character.compare((char) x, (char) y) ==
+              -Character.compare((char) y, (char) x));
+        check(Byte.compare((byte) x, (byte) y) ==
+              -Byte.compare((byte) y, (byte) x));
+
+        equal(Long.compare(x, y),
+              x < y ? -1 : x > y ? 1 : 0);
+
+        {
+            int a = (int) x, b = (int) y;
+            equal(Integer.compare(a, b),
+                  a < b ? -1 : a > b ? 1 : 0);
+        }
+
+        {
+            short a = (short) x, b = (short) y;
+            equal(Short.compare(a, b),
+                  a - b);
+        }
+
+        {
+            char a = (char) x, b = (char) y;
+            equal(Character.compare(a, b),
+                  a - b);
+        }
+
+        {
+            byte a = (byte) x, b = (byte) y;
+            equal(Byte.compare(a, b),
+                  a - b);
+        }
+
+        {
+            boolean a = toBoolean(x), b = toBoolean(y);
+            equal(Boolean.compare(a, b),
+                  a == b ? 0 : a ? 1 : -1);
+        }
+    }
+
+    void test(String args[]) throws Exception {
+        long[] longs = {
+            Long.MIN_VALUE,
+            Integer.MIN_VALUE,
+            Short.MIN_VALUE,
+            Character.MIN_VALUE,
+            Byte.MIN_VALUE,
+            -1, 0, 1,
+            Byte.MAX_VALUE,
+            Character.MAX_VALUE,
+            Short.MAX_VALUE,
+            Integer.MAX_VALUE,
+            Long.MAX_VALUE,
+            rnd.nextLong(),
+            rnd.nextInt(),
+        };
+
+        for (long x : longs) {
+            for (long y : longs) {
+                compareAll(x, y);
+            }
+        }
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new Compare().instanceMain(args);}
+    public void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/HashCode.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2009 Google, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4245470
+ * @summary Test the primitive wrappers hashCode()
+ */
+
+import java.util.Random;
+
+public class HashCode {
+
+    final Random rnd = new Random();
+
+    void test(String args[]) throws Exception {
+        int[] ints = {
+            Integer.MIN_VALUE,
+            Short.MIN_VALUE,
+            Character.MIN_VALUE,
+            Byte.MIN_VALUE,
+            -1, 0, 1,
+            Byte.MAX_VALUE,
+            Character.MAX_VALUE,
+            Short.MAX_VALUE,
+            Integer.MAX_VALUE,
+            rnd.nextInt(),
+        };
+
+        for (int x : ints) {
+            check(    new Long(x).hashCode() == (int)((long)x ^ (long)x>>>32));
+            check(Long.valueOf(x).hashCode() == (int)((long)x ^ (long)x>>>32));
+            check(    new Integer(x).hashCode() == x);
+            check(Integer.valueOf(x).hashCode() == x);
+            check(    new Short((short)x).hashCode() == (short) x);
+            check(Short.valueOf((short)x).hashCode() == (short) x);
+            check(    new Character((char) x).hashCode() == (char) x);
+            check(Character.valueOf((char) x).hashCode() == (char) x);
+            check(    new Byte((byte) x).hashCode() == (byte) x);
+            check(Byte.valueOf((byte) x).hashCode() == (byte) x);
+        }
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new HashCode().instanceMain(args);}
+    public void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- a/jdk/test/java/net/Authenticator/B4933582.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/java/net/Authenticator/B4933582.java	Wed Jul 05 17:01:52 2017 +0200
@@ -125,9 +125,16 @@
         firstTime = args[0].equals ("first");
         MyAuthenticator auth = new MyAuthenticator ();
         Authenticator.setDefault (auth);
-        AuthCacheValue.setAuthCache (new CacheImpl());
+        CacheImpl cache;
         try {
-            server = new HttpServer (new B4933582(), 1, 10, 5009);
+            if (firstTime) {
+                server = new HttpServer (new B4933582(), 1, 10, 0);
+                cache = new CacheImpl (server.getLocalPort());
+            } else {
+                cache = new CacheImpl ();
+                server = new HttpServer(new B4933582(), 1, 10, cache.getPort());
+            }
+            AuthCacheValue.setAuthCache (cache);
             System.out.println ("Server: listening on port: " + server.getLocalPort());
             client ("http://localhost:"+server.getLocalPort()+"/d1/foo.html");
         } catch (Exception e) {
@@ -172,8 +179,15 @@
 
     static class CacheImpl extends AuthCacheImpl {
         HashMap map;
+        int port; // need to store the port number the server is using
+
         CacheImpl () throws IOException {
+            this (-1);
+        }
+
+        CacheImpl (int port) throws IOException {
             super();
+            this.port = port;
             File src = new File ("cache.ser");
             if (src.exists()) {
                 ObjectInputStream is = new ObjectInputStream (
@@ -181,6 +195,8 @@
                 );
                 try {
                     map = (HashMap)is.readObject ();
+                    this.port = (Integer)is.readObject ();
+                    System.out.println ("read port from file " + port);
                 } catch (ClassNotFoundException e) {
                     assert false;
                 }
@@ -192,6 +208,10 @@
             setMap (map);
         }
 
+        int getPort () {
+            return port;
+        }
+
         private void writeMap () {
             try {
                 File dst = new File ("cache.ser");
@@ -203,6 +223,8 @@
                         new FileOutputStream (dst)
                 );
                 os.writeObject(map);
+                os.writeObject(port);
+                System.out.println ("wrote port " + port);
                 os.close();
             } catch (IOException e) {}
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/Authenticator/B6870935.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2001-2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6870935
+ * @run main/othervm -Dhttp.nonProxyHosts="" -Dhttp.auth.digest.validateProxy=true B6870935
+ */
+
+import java.io.*;
+import java.util.*;
+import java.net.*;
+import java.security.*;
+import sun.net.www.*;
+
+/* This is one simple test of the RFC2617 digest authentication behavior
+ * It specifically tests that the client correctly checks the returned
+ * Authentication-Info header field from the server and throws an exception
+ * if the password is wrong
+ */
+
+public class B6870935 {
+
+    static char[] passwd = "password".toCharArray();
+    static String username = "user";
+    static String nonce = "abcdefghijklmnopqrstuvwxyz";
+    static String realm = "wallyworld";
+    static String uri = "http://www.ibm.com";
+    static volatile boolean error = false;
+
+    static class DigestServer extends Thread {
+
+        ServerSocket s;
+        InputStream  is;
+        OutputStream os;
+        int port;
+
+        String reply1 = "HTTP/1.1 407 Proxy Authentication Required\r\n"+
+            "Proxy-Authenticate: Digest realm=\""+realm+"\" domain=/ "+
+            "nonce=\""+nonce+"\" qop=\"auth\"\r\n\r\n";
+
+        String reply2 = "HTTP/1.1 200 OK\r\n" +
+            "Date: Mon, 15 Jan 2001 12:18:21 GMT\r\n" +
+            "Server: Apache/1.3.14 (Unix)\r\n" +
+            "Content-Type: text/html; charset=iso-8859-1\r\n" +
+            "Transfer-encoding: chunked\r\n\r\n"+
+            "B\r\nHelloWorld1\r\n"+
+            "B\r\nHelloWorld2\r\n"+
+            "B\r\nHelloWorld3\r\n"+
+            "B\r\nHelloWorld4\r\n"+
+            "B\r\nHelloWorld5\r\n"+
+            "0\r\n"+
+            "Proxy-Authentication-Info: ";
+
+        DigestServer (ServerSocket y) {
+            s = y;
+            port = s.getLocalPort();
+        }
+
+        public void run () {
+            try {
+                Socket s1 = s.accept ();
+                is = s1.getInputStream ();
+                os = s1.getOutputStream ();
+                is.read ();
+                os.write (reply1.getBytes());
+                Thread.sleep (2000);
+                s1.close ();
+
+                s1 = s.accept ();
+                is = s1.getInputStream ();
+                os = s1.getOutputStream ();
+                is.read ();
+                // need to get the cnonce out of the response
+                MessageHeader header = new MessageHeader (is);
+                String raw = header.findValue ("Proxy-Authorization");
+                HeaderParser parser = new HeaderParser (raw);
+                String cnonce = parser.findValue ("cnonce");
+                String cnstring = parser.findValue ("nc");
+                String clientrsp = parser.findValue ("response");
+                String expected = computeDigest(
+                        true, username,passwd,realm,
+                        "GET", uri, nonce, cnonce, cnstring
+                );
+                if (!expected.equals(clientrsp)) {
+                    s1.close ();
+                    s.close ();
+                    error = true;
+                    return;
+                }
+
+                String reply = reply2 + getAuthorization (
+                        realm, false, uri, "GET", cnonce,
+                        cnstring, passwd, username
+                ) +"\r\n";
+                os.write (reply.getBytes());
+                Thread.sleep (2000);
+                s1.close ();
+            }
+            catch (Exception e) {
+                System.out.println (e);
+                e.printStackTrace();
+            }
+        }
+
+        private String getAuthorization (String realm, boolean isRequest, String uri, String method, String cnonce, String cnstring, char[] password, String username) {
+            String response;
+
+            try {
+                response = computeDigest(isRequest, username,passwd,realm,
+                                            method, uri, nonce, cnonce, cnstring);
+            } catch (NoSuchAlgorithmException ex) {
+                return null;
+            }
+
+            String value = "Digest"
+                            + " qop=\"auth"
+                            + "\", cnonce=\"" + cnonce
+                            + "\", rspauth=\"" + response
+                            + "\", nc=\"" + cnstring + "\"";
+            return (value+ "\r\n");
+        }
+
+        private String computeDigest(
+                            boolean isRequest, String userName, char[] password,
+                            String realm, String connMethod,
+                            String requestURI, String nonceString,
+                            String cnonce, String ncValue
+                        ) throws NoSuchAlgorithmException
+        {
+
+            String A1, HashA1;
+
+            MessageDigest md = MessageDigest.getInstance("MD5");
+
+            {
+                A1 = userName + ":" + realm + ":";
+                HashA1 = encode(A1, password, md);
+            }
+
+            String A2;
+            if (isRequest) {
+                A2 = connMethod + ":" + requestURI;
+            } else {
+                A2 = ":" + requestURI;
+            }
+            String HashA2 = encode(A2, null, md);
+            String combo, finalHash;
+
+            { /* RRC2617 when qop=auth */
+                combo = HashA1+ ":" + nonceString + ":" + ncValue + ":" +
+                            cnonce + ":auth:" +HashA2;
+
+            }
+            finalHash = encode(combo, null, md);
+            return finalHash;
+        }
+
+        private final static char charArray[] = {
+            '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+        };
+
+        private String encode(String src, char[] passwd, MessageDigest md) {
+            md.update(src.getBytes());
+            if (passwd != null) {
+                byte[] passwdBytes = new byte[passwd.length];
+                for (int i=0; i<passwd.length; i++)
+                    passwdBytes[i] = (byte)passwd[i];
+                md.update(passwdBytes);
+                Arrays.fill(passwdBytes, (byte)0x00);
+            }
+            byte[] digest = md.digest();
+
+            StringBuffer res = new StringBuffer(digest.length * 2);
+            for (int i = 0; i < digest.length; i++) {
+                int hashchar = ((digest[i] >>> 4) & 0xf);
+                res.append(charArray[hashchar]);
+                hashchar = (digest[i] & 0xf);
+                res.append(charArray[hashchar]);
+            }
+            return res.toString();
+        }
+    }
+
+
+    static class MyAuthenticator extends Authenticator {
+        public MyAuthenticator () {
+            super ();
+        }
+
+        public PasswordAuthentication getPasswordAuthentication ()
+        {
+            return (new PasswordAuthentication (username, passwd));
+        }
+    }
+
+
+    public static void main(String[] args) throws Exception {
+        int nLoops = 1;
+        int nSize = 10;
+        int port, n =0;
+        byte b[] = new byte[nSize];
+        DigestServer server;
+        ServerSocket sock;
+
+        try {
+            sock = new ServerSocket (0);
+            port = sock.getLocalPort ();
+        }
+        catch (Exception e) {
+            System.out.println ("Exception: " + e);
+            return;
+        }
+
+        server = new DigestServer(sock);
+        server.start ();
+
+        try  {
+
+            Authenticator.setDefault (new MyAuthenticator ());
+            SocketAddress addr = new InetSocketAddress ("127.0.0.1", port);
+            Proxy proxy = new Proxy (Proxy.Type.HTTP, addr);
+            String s = "http://www.ibm.com";
+            URL url = new URL(s);
+            java.net.URLConnection conURL =  url.openConnection(proxy);
+
+            InputStream in = conURL.getInputStream();
+            int c;
+            while ((c = in.read ()) != -1) {
+            }
+            in.close ();
+        }
+        catch(IOException e) {
+            e.printStackTrace();
+            error = true;
+        }
+        if (error) {
+            throw new RuntimeException ("Error in test");
+        }
+    }
+}
--- a/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java	Wed Jul 05 17:01:52 2017 +0200
@@ -27,7 +27,6 @@
  * @summary Re-test IPv6 (and specifically MulticastSocket) with latest Linux & USAGI code
  */
 import java.net.*;
-import java.util.concurrent.*;
 import java.util.*;
 
 
@@ -68,37 +67,61 @@
 
         // We need 2 or more network interfaces to run the test
         //
-        List<NetworkInterface> nics = new ArrayList<NetworkInterface>();
+        List<NetIf> netIfs = new ArrayList<NetIf>();
+        int index = 1;
         for (NetworkInterface nic : Collections.list(NetworkInterface.getNetworkInterfaces())) {
-            if (!nic.isLoopback())
-                nics.add(nic);
+            // we should use only network interfaces with multicast support which are in "up" state
+            if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp()) {
+                NetIf netIf = NetIf.create(nic);
+
+                // now determine what (if any) type of addresses are assigned to this interface
+                for (InetAddress addr : Collections.list(nic.getInetAddresses())) {
+                    if (addr instanceof Inet4Address) {
+                        netIf.ipv4Address(true);
+                    } else if (addr instanceof Inet6Address) {
+                        netIf.ipv6Address(true);
+                    }
+                }
+                if (netIf.ipv4Address() || netIf.ipv6Address()) {
+                    netIf.index(index++);
+                    netIfs.add(netIf);
+                    debug("Using: " + nic);
+                }
+            }
         }
-        if (nics.size() <= 1) {
+        if (netIfs.size() <= 1) {
             System.out.println("Need 2 or more network interfaces to run. Bye.");
             return;
         }
 
-        // We will send packets to one ipv4, one ipv4-mapped, and one ipv6
+        // We will send packets to one ipv4, and one ipv6
         // multicast group using each network interface :-
         //      224.1.1.1        --|
-        //      ::ffff:224.1.1.2 -----> using network interface #1
-        //      ff02::1:1        --|
+        //      ff02::1:1        --|--> using network interface #1
         //      224.1.2.1        --|
-        //      ::ffff:224.1.2.2 -----> using network interface #2
-        //      ff02::1:2        --|
+        //      ff02::1:2        --|--> using network interface #2
         // and so on.
         //
-        List<InetAddress> groups = new ArrayList<InetAddress>();
-        for (int i = 0; i < nics.size(); i++) {
-            InetAddress groupv4 = InetAddress.getByName("224.1." + (i+1) + ".1");
-            InetAddress groupv4mapped = InetAddress.getByName("::ffff:224.1." + (i+1) + ".2");
-            InetAddress groupv6 = InetAddress.getByName("ff02::1:" + (i+1));
-            groups.add(groupv4);
-            groups.add(groupv4mapped);
-            groups.add(groupv6);
+        for (NetIf netIf : netIfs) {
+            int NetIfIndex = netIf.index();
+            List<InetAddress> groups = new ArrayList<InetAddress>();
 
-            // use a separated thread to send to those 3 groups
-            Thread sender = new Thread(new Sender(nics.get(i), groupv4, groupv4mapped, groupv6, PORT));
+            if (netIf.ipv4Address()) {
+                InetAddress groupv4 = InetAddress.getByName("224.1." + NetIfIndex + ".1");
+                groups.add(groupv4);
+            }
+            if (netIf.ipv6Address()) {
+                InetAddress groupv6 = InetAddress.getByName("ff02::1:" + NetIfIndex);
+                groups.add(groupv6);
+            }
+
+            debug("Adding " + groups + " groups for " + netIf.nic().getName());
+            netIf.groups(groups);
+
+            // use a separated thread to send to those 2 groups
+            Thread sender = new Thread(new Sender(netIf,
+                                                  groups,
+                                                  PORT));
             sender.setDaemon(true); // we want sender to stop when main thread exits
             sender.start();
         }
@@ -107,75 +130,135 @@
         // from the expected network interface
         //
         byte[] buf = new byte[1024];
-        for (InetAddress group : groups) {
-        MulticastSocket mcastsock = new MulticastSocket(PORT);
-        mcastsock.setSoTimeout(5000);   // 5 second
-            DatagramPacket packet = new DatagramPacket(buf, 0, buf.length);
-
-            mcastsock.joinGroup(new InetSocketAddress(group, PORT), nics.get(groups.indexOf(group) / 3));
+        for (NetIf netIf : netIfs) {
+            NetworkInterface nic = netIf.nic();
+            for (InetAddress group : netIf.groups()) {
+                MulticastSocket mcastsock = new MulticastSocket(PORT);
+                mcastsock.setSoTimeout(5000);   // 5 second
+                DatagramPacket packet = new DatagramPacket(buf, 0, buf.length);
 
-            try {
-                mcastsock.receive(packet);
-            } catch (Exception e) {
-                // test failed if any exception
-                throw new RuntimeException(e);
-            }
+                // the interface supports the IP multicast group
+                debug("Joining " + group + " on " + nic.getName());
+                mcastsock.joinGroup(new InetSocketAddress(group, PORT), nic);
+
+                try {
+                    mcastsock.receive(packet);
+                    debug("received packet on " + packet.getAddress());
+                } catch (Exception e) {
+                    // test failed if any exception
+                    throw new RuntimeException(e);
+                }
 
-            // now check which network interface this packet comes from
-            NetworkInterface from = NetworkInterface.getByInetAddress(packet.getAddress());
-            NetworkInterface shouldbe = nics.get(groups.indexOf(group) / 3);
-            if (!from.equals(shouldbe)) {
-                System.out.println("Packets on group "
-                                    + group + " should come from "
-                                    + shouldbe.getName() + ", but came from "
-                                    + from.getName());
-                //throw new RuntimeException("Test failed.");
+                // now check which network interface this packet comes from
+                NetworkInterface from = NetworkInterface.getByInetAddress(packet.getAddress());
+                NetworkInterface shouldbe = nic;
+                if (!from.equals(shouldbe)) {
+                    System.out.println("Packets on group "
+                                        + group + " should come from "
+                                        + shouldbe.getName() + ", but came from "
+                                        + from.getName());
+                    //throw new RuntimeException("Test failed.");
+                }
+
+                mcastsock.leaveGroup(new InetSocketAddress(group, PORT), nic);
             }
+        }
+    }
 
-            mcastsock.leaveGroup(new InetSocketAddress(group, PORT), nics.get(groups.indexOf(group) / 3));
-        }
+    private static boolean debug = true;
+
+    static void debug(String message) {
+        if (debug)
+            System.out.println(message);
     }
 }
 
 class Sender implements Runnable {
-    private NetworkInterface nic;
-    private InetAddress group1;
-    private InetAddress group2;
-    private InetAddress group3;
+    private NetIf netIf;
+    private List<InetAddress> groups;
     private int port;
 
-    public Sender(NetworkInterface nic,
-                    InetAddress groupv4, InetAddress groupv4mapped, InetAddress groupv6,
-                    int port) {
-        this.nic = nic;
-        group1 = groupv4;
-        group2 = groupv4mapped;
-        group3 = groupv6;
+    public Sender(NetIf netIf,
+                  List<InetAddress> groups,
+                  int port) {
+        this.netIf = netIf;
+        this.groups = groups;
         this.port = port;
     }
 
     public void run() {
         try {
             MulticastSocket mcastsock = new MulticastSocket();
-            mcastsock.setNetworkInterface(nic);
+            mcastsock.setNetworkInterface(netIf.nic());
+            List<DatagramPacket> packets = new LinkedList<DatagramPacket>();
 
             byte[] buf = "hello world".getBytes();
-            DatagramPacket packet1 = new DatagramPacket(buf, buf.length,
-                                        new InetSocketAddress(group1, port));
-            DatagramPacket packet2 = new DatagramPacket(buf, buf.length,
-                                        new InetSocketAddress(group2, port));
-            DatagramPacket packet3 = new DatagramPacket(buf, buf.length,
-                                        new InetSocketAddress(group3, port));
+            for (InetAddress group : groups) {
+                packets.add(new DatagramPacket(buf, buf.length, new InetSocketAddress(group, port)));
+            }
 
             for (;;) {
-                mcastsock.send(packet1);
-                mcastsock.send(packet2);
-                mcastsock.send(packet3);
+                for (DatagramPacket packet : packets)
+                    mcastsock.send(packet);
 
-                Thread.currentThread().sleep(1000);   // sleep 1 second
+                Thread.sleep(1000);   // sleep 1 second
             }
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
     }
 }
+
+@SuppressWarnings("unchecked")
+class NetIf {
+    private boolean ipv4Address; //false
+    private boolean ipv6Address; //false
+    private int index;
+    List<InetAddress> groups = Collections.EMPTY_LIST;
+    private final NetworkInterface nic;
+
+    private NetIf(NetworkInterface nic) {
+        this.nic = nic;
+    }
+
+    static NetIf create(NetworkInterface nic) {
+        return new NetIf(nic);
+    }
+
+    NetworkInterface nic() {
+        return nic;
+    }
+
+    boolean ipv4Address() {
+        return ipv4Address;
+    }
+
+    void ipv4Address(boolean ipv4Address) {
+        this.ipv4Address = ipv4Address;
+    }
+
+    boolean ipv6Address() {
+        return ipv6Address;
+    }
+
+    void ipv6Address(boolean ipv6Address) {
+        this.ipv6Address = ipv6Address;
+    }
+
+    int index() {
+        return index;
+    }
+
+    void index(int index) {
+        this.index = index;
+    }
+
+    List<InetAddress> groups() {
+        return groups;
+    }
+
+    void groups(List<InetAddress> groups) {
+        this.groups = groups;
+    }
+}
+
--- a/jdk/test/java/nio/channels/Channels/Basic.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/java/nio/channels/Channels/Basic.java	Wed Jul 05 17:01:52 2017 +0200
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4417152 4481572 6248930 6725399
+ * @bug 4417152 4481572 6248930 6725399 6884800
  * @summary Test Channels basic functionality
  */
 
@@ -225,8 +225,7 @@
     private static void testNewInputStream(File blah) throws Exception {
         FileInputStream fis = new FileInputStream(blah);
         FileChannel fc = fis.getChannel();
-        ReadableByteChannel rbc = (ReadableByteChannel)fc;
-        InputStream is = Channels.newInputStream(rbc);
+        InputStream is = Channels.newInputStream(fc);
         int messageSize = message.length() * ITERATIONS * 3 + 1;
         byte bb[] = new byte[messageSize];
 
@@ -234,8 +233,13 @@
         int totalRead = 0;
         while (bytesRead != -1) {
             totalRead += bytesRead;
+            long rem = Math.min(fc.size() - totalRead, (long)Integer.MAX_VALUE);
+            if (is.available() != (int)rem)
+                throw new RuntimeException("available not useful or not maximally useful");
             bytesRead = is.read(bb, totalRead, messageSize - totalRead);
         }
+        if (is.available() != 0)
+           throw new RuntimeException("available() should return 0 at EOF");
 
         String result = new String(bb, 0, totalRead, encoding);
         int len = message.length();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComponent/4337267/bug4337267.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,254 @@
+/*
+ * @test
+ * @bug 4337267
+ * @summary test that numeric shaping works in Swing components
+ * @author Sergey Groznyh
+ * @run main bug4337267
+ */
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.font.NumericShaper;
+import java.awt.font.TextAttribute;
+import java.awt.image.BufferedImage;
+import javax.swing.BoxLayout;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+
+public class bug4337267 {
+    TestJPanel p1, p2;
+    TestBufferedImage i1, i2;
+    JComponent[] printq;
+    JFrame window;
+    static boolean testFailed = false;
+    static boolean done = false;
+
+    String shaped =
+            "000 (E) 111 (A) \u0641\u0642\u0643 \u0662\u0662\u0662 (E) 333";
+    String text = "000 (E) 111 (A) \u0641\u0642\u0643 222 (E) 333";
+
+    void run() {
+        initUI();
+        testTextComponent();
+        testNonTextComponentHTML();
+        testNonTextComponentPlain();
+
+        doneTask();
+    }
+
+    void initUI() {
+        window = new JFrame("bug4337267");
+        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        window.setSize(800, 600);
+        Component content = createContentPane();
+        window.add(content);
+        window.setVisible(true);
+    }
+
+    Runnable printComponents = new Runnable() {
+        public void run() {
+            printComponent(printq[0], i1);
+            printComponent(printq[1], i2);
+        }
+    };
+
+    Runnable compareRasters = new Runnable() {
+        public void run() {
+            assertEquals(p1.image, p2.image);
+            assertEquals(i1, i2);
+        }
+    };
+
+    void doneTask() {
+        final Object monitor = this;
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                done = true;
+                synchronized(monitor) {
+                    monitor.notify();
+                }
+            }
+        });
+    }
+
+
+    void fail(String message) {
+        testFailed = true;
+        throw new RuntimeException(message);
+    }
+
+    void assertEquals(Object o1, Object o2) {
+        if ((o1 == null) && (o2 != null)) {
+            fail("Expected null, got " + o2);
+        } else if ((o1 != null) && (o2 == null)) {
+            fail("Expected " + o1 + ", got null");
+        } else if (!o1.equals(o2)) {
+            fail("Expected " + o1 + ", got " + o2);
+        }
+    }
+
+    void testTextComponent() {
+        System.out.println("testTextComponent:");
+        JTextArea area1 = new JTextArea();
+        injectComponent(p1, area1, false);
+        area1.setText(shaped);
+        JTextArea area2 = new JTextArea();
+        injectComponent(p2, area2, true);
+        area2.setText(text);
+        window.repaint();
+        printq = new JComponent[] { area1, area2 };
+        SwingUtilities.invokeLater(printComponents);
+        SwingUtilities.invokeLater(compareRasters);
+    }
+
+    void testNonTextComponentHTML() {
+        System.out.println("testNonTextComponentHTML:");
+        JLabel label1 = new JLabel();
+        injectComponent(p1, label1, false);
+        label1.setText("<html>" + shaped);
+        JLabel label2 = new JLabel();
+        injectComponent(p2, label2, true);
+        label2.setText("<html>" + text);
+        window.repaint();
+        printq = new JComponent[] { label1, label2 };
+        SwingUtilities.invokeLater(printComponents);
+        SwingUtilities.invokeLater(compareRasters);
+    }
+
+    void testNonTextComponentPlain() {
+        System.out.println("testNonTextComponentHTML:");
+        JLabel label1 = new JLabel();
+        injectComponent(p1, label1, false);
+        label1.setText(shaped);
+        JLabel label2 = new JLabel();
+        injectComponent(p2, label2, true);
+        label2.setText(text);
+        window.repaint();
+        printq = new JComponent[] { label1, label2 };
+        SwingUtilities.invokeLater(printComponents);
+        SwingUtilities.invokeLater(compareRasters);
+    }
+
+    void setShaping(JComponent c) {
+        c.putClientProperty(TextAttribute.NUMERIC_SHAPING,
+                    NumericShaper.getContextualShaper(NumericShaper.ARABIC));
+    }
+
+    void injectComponent(JComponent p, JComponent c, boolean shape) {
+        if (shape) {
+            setShaping(c);
+        }
+        p.removeAll();
+        p.add(c);
+    }
+
+    void printComponent(JComponent c, TestBufferedImage i) {
+        Graphics g = i.getGraphics();
+        g.setColor(c.getBackground());
+        g.fillRect(0, 0, i.getWidth(), i.getHeight());
+        c.print(g);
+    }
+
+    Component createContentPane() {
+        Dimension size = new Dimension(500, 100);
+        i1 = new TestBufferedImage(size.width, size.height,
+                                                BufferedImage.TYPE_INT_ARGB);
+        i2 = new TestBufferedImage(size.width, size.height,
+                                                BufferedImage.TYPE_INT_ARGB);
+        p1 = new TestJPanel();
+        p1.setPreferredSize(size);
+        p2 = new TestJPanel();
+        p2.setPreferredSize(size);
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+        panel.add(p1);
+        panel.add(p2);
+
+        return panel;
+    }
+
+    static class TestBufferedImage extends BufferedImage {
+        int MAX_GLITCHES = 0;
+
+        TestBufferedImage(int width, int height, int imageType) {
+            super(width, height, imageType);
+        }
+
+        @Override
+        public boolean equals(Object other) {
+            if (! (other instanceof TestBufferedImage)) {
+                return false;
+            }
+            TestBufferedImage image2 = (TestBufferedImage) other;
+            int width = getWidth();
+            int height = getHeight();
+            if ((image2.getWidth() != width) || (image2.getHeight() != height)) {
+                return false;
+            }
+            int glitches = 0;
+            for (int x = 0; x < width; x++) {
+                for (int y = 0; y < height; y++) {
+                    int rgb1 = getRGB(x, y);
+                    int rgb2 = image2.getRGB(x, y);
+                    if (rgb1 != rgb2) {
+                        //System.out.println(x+" "+y+" "+rgb1+" "+rgb2);
+                        glitches++;
+                    }
+                }
+            }
+            return glitches <= MAX_GLITCHES;
+        }
+    }
+
+    static class TestJPanel extends JPanel {
+        TestBufferedImage image = createImage(new Dimension(1, 1));
+
+        TestBufferedImage createImage(Dimension d) {
+            return new TestBufferedImage(d.width, d.height,
+                                                BufferedImage.TYPE_INT_ARGB);
+        }
+
+        public void setPreferredSize(Dimension size) {
+            super.setPreferredSize(size);
+            image = createImage(size);
+        }
+
+        public void paint(Graphics g) {
+            Graphics g0 = image.getGraphics();
+            super.paint(g0);
+            g.drawImage(image, 0, 0, this);
+        }
+    }
+
+
+
+    public static void main(String[] args) throws Throwable {
+        final bug4337267 test = new bug4337267();
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                test.run();
+            }
+        });
+
+         synchronized(test) {
+            while (!done) {
+                try {
+                    test.wait();
+                } catch (InterruptedException ex) {
+                    // do nothing
+                }
+            }
+        }
+
+        if (testFailed) {
+            throw new RuntimeException("FAIL");
+        }
+
+        System.out.println("OK");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6489130/bug6489130.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6489130
+ * @summary FileChooserDemo hung by keeping pressing Enter key
+ * @author Pavel Porvatov
+   @run main bug6489130
+ */
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+public class bug6489130 {
+    private final JFileChooser chooser = new JFileChooser();
+
+    private static final CountDownLatch MUX = new CountDownLatch(1);
+
+    private final Timer timer = new Timer(1000, new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+            switch (state) {
+                case 0:
+                case 1: {
+                    SwingUtilities.invokeLater(new Runnable() {
+                        public void run() {
+                            chooser.showOpenDialog(null);
+                        }
+                    });
+
+                    break;
+                }
+
+                case 2:
+                case 3: {
+                    Window[] windows = Frame.getWindows();
+
+                    if (windows.length > 0) {
+                        windows[0].dispose();
+                    }
+
+                    break;
+                }
+
+                case 4: {
+                    MUX.countDown();
+
+                    break;
+                }
+            }
+
+            state++;
+        }
+    });
+
+    private int state = 0;
+
+    public static void main(String[] args) throws InterruptedException {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                new bug6489130().run();
+            }
+        });
+
+        if (!MUX.await(10, TimeUnit.SECONDS)) {
+            throw new RuntimeException("Timeout");
+        }
+    }
+
+    private void run() {
+        timer.start();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6840086/bug6840086.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+   @bug 6840086
+   @summary JFileChooser lacks icons on top right when running on Windows 7
+   @author Pavel Porvatov
+   @run main bug6840086
+*/
+
+import sun.awt.OSInfo;
+import sun.awt.shell.ShellFolder;
+
+import java.awt.*;
+
+public class bug6840086 {
+    private static final String[] KEYS = {
+        "fileChooserIcon ListView",
+        "fileChooserIcon ViewMenu",
+        "fileChooserIcon DetailsView",
+        "fileChooserIcon UpFolder",
+        "fileChooserIcon NewFolder",
+    };
+
+    public static void main(String[] args) {
+        if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+            System.out.println("The test was skipped because it is sensible only for Windows.");
+
+            return;
+        }
+
+        for (String key : KEYS) {
+            Image image = (Image) ShellFolder.get(key);
+
+            if (image == null) {
+                throw new RuntimeException("The image '" + key + "' not found.");
+            }
+
+            if (image != ShellFolder.get(key)) {
+                throw new RuntimeException("The image '" + key + "' is not cached.");
+            }
+        }
+
+        System.out.println("The test passed.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JLayer/6875716/bug6875716.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6875716
+ * @summary JLayer.remove((Component)null) should behave consistently in (not) throwing NPE
+ * @author Alexander Potochkin
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug6875716 {
+
+    public static void main(String[] args) throws Exception {
+        JLayer<Component> layer = new JLayer<Component>(new Component(){});
+        layer.setGlassPane(null);
+        try {
+            layer.remove((Component)null);
+        } catch (NullPointerException e) {
+            //this is what we expect
+            return;
+        }
+        throw new RuntimeException("Test failed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JMenuItem/6883341/bug6883341.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+ /*
+ * @test
+ * @bug 6883341
+ * @summary Checks that menu items with no text don't throw an exception
+ * @author Alexander Potochkin
+ * @run main bug6883341
+ */
+
+import javax.swing.*;
+
+public class bug6883341 {
+
+    private static void createGui() {
+        JPopupMenu menu = new JPopupMenu();
+        menu.add(new JMenuItem());
+        menu.setVisible(true);
+        menu.setVisible(false);
+    }
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                bug6883341.createGui();
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/misc/BootClassLoaderHook/TestHook.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.io.File;
+import java.util.TreeSet;
+import java.util.Set;
+import sun.misc.BootClassLoaderHook;
+
+/* @test
+ * @bug     6888802
+ * @summary Sanity test of BootClassLoaderHook interface
+ *
+ * @build TestHook
+ * @run main TestHook
+ */
+
+public class TestHook extends BootClassLoaderHook {
+
+    private static final TestHook hook = new TestHook();
+    private static Set<String> names = new TreeSet<String>();
+    private static final String LOGRECORD_CLASS =
+        "java.util.logging.LogRecord";
+    private static final String NONEXIST_RESOURCE =
+        "non.exist.resource";
+    private static final String LIBHELLO = "hello";
+
+    public static void main(String[] args) throws Exception {
+        BootClassLoaderHook.setHook(hook);
+        if (BootClassLoaderHook.getHook() == null) {
+           throw new RuntimeException("Null boot classloader hook ");
+        }
+
+        testHook();
+
+        if (!names.contains(LOGRECORD_CLASS)) {
+           throw new RuntimeException("loadBootstrapClass for " + LOGRECORD_CLASS + " not called");
+        }
+
+        if (!names.contains(NONEXIST_RESOURCE)) {
+           throw new RuntimeException("getBootstrapResource for " + NONEXIST_RESOURCE + " not called");
+        }
+        if (!names.contains(LIBHELLO)) {
+           throw new RuntimeException("loadLibrary for " + LIBHELLO + " not called");
+        }
+
+        Set<String> copy = new TreeSet<String>();
+        copy.addAll(names);
+        for (String s : copy) {
+            System.out.println("  Loaded " + s);
+        }
+
+        if (BootClassLoaderHook.getBootstrapPaths().length > 0) {
+           throw new RuntimeException("Unexpected returned value from getBootstrapPaths()");
+        }
+    }
+
+    private static void testHook() throws Exception {
+        Class.forName(LOGRECORD_CLASS);
+        ClassLoader.getSystemResource(NONEXIST_RESOURCE);
+        try {
+          System.loadLibrary(LIBHELLO);
+        } catch (UnsatisfiedLinkError e) {
+        }
+    }
+
+    public String loadBootstrapClass(String className) {
+        names.add(className);
+        return null;
+    }
+
+    public String getBootstrapResource(String resourceName) {
+        names.add(resourceName);
+        return null;
+    }
+
+    public boolean loadLibrary(String libname) {
+        names.add(libname);
+        return false;
+    }
+
+    public File[] getAdditionalBootstrapPaths() {
+        return new File[0];
+    }
+
+    public boolean isCurrentThreadPrefetching() {
+        return false;
+    }
+
+    public boolean prefetchFile(String name) {
+        return false;
+    }
+}
--- a/jdk/test/sun/net/www/httptest/HttpTransaction.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/sun/net/www/httptest/HttpTransaction.java	Wed Jul 05 17:01:52 2017 +0200
@@ -102,7 +102,8 @@
         if (rspheaders != null) {
             buf.append (rspheaders.toString()).append("\r\n");
         }
-        buf.append ("Body: ").append (new String(rspbody)).append("\r\n");
+        String rbody = rspbody == null? "": new String (rspbody);
+        buf.append ("Body: ").append (rbody).append("\r\n");
         return new String (buf);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/pisces/ThinLineTest.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+import java.awt.*;
+import java.awt.geom.Ellipse2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+
+/**
+ * @author chrisn@google.com (Chris Nokleberg)
+ * @author yamauchi@google.com (Hiroshi Yamauchi)
+ */
+public class ThinLineTest {
+  private static final int PIXEL = 381;
+
+  public static void main(String[] args) throws Exception {
+    BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);
+    Graphics2D g = image.createGraphics();
+
+    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+    g.setPaint(Color.WHITE);
+    g.fill(new Rectangle(image.getWidth(), image.getHeight()));
+
+    g.scale(0.5 / PIXEL, 0.5 / PIXEL);
+    g.setPaint(Color.BLACK);
+    g.setStroke(new BasicStroke(PIXEL));
+    g.draw(new Ellipse2D.Double(PIXEL * 50, PIXEL * 50, PIXEL * 300, PIXEL * 300));
+
+    // To visually check it
+    //ImageIO.write(image, "PNG", new File(args[0]));
+
+    boolean nonWhitePixelFound = false;
+    for (int x = 0; x < 200; ++x) {
+      if (image.getRGB(x, 100) != Color.WHITE.getRGB()) {
+        nonWhitePixelFound = true;
+        break;
+      }
+    }
+    if (!nonWhitePixelFound) {
+      throw new RuntimeException("The thin line disappeared.");
+    }
+  }
+}
--- a/jdk/test/sun/security/krb5/IPv6.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/sun/security/krb5/IPv6.java	Wed Jul 05 17:01:52 2017 +0200
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6877357
+ * @bug 6877357 6885166
  * @summary IPv6 address does not work
  */
 
@@ -57,6 +57,7 @@
         PrintStream out = new PrintStream(new FileOutputStream("ipv6.conf"));
         out.println("[libdefaults]");
         out.println("default_realm = V6");
+        out.println("kdc_timeout = 1");
         out.println("[realms]");
         out.println("V6 = {");
         for (String[] hp: kdcs) {
@@ -95,10 +96,12 @@
         po.flush();
 
         System.setOut(oldout);
-        String[] lines = new String(bo.toByteArray()).split("\n");
+        BufferedReader br = new BufferedReader(new StringReader(
+                new String(bo.toByteArray())));
         int cc = 0;
         Pattern r = Pattern.compile(".*KrbKdcReq send: kdc=(.*) UDP:(\\d+),.*");
-        for (String line: lines) {
+        String line;
+        while ((line = br.readLine()) != null) {
             Matcher m = r.matcher(line.subSequence(0, line.length()));
             if (m.matches()) {
                 System.out.println("------------------");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/RFC396xTest.java	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,248 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code 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
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+/*
+ * @test
+ * @bug 6862679
+ * @summary ESC: AD Authentication with user with umlauts fails
+ */
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import sun.security.krb5.EncryptedData;
+import sun.security.krb5.internal.crypto.Des;
+import sun.security.krb5.internal.crypto.EType;
+import sun.security.krb5.internal.crypto.crc32;
+import sun.security.krb5.internal.crypto.dk.AesDkCrypto;
+import sun.security.krb5.internal.crypto.dk.Des3DkCrypto;
+import sun.security.krb5.internal.crypto.dk.DkCrypto;
+import java.nio.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class RFC396xTest {
+
+    static final String gclef = new String(Character.toChars(0x1d11e));
+
+    /** Creates a new instance of NewClass */
+    public static void main(String[] args) throws Exception {
+        System.setProperty("sun.security.krb5.msinterop.des.s2kcharset",
+                "utf-8");
+        test();
+    }
+
+    static void test() throws Exception {
+        // RFC 3961
+        // A.1
+        Method nfold = DkCrypto.class.getDeclaredMethod("nfold", byte[].class, Integer.TYPE);
+        nfold.setAccessible(true);
+        assertStringEquals(hex((byte[])nfold.invoke(null, "012345".getBytes("UTF-8"), 64)), "be072631276b1955");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "password".getBytes("UTF-8"), 56)), "78a07b6caf85fa");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "Rough Consensus, and Running Code".getBytes("UTF-8"), 64)), "bb6ed30870b7f0e0");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "password".getBytes("UTF-8"), 168)), "59e4a8ca7c0385c3c37b3f6d2000247cb6e6bd5b3e");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "MASSACHVSETTS INSTITVTE OF TECHNOLOGY".getBytes("UTF-8"), 192)), "db3b0d8f0b061e603282b308a50841229ad798fab9540c1b");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "Q".getBytes("UTF-8"), 168)), "518a54a215a8452a518a54a215a8452a518a54a215");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "ba".getBytes("UTF-8"), 168)), "fb25d531ae8974499f52fd92ea9857c4ba24cf297e");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "kerberos".getBytes("UTF-8"), 64)), "6b65726265726f73");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "kerberos".getBytes("UTF-8"), 128)), "6b65726265726f737b9b5b2b93132b93");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "kerberos".getBytes("UTF-8"), 168)), "8372c236344e5f1550cd0747e15d62ca7a5a3bcea4");
+        assertStringEquals(hex((byte[])nfold.invoke(null, "kerberos".getBytes("UTF-8"), 256)), "6b65726265726f737b9b5b2b93132b935c9bdcdad95c9899c4cae4dee6d6cae4");
+
+        // A.2
+        assertStringEquals(hex(Des.string_to_key_bytes("passwordATHENA.MIT.EDUraeburn".toCharArray())), "cbc22fae235298e3");
+        assertStringEquals(hex(Des.string_to_key_bytes("potatoeWHITEHOUSE.GOVdanny".toCharArray())), "df3d32a74fd92a01");
+        assertStringEquals(hex(Des.string_to_key_bytes((gclef+"EXAMPLE.COMpianist").toCharArray())), "4ffb26bab0cd9413");
+        assertStringEquals(hex(Des.string_to_key_bytes("\u00dfATHENA.MIT.EDUJuri\u0161i\u0107".toCharArray())), "62c81a5232b5e69d");
+        // Next 2 won't pass, since there's no real weak key here
+        //assertStringEquals(hex(Des.string_to_key_bytes("11119999AAAAAAAA".toCharArray())), "984054d0f1a73e31");
+        //assertStringEquals(hex(Des.string_to_key_bytes("NNNN6666FFFFAAAA".toCharArray())), "c4bf6b25adf7a4f8");
+
+        // A.3
+        Object o = Des3DkCrypto.class.getConstructor().newInstance();
+        Method dr = DkCrypto.class.getDeclaredMethod("dr", byte[].class, byte[].class);
+        Method randomToKey = DkCrypto.class.getDeclaredMethod("randomToKey", byte[].class);
+        dr.setAccessible(true);
+        randomToKey.setAccessible(true);
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("dce06b1f64c857a11c3db57c51899b2cc1791008ce973b92"),
+                xeh("0000000155")))),
+                "925179d04591a79b5d3192c4a7e9c289b049c71f6ee604cd");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("5e13d31c70ef765746578531cb51c15bf11ca82c97cee9f2"),
+                xeh("00000001aa")))),
+                "9e58e5a146d9942a101c469845d67a20e3c4259ed913f207");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("98e6fd8a04a4b6859b75a176540b9752bad3ecd610a252bc"),
+                xeh("0000000155")))),
+                "13fef80d763e94ec6d13fd2ca1d085070249dad39808eabf");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("622aec25a2fe2cad7094680b7c64940280084c1a7cec92b5"),
+                xeh("00000001aa")))),
+                "f8dfbf04b097e6d9dc0702686bcb3489d91fd9a4516b703e");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("d3f8298ccb166438dcb9b93ee5a7629286a491f838f802fb"),
+                xeh("6b65726265726f73")))),
+                "2370da575d2a3da864cebfdc5204d56df779a7df43d9da43");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("c1081649ada74362e6a1459d01dfd30d67c2234c940704da"),
+                xeh("0000000155")))),
+                "348057ec98fdc48016161c2a4c7a943e92ae492c989175f7");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("5d154af238f46713155719d55e2f1f790dd661f279a7917c"),
+                xeh("00000001aa")))),
+                "a8808ac267dada3dcbe9a7c84626fbc761c294b01315e5c1");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("798562e049852f57dc8c343ba17f2ca1d97394efc8adc443"),
+                xeh("0000000155")))),
+                "c813f88a3be3b334f75425ce9175fbe3c8493b89c8703b49");
+        assertStringEquals(hex((byte[])randomToKey.invoke(o, (byte[])dr.invoke(o,
+                xeh("26dce334b545292f2feab9a8701a89a4b99eb9942cecd016"),
+                xeh("00000001aa")))),
+                "f48ffd6e83f83e7354e694fd252cf83bfe58f7d5ba37ec5d");
+
+        // A.4
+        assertStringEquals(hex(new Des3DkCrypto().stringToKey("passwordATHENA.MIT.EDUraeburn".toCharArray())), "850bb51358548cd05e86768c313e3bfef7511937dcf72c3e");
+        assertStringEquals(hex(new Des3DkCrypto().stringToKey("potatoeWHITEHOUSE.GOVdanny".toCharArray())), "dfcd233dd0a43204ea6dc437fb15e061b02979c1f74f377a");
+        assertStringEquals(hex(new Des3DkCrypto().stringToKey("pennyEXAMPLE.COMbuckaroo".toCharArray())), "6d2fcdf2d6fbbc3ddcadb5da5710a23489b0d3b69d5d9d4a");
+        assertStringEquals(hex(new Des3DkCrypto().stringToKey("\u00DFATHENA.MIT.EDUJuri\u0161i\u0107".toCharArray())), "16d5a40e1ce3bacb61b9dce00470324c831973a7b952feb0");
+        assertStringEquals(hex(new Des3DkCrypto().stringToKey((gclef+"EXAMPLE.COMpianist").toCharArray())), "85763726585dbc1cce6ec43e1f751f07f1c4cbb098f40b19");
+
+        // A.5
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes("foo".getBytes("UTF-8"))), "33bc3273");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes("test0123456789".getBytes("UTF-8"))), "d6883eb8");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes("MASSACHVSETTS INSTITVTE OF TECHNOLOGY".getBytes("UTF-8"))), "f78041e3");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes(new byte[] {(byte)0x80, 0})), "4b98833b");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes(new byte[] {0, 8})), "3288db0e");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes(new byte[] {0, (byte)0x80})), "2083b8ed");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes(new byte[] {(byte)0x80})), "2083b8ed");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes(new byte[] {(byte)0x80, 0, 0, 0})), "3bb659ed");
+        assertStringEquals(hex(crc32.byte2crc32sum_bytes(new byte[] {0, 0, 0, 1})), "96300777");
+
+        // RFC 3962
+        AesDkCrypto a1 = new AesDkCrypto(128);
+        Method pbkdf2 = AesDkCrypto.class.getDeclaredMethod("PBKDF2", char[].class, byte[].class, Integer.TYPE, Integer.TYPE);
+        Method s2k = AesDkCrypto.class.getDeclaredMethod("stringToKey", char[].class, byte[].class, byte[].class);
+        pbkdf2.setAccessible(true);
+        s2k.setAccessible(true);
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), "ATHENA.MIT.EDUraeburn".getBytes("UTF-8"), 1, 128)), "cd ed b5 28 1b b2 f8 01 56 5a 11 22 b2 56 35 15");
+        assertStringEquals(hex(a1.stringToKey("password".toCharArray(), "ATHENA.MIT.EDUraeburn", i2b(1))), "42 26 3c 6e 89 f4 fc 28 b8 df 68 ee 09 79 9f 15");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), "ATHENA.MIT.EDUraeburn".getBytes("UTF-8"), 1, 256)), "cd ed b5 28 1b b2 f8 01 56 5a 11 22 b2 56 35 15  0a d1 f7 a0 4b b9 f3 a3 33 ec c0 e2 e1 f7 08 37");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), "ATHENA.MIT.EDUraeburn".getBytes("UTF-8"), 2, 128)), "01 db ee 7f 4a 9e 24 3e 98 8b 62 c7 3c da 93 5d");
+        assertStringEquals(hex(a1.stringToKey("password".toCharArray(), "ATHENA.MIT.EDUraeburn", i2b(2))), "c6 51 bf 29 e2 30 0a c2 7f a4 69 d6 93 bd da 13");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), "ATHENA.MIT.EDUraeburn".getBytes("UTF-8"), 2, 256)), "01 db ee 7f 4a 9e 24 3e 98 8b 62 c7 3c da 93 5d  a0 53 78 b9 32 44 ec 8f 48 a9 9e 61 ad 79 9d 86");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), "ATHENA.MIT.EDUraeburn".getBytes("UTF-8"), 1200, 128)), "5c 08 eb 61 fd f7 1e 4e 4e c3 cf 6b a1 f5 51 2b");
+        assertStringEquals(hex(a1.stringToKey("password".toCharArray(), "ATHENA.MIT.EDUraeburn", i2b(1200))), "4c 01 cd 46 d6 32 d0 1e 6d be 23 0a 01 ed 64 2a");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), "ATHENA.MIT.EDUraeburn".getBytes("UTF-8"), 1200, 256)), "5c 08 eb 61 fd f7 1e 4e 4e c3 cf 6b a1 f5 51 2b  a7 e5 2d db c5 e5 14 2f 70 8a 31 e2 e6 2b 1e 13");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), xeh("1234567878563412"), 5, 128)), "d1 da a7 86 15 f2 87 e6 a1 c8 b1 20 d7 06 2a 49");
+        assertStringEquals(hex((byte[])s2k.invoke(a1, "password".toCharArray(), xeh("1234567878563412"), i2b(5))), "e9 b2 3d 52 27 37 47 dd 5c 35 cb 55 be 61 9d 8e");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "password".toCharArray(), xeh("1234567878563412"), 5, 256)), "d1 da a7 86 15 f2 87 e6 a1 c8 b1 20 d7 06 2a 49  3f 98 d2 03 e6 be 49 a6 ad f4 fa 57 4b 6e 64 ee");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase equals block size".getBytes("UTF-8"), 1200, 128)), "13 9c 30 c0 96 6b c3 2b a5 5f db f2 12 53 0a c9");
+        assertStringEquals(hex(a1.stringToKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase equals block size", i2b(1200))), "59 d1 bb 78 9a 82 8b 1a a5 4e f9 c2 88 3f 69 ed");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase equals block size".getBytes("UTF-8"), 1200, 256)), "13 9c 30 c0 96 6b c3 2b a5 5f db f2 12 53 0a c9  c5 ec 59 f1 a4 52 f5 cc 9a d9 40 fe a0 59 8e d1");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase exceeds block size".getBytes("UTF-8"), 1200, 128)), "9c ca d6 d4 68 77 0c d5 1b 10 e6 a6 87 21 be 61");
+        assertStringEquals(hex(a1.stringToKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase exceeds block size", i2b(1200))), "cb 80 05 dc 5f 90 17 9a 7f 02 10 4c 00 18 75 1d");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase exceeds block size".getBytes("UTF-8"), 1200, 256)), "9c ca d6 d4 68 77 0c d5 1b 10 e6 a6 87 21 be 61  1a 8b 4d 28 26 01 db 3b 36 be 92 46 91 5e c8 2a");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, gclef.toCharArray(), "EXAMPLE.COMpianist".getBytes("UTF-8"), 50, 128)), "6b 9c f2 6d 45 45 5a 43 a5 b8 bb 27 6a 40 3b 39");
+        assertStringEquals(hex(a1.stringToKey(gclef.toCharArray(), "EXAMPLE.COMpianist", i2b(50))), "f1 49 c1 f2 e1 54 a7 34 52 d4 3e 7f e6 2a 56 e5");
+        assertStringEquals(hex((byte[])pbkdf2.invoke(null, gclef.toCharArray(), "EXAMPLE.COMpianist".getBytes("UTF-8"), 50, 256)), "6b 9c f2 6d 45 45 5a 43 a5 b8 bb 27 6a 40 3b 39  e7 fe 37 a0 c4 1e 02 c2 81 ff 30 69 e1 e9 4f 52");
+
+        if (EType.isSupported(EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96)) {
+            AesDkCrypto a2 = new AesDkCrypto(256);
+            assertStringEquals(hex(a2.stringToKey("password".toCharArray(), "ATHENA.MIT.EDUraeburn", i2b(1))), "fe 69 7b 52 bc 0d 3c e1 44 32 ba 03 6a 92 e6 5b  bb 52 28 09 90 a2 fa 27 88 39 98 d7 2a f3 01 61");
+            assertStringEquals(hex(a2.stringToKey("password".toCharArray(), "ATHENA.MIT.EDUraeburn", i2b(2))), "a2 e1 6d 16 b3 60 69 c1 35 d5 e9 d2 e2 5f 89 61  02 68 56 18 b9 59 14 b4 67 c6 76 22 22 58 24 ff");
+            assertStringEquals(hex(a2.stringToKey("password".toCharArray(), "ATHENA.MIT.EDUraeburn", i2b(1200))), "55 a6 ac 74 0a d1 7b 48 46 94 10 51 e1 e8 b0 a7  54 8d 93 b0 ab 30 a8 bc 3f f1 62 80 38 2b 8c 2a");
+            assertStringEquals(hex((byte[])s2k.invoke(a2, "password".toCharArray(), xeh("1234567878563412"), i2b(5))), "97 a4 e7 86 be 20 d8 1a 38 2d 5e bc 96 d5 90 9c  ab cd ad c8 7c a4 8f 57 45 04 15 9f 16 c3 6e 31");
+            assertStringEquals(hex(a2.stringToKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase equals block size", i2b(1200))), "89 ad ee 36 08 db 8b c7 1f 1b fb fe 45 94 86 b0  56 18 b7 0c ba e2 20 92 53 4e 56 c5 53 ba 4b 34");
+            assertStringEquals(hex(a2.stringToKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".toCharArray(), "pass phrase exceeds block size", i2b(1200))), "d7 8c 5c 9c b8 72 a8 c9 da d4 69 7f 0b b5 b2 d2 14 96 c8 2b eb 2c ae da 21 12 fc ee a0 57 40 1b");
+            assertStringEquals(hex(a2.stringToKey(gclef.toCharArray(), "EXAMPLE.COMpianist", i2b(50))), "4b 6d 98 39 f8 44 06 df 1f 09 cc 16 6d b4 b8 3c  57 18 48 b7 84 a3 d6 bd c3 46 58 9a 3e 39 3f 9e");
+        }
+
+        Cipher cipher = Cipher.getInstance("AES/CTS/NoPadding");
+
+        cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(
+                xeh("63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69"), "AES"),
+                new IvParameterSpec(
+                xeh("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"), 0, 16));
+        assertStringEquals(hex(cipher.doFinal(
+                xeh("49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20"))),
+                "c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7f  97");
+        assertStringEquals(hex(cipher.doFinal(
+                xeh("49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65  20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20"))),
+                "fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 22  97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5");
+        assertStringEquals(hex(cipher.doFinal(
+                xeh("49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65  20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43"))),
+                "39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8  97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84");
+        assertStringEquals(hex(cipher.doFinal(
+                xeh("49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65  20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43  68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c"))),
+                "97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84  b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9e  39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5");
+        assertStringEquals(hex(cipher.doFinal(
+                xeh("49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65  20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43  68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20"))),
+                "97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84  9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8  39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8");
+        assertStringEquals(hex(cipher.doFinal(
+                xeh("49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65  20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43  68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20  61 6e 64 20 77 6f 6e 74 6f 6e 20 73 6f 75 70 2e"))),
+                "97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84  39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8  48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 40  9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8");
+    }
+
+    static byte[] i2b(int i) {
+        ByteBuffer bb = ByteBuffer.allocate(4);
+        byte[] b = new byte[4];
+        bb.putInt(i);
+        bb.flip();
+        bb.get(b);
+        return b;
+    }
+
+    static String hex(byte[] bs) {
+        StringBuffer sb = new StringBuffer(bs.length * 2);
+        for(byte b: bs) {
+            char c = (char)((b+256)%256);
+            if (c / 16 < 10)
+                sb.append((char)(c/16+'0'));
+            else
+                sb.append((char)(c/16-10+'a'));
+            if (c % 16 < 10)
+                sb.append((char)(c%16+'0'));
+            else
+                sb.append((char)(c%16-10+'a'));
+        }
+        return new String(sb);
+    }
+
+    static byte[] xeh(String in) {
+        in = in.replaceAll(" ", "");
+        int len = in.length()/2;
+        byte[] out = new byte[len];
+        for (int i=0; i<len; i++) {
+            out[i] = (byte)Integer.parseInt(in.substring(i*2, i*2+2), 16);
+        }
+        return out;
+    }
+
+    static void assertStringEquals(String a, String b) {
+        a = a.replaceAll(" ", "");
+        b = b.replaceAll(" ", "");
+        if (!a.equals(b)) {
+            throw new RuntimeException("Not equal: " + a + " AND " + b);
+        }
+        System.err.print(".");
+    }
+}
--- a/jdk/test/sun/security/ssl/sun/net/www/httpstest/HttpTransaction.java	Wed Oct 07 14:14:45 2009 -0700
+++ b/jdk/test/sun/security/ssl/sun/net/www/httpstest/HttpTransaction.java	Wed Jul 05 17:01:52 2017 +0200
@@ -102,7 +102,8 @@
         if (rspheaders != null) {
             buf.append (rspheaders.toString()).append("\r\n");
         }
-        buf.append ("Body: ").append (new String(rspbody)).append("\r\n");
+        String rbody = rspbody == null? "": new String (rspbody);
+        buf.append ("Body: ").append (rbody).append("\r\n");
         return new String (buf);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/passtype.sh	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,72 @@
+#
+# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code 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
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6868579
+# @summary RFE: jarsigner to support reading password from environment variable
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  Windows_* )
+    FS="\\"
+    ;;
+  * )
+    FS="/"
+    ;;
+esac
+
+KS=pt.jks
+JFILE=pt.jar
+
+KT="$TESTJAVA${FS}bin${FS}keytool -keystore $KS -validity 300"
+JAR=$TESTJAVA${FS}bin${FS}jar
+JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
+
+rm $KS $JFILE
+
+$KT -alias a -dname CN=a -keyalg rsa -genkey \
+        -storepass test12 -keypass test12 || exit 1
+PASSENV=test12 $KT -alias b -dname CN=b -keyalg rsa -genkey \
+        -storepass:env PASSENV -keypass:env PASSENV || exit 2
+echo test12 > passfile
+$KT -alias c -dname CN=c -keyalg rsa -genkey \
+        -storepass:file passfile -keypass:file passfile || exit 3
+
+echo A > A
+$JAR cvf $JFILE A
+
+$JARSIGNER -keystore $KS -storepass test12 $JFILE a || exit 4
+PASSENV=test12 $JARSIGNER -keystore $KS -storepass:env PASSENV $JFILE b || exit 5
+$JARSIGNER -keystore $KS -storepass:file passfile $JFILE b || exit 6
+
+$JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 7
+
+exit 0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/keytool/newhelp.sh	Wed Jul 05 17:01:52 2017 +0200
@@ -0,0 +1,53 @@
+#
+# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code 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
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6324292
+# @summary keytool -help is unhelpful
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  Windows_* )
+    FS="\\"
+    ;;
+  * )
+    FS="/"
+    ;;
+esac
+
+LANG=C
+$TESTJAVA${FS}bin${FS}keytool -help 2> h1 || exit 1
+$TESTJAVA${FS}bin${FS}keytool -help -list 2> h2 || exit 2
+
+grep Commands: h1 || exit 3
+grep Options: h2 || exit 4
+
+exit 0
+