Merge
authorprr
Fri, 08 Aug 2014 12:54:39 -0700
changeset 26036 541d3bb1825e
parent 26035 250f55e44bea (current diff)
parent 25971 e0831270085f (diff)
child 26037 508779ce6619
child 26339 be0d2b32b174
Merge
hotspot/test/compiler/5091921/Test6890943.sh
nashorn/test/script/basic/compile-octane.js.EXPECTED
--- a/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -267,3 +267,4 @@
 9678e0db8ff6ed845d4c2ee4a3baf7f386a777e5 jdk9-b22
 39cfdc2dcaf3f195c55398e4e677ab053b07e3d2 jdk9-b23
 d9ce05f36ffec3e5e8af62a92455c1c66a63c320 jdk9-b24
+13a5c76976fe48e55c9727c25fae2d2ce7c05da0 jdk9-b25
--- a/.hgtags-top-repo	Fri Aug 08 21:46:29 2014 +0400
+++ b/.hgtags-top-repo	Fri Aug 08 12:54:39 2014 -0700
@@ -267,3 +267,4 @@
 8e4bdab4c362aadde2d321f968cd503a2f779e2f jdk9-b22
 88567461a2cd9b7fb431fee6440005a694df1f47 jdk9-b23
 1d4a293fbec19dc2d5790bbb2c7dd0ed8f265484 jdk9-b24
+aefd8899a8d6615fb34ba99b2e38996a7145baa8 jdk9-b25
--- a/corba/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/corba/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -267,3 +267,4 @@
 ddc07abf4307855c0dc904cc5c96cc764023a930 jdk9-b22
 57735d66face054440a63ce99789eac5a5ee1dfd jdk9-b23
 8a44142bb7fc8118f70f91a1b97c12dfc50563ee jdk9-b24
+da08cca6b97f41b7081a3e176dcb400af6e4bb26 jdk9-b25
--- a/hotspot/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -427,3 +427,4 @@
 518d1fcc0799494f013e00e0a94a91b6f212d54f jdk9-b22
 dd472cdacc32e3afc7c5bfa7ef16ea0e0befb7fa jdk9-b23
 dde2d03b0ea46a27650839e3a1d212c7c1f7b4c8 jdk9-b24
+6de94e8693240cec8aae11f6b42f43433456a733 jdk9-b25
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java	Fri Aug 08 12:54:39 2014 -0700
@@ -55,7 +55,10 @@
     layoutHelper = new IntField(type.getJIntField("_layout_helper"), 0);
     name         = type.getAddressField("_name");
     accessFlags  = new CIntField(type.getCIntegerField("_access_flags"), 0);
-    traceIDField  = type.getField("_trace_id");
+    try {
+      traceIDField  = type.getField("_trace_id");
+    } catch(Exception e) {
+    }
     subklass     = new MetadataField(type.getAddressField("_subklass"), 0);
     nextSibling  = new MetadataField(type.getAddressField("_next_sibling"), 0);
 
@@ -108,7 +111,11 @@
   public AccessFlags getAccessFlagsObj(){ return new AccessFlags(getAccessFlags());      }
   public Klass    getSubklassKlass()    { return (Klass)    subklass.getValue(this);     }
   public Klass    getNextSiblingKlass() { return (Klass)    nextSibling.getValue(this);  }
-  public long     traceID() { return traceIDField.getJLong(addr);  }
+
+  public long traceID() {
+    if (traceIDField == null) return 0;
+    return traceIDField.getJLong(addr);
+  }
 
   // computed access flags - takes care of inner classes etc.
   // This is closer to actual source level than getAccessFlags() etc.
--- a/hotspot/make/jprt.properties	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/make/jprt.properties	Fri Aug 08 12:54:39 2014 -0700
@@ -126,7 +126,7 @@
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark, \
-    ${jprt.my.solaris.sparcv9}-product-c2-runThese, \
+    ${jprt.my.solaris.sparcv9}-product-c2-runThese8, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
@@ -150,8 +150,9 @@
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-scimark, \
-    ${jprt.my.solaris.x64}-product-c2-runThese, \
-    ${jprt.my.solaris.x64}-product-c2-runThese_Xcomp, \
+    ${jprt.my.solaris.x64}-product-c2-runThese8, \
+    ${jprt.my.solaris.x64}-product-c2-runThese8_Xcomp_lang, \
+    ${jprt.my.solaris.x64}-product-c2-runThese8_Xcomp_vm, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
     ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
@@ -175,9 +176,11 @@
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
     ${jprt.my.linux.i586}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
-    ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
-    ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
-    ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+    ${jprt.my.linux.i586}-product-c1-runThese8_Xcomp_lang, \
+    ${jprt.my.linux.i586}-product-c1-runThese8_Xcomp_vm, \
+    ${jprt.my.linux.i586}-fastdebug-c1-runThese8_Xshare, \
+    ${jprt.my.linux.i586}-fastdebug-c2-runThese8_Xcomp_lang, \
+    ${jprt.my.linux.i586}-fastdebug-c2-runThese8_Xcomp_vm, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
     ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
@@ -243,9 +246,10 @@
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
     ${jprt.my.windows.i586}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-scimark, \
-    ${jprt.my.windows.i586}-product-{c1|c2}-runThese, \
-    ${jprt.my.windows.i586}-product-{c1|c2}-runThese_Xcomp, \
-    ${jprt.my.windows.i586}-fastdebug-c1-runThese_Xshare, \
+    ${jprt.my.windows.i586}-product-{c1|c2}-runThese8, \
+    ${jprt.my.windows.i586}-product-{c1|c2}-runThese8_Xcomp_lang, \
+    ${jprt.my.windows.i586}-product-{c1|c2}-runThese8_Xcomp_vm, \
+    ${jprt.my.windows.i586}-fastdebug-c1-runThese8_Xshare, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
     ${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
@@ -269,8 +273,9 @@
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98_nontiered, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark, \
-    ${jprt.my.windows.x64}-product-c2-runThese, \
-    ${jprt.my.windows.x64}-product-c2-runThese_Xcomp, \
+    ${jprt.my.windows.x64}-product-c2-runThese8, \
+    ${jprt.my.windows.x64}-product-c2-runThese8_Xcomp_lang, \
+    ${jprt.my.windows.x64}-product-c2-runThese8_Xcomp_vm, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
     ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -36,7 +36,6 @@
 #include "runtime/signature.hpp"
 #include "runtime/stubCodeGenerator.hpp"
 #include "runtime/stubRoutines.hpp"
-#include "vmreg_ppc.inline.hpp"
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #include "runtime/vframeArray.hpp"
@@ -155,15 +154,6 @@
   }
 }
 
-void frame::pd_gc_epilog() {
-  if (is_interpreted_frame()) {
-    // Set constant pool cache entry for interpreter.
-    Method* m = interpreter_frame_method();
-
-    *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
-  }
-}
-
 bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
   // Is there anything to do?
   assert(is_interpreted_frame(), "Not an interpreted frame");
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,6 +27,7 @@
 #define CPU_PPC_VM_FRAME_PPC_INLINE_HPP
 
 #include "code/codeCache.hpp"
+#include "code/vmreg.inline.hpp"
 
 // Inline functions for ppc64 frames:
 
@@ -134,12 +135,12 @@
   return (intptr_t**)&istate->_locals;
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*)&istate->_bcp;
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*)&istate->_mdx;
 }
@@ -209,10 +210,10 @@
 inline intptr_t** frame::interpreter_frame_locals_addr() const {
   return (intptr_t**) &(get_ijava_state()->locals);
 }
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   return (intptr_t*) &(get_ijava_state()->bcp);
 }
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   return (intptr_t*) &(get_ijava_state()->mdx);
 }
 // Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
--- a/hotspot/src/cpu/ppc/vm/icache_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/icache_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -68,7 +68,6 @@
 }
 
 void ICacheStubGenerator::generate_icache_flush(ICache::flush_icache_stub_t* flush_icache_stub) {
-  StubCodeMark mark(this, "ICache", "flush_icache_stub");
 
   *flush_icache_stub = (ICache::flush_icache_stub_t)ICache::ppc64_flush_icache;
 
--- a/hotspot/src/cpu/ppc/vm/interpreterRT_ppc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/interpreterRT_ppc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012, 2014 SAP AG. 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
@@ -26,6 +26,7 @@
 #ifndef CPU_PPC_VM_INTERPRETERRT_PPC_HPP
 #define CPU_PPC_VM_INTERPRETERRT_PPC_HPP
 
+#include "asm/macroAssembler.hpp"
 #include "memory/allocation.hpp"
 
 // native method calls
--- a/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -32,6 +32,7 @@
 #include "memory/resourceArea.hpp"
 #include "prims/methodHandles.hpp"
 #include "runtime/biasedLocking.hpp"
+#include "runtime/icache.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/objectMonitor.hpp"
 #include "runtime/os.hpp"
--- a/hotspot/src/cpu/ppc/vm/ppc.ad	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/ppc.ad	Fri Aug 08 12:54:39 2014 -0700
@@ -267,7 +267,7 @@
 // It's worth about 1% on SPEC geomean to get this right.
 
 // Chunk0, chunk1, and chunk2 form the MachRegisterNumbers enumeration
-// in adGlobals_ppc64.hpp which defines the <register>_num values, e.g.
+// in adGlobals_ppc.hpp which defines the <register>_num values, e.g.
 // R3_num. Therefore, R3_num may not be (and in reality is not)
 // the same as R3->encoding()! Furthermore, we cannot make any
 // assumptions on ordering, e.g. R3_num may be less than R2_num.
@@ -1632,7 +1632,7 @@
 static enum RC rc_class(OptoReg::Name reg) {
   // Return the register class for the given register. The given register
   // reg is a <register>_num value, which is an index into the MachRegisterNumbers
-  // enumeration in adGlobals_ppc64.hpp.
+  // enumeration in adGlobals_ppc.hpp.
 
   if (reg == OptoReg::Bad) return rc_bad;
 
--- a/hotspot/src/cpu/ppc/vm/register_ppc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/register_ppc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,6 @@
 #define CPU_PPC_VM_REGISTER_PPC_HPP
 
 #include "asm/register.hpp"
-#include "vm_version_ppc.hpp"
 
 // forward declaration
 class Address;
@@ -92,8 +91,8 @@
   inline friend Register as_Register(int encoding);
 
   // accessors
-  int      encoding()  const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg    as_VMReg();
+  int encoding()  const { assert(is_valid(), "invalid register"); return value(); }
+  inline VMReg as_VMReg();
   Register successor() const { return as_Register(encoding() + 1); }
 
   // testers
@@ -208,8 +207,8 @@
   inline friend ConditionRegister as_ConditionRegister(int encoding);
 
   // accessors
-  int   encoding() const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg as_VMReg();
+  int encoding() const { assert(is_valid(), "invalid register"); return value(); }
+  inline VMReg as_VMReg();
 
   // testers
   bool is_valid()       const { return  (0 <= value()        &&  value() < number_of_registers); }
@@ -264,7 +263,7 @@
 
   // accessors
   int           encoding() const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg         as_VMReg();
+  inline VMReg  as_VMReg();
   FloatRegister successor() const { return as_FloatRegister(encoding() + 1); }
 
   // testers
@@ -365,7 +364,7 @@
 
   // accessors
   int             encoding()  const { assert(is_valid(), "invalid register"); return value(); }
-  VMReg           as_VMReg();
+  inline VMReg    as_VMReg();
 
   // testers
   bool is_valid()       const { return 0 <= value() && value() < number_of_registers; }
--- a/hotspot/src/cpu/ppc/vm/runtime_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/runtime_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012, 2014 SAP AG. 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
@@ -30,6 +30,7 @@
 #include "classfile/systemDictionary.hpp"
 #include "code/vmreg.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "nativeInst_ppc.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -37,7 +38,6 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/vframeArray.hpp"
 #include "utilities/globalDefinitions.hpp"
-#include "vmreg_ppc.inline.hpp"
 #endif
 
 #define __ masm->
--- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,16 +29,17 @@
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "oops/compiledICHolder.hpp"
 #include "prims/jvmtiRedefineClassesTrace.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/vframeArray.hpp"
 #include "vmreg_ppc.inline.hpp"
-#include "adfiles/ad_ppc_64.hpp"
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
 #ifdef COMPILER2
+#include "adfiles/ad_ppc_64.hpp"
 #include "opto/runtime.hpp"
 #endif
 
--- a/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -401,11 +401,11 @@
     __ load_const(exception_file, (void*)__FILE__);
     __ load_const(exception_line, (void*)__LINE__);
 
-    __ std(R3_ARG1, thread_(pending_exception));
+    __ std(R3_ARG1, in_bytes(JavaThread::pending_exception_offset()), R16_thread);
     // store into `char *'
-    __ std(exception_file, thread_(exception_file));
+    __ std(exception_file, in_bytes(JavaThread::exception_file_offset()), R16_thread);
     // store into `int'
-    __ stw(exception_line, thread_(exception_line));
+    __ stw(exception_line, in_bytes(JavaThread::exception_line_offset()), R16_thread);
 
     // complete return to VM
     assert(StubRoutines::_call_stub_return_address != NULL, "must have been generated before");
@@ -524,8 +524,6 @@
     int frame_size_in_bytes = frame::abi_reg_args_size;
     OopMap* map = new OopMap(frame_size_in_bytes / sizeof(jint), 0);
 
-    StubCodeMark mark(this, "StubRoutines", "throw_exception");
-
     address start = __ pc();
 
     __ save_LR_CR(R11_scratch1);
@@ -846,8 +844,6 @@
   //
   // Don't generate, rather use C++ code.
   address generate_verify_oop() {
-    StubCodeMark mark(this, "StubRoutines", "verify_oop");
-
     // this is actually a `FunctionDescriptor*'.
     address start = 0;
 
--- a/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/templateTable_ppc_64.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 #include "asm/macroAssembler.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateInterpreter.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
--- a/hotspot/src/cpu/ppc/vm/vmreg_ppc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/vmreg_ppc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -26,10 +26,28 @@
 #ifndef CPU_PPC_VM_VMREG_PPC_HPP
 #define CPU_PPC_VM_VMREG_PPC_HPP
 
-  bool is_Register();
-  Register as_Register();
+inline bool is_Register() {
+  return (unsigned int)value() < (unsigned int)ConcreteRegisterImpl::max_gpr;
+}
+
+inline bool is_FloatRegister() {
+  return value() >= ConcreteRegisterImpl::max_gpr &&
+         value() < ConcreteRegisterImpl::max_fpr;
+}
 
-  bool is_FloatRegister();
-  FloatRegister as_FloatRegister();
+inline Register as_Register() {
+  assert(is_Register() && is_even(value()), "even-aligned GPR name");
+  return ::as_Register(value()>>1);
+}
+
+inline FloatRegister as_FloatRegister() {
+  assert(is_FloatRegister() && is_even(value()), "must be");
+  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
+}
+
+inline bool is_concrete() {
+  assert(is_reg(), "must be");
+  return is_even(value());
+}
 
 #endif // CPU_PPC_VM_VMREG_PPC_HPP
--- a/hotspot/src/cpu/ppc/vm/vmreg_ppc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/ppc/vm/vmreg_ppc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -44,28 +44,5 @@
   return VMRegImpl::as_VMReg((encoding()) + ConcreteRegisterImpl::max_cnd);
 }
 
-inline bool VMRegImpl::is_Register() {
-  return (unsigned int)value() < (unsigned int)ConcreteRegisterImpl::max_gpr;
-}
-
-inline bool VMRegImpl::is_FloatRegister() {
-  return value() >= ConcreteRegisterImpl::max_gpr &&
-         value() < ConcreteRegisterImpl::max_fpr;
-}
-
-inline Register VMRegImpl::as_Register() {
-  assert(is_Register() && is_even(value()), "even-aligned GPR name");
-  return ::as_Register(value()>>1);
-}
-
-inline FloatRegister VMRegImpl::as_FloatRegister() {
-  assert(is_FloatRegister() && is_even(value()), "must be");
-  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
-}
-
-inline bool VMRegImpl::is_concrete() {
-  assert(is_reg(), "must be");
-  return is_even(value());
-}
 
 #endif // CPU_PPC_VM_VMREG_PPC_INLINE_HPP
--- a/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -31,7 +31,6 @@
 #include "oops/compiledICHolder.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
-#include "register_sparc.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/vframeArray.hpp"
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/markOop.hpp"
@@ -593,17 +594,6 @@
   return this->fp() == fp;
 }
 
-
-void frame::pd_gc_epilog() {
-  if (is_interpreted_frame()) {
-    // set constant pool cache entry for interpreter
-    Method* m = interpreter_frame_method();
-
-    *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
-  }
-}
-
-
 bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
 #ifdef CC_INTERP
   // Is there anything to do?
@@ -641,10 +631,10 @@
     return false;
   }
 
-  // validate bci/bcx
+  // validate bci/bcp
 
-  intptr_t  bcx    = interpreter_frame_bcx();
-  if (m->validate_bci_from_bcx(bcx) < 0) {
+  address bcp = interpreter_frame_bcp();
+  if (m->validate_bci_from_bcp(bcp) < 0) {
     return false;
   }
 
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -78,7 +78,6 @@
 //    Lesp         first free element of expression stack
 //                 (which grows towards __higher__ addresses)
 //    Lbcp         is set to address of bytecode to execute
-//                 It is accessed in the frame under the name "bcx".
 //                 It may at times (during GC) be an index instead.
 //    Lmethod      the method being interpreted
 //    Llocals      the base pointer for accessing the locals array
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -26,6 +26,7 @@
 #define CPU_SPARC_VM_FRAME_SPARC_INLINE_HPP
 
 #include "asm/macroAssembler.hpp"
+#include "code/vmreg.inline.hpp"
 
 // Inline functions for SPARC frames:
 
@@ -98,12 +99,12 @@
   return (intptr_t**) &istate->_locals;
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*) &istate->_bcp;
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   interpreterState istate = get_interpreterState();
   return (intptr_t*) &istate->_mdx;
 }
@@ -165,12 +166,11 @@
   return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
-  // %%%%% reinterpreting Lbcp as a bcx
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   return (intptr_t*) sp_addr_at( Lbcp->sp_offset_in_saved_window());
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   // %%%%% reinterpreting ImethodDataPtr as a mdx
   return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
 }
--- a/hotspot/src/cpu/sparc/vm/interpreterRT_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/interpreterRT_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "asm/macroAssembler.inline.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/allocation.inline.hpp"
--- a/hotspot/src/cpu/sparc/vm/interpreter_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/interpreter_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "asm/assembler.inline.hpp"
+#include "asm/macroAssembler.inline.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -186,8 +186,7 @@
 //       the interpreter to work right
 // (These assignments must be compatible with L7_thread_cache; see above.)
 
-// Since Lbcp points into the middle of the method object,
-// it is temporarily converted into a "bcx" during GC.
+// Lbcp points into the middle of the method object.
 
 // Exception processing
 // These registers are passed into exception handlers.
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. 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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "memory/allocation.inline.hpp"
 #include "prims/methodHandles.hpp"
 
--- a/hotspot/src/cpu/sparc/vm/register_sparc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/register_sparc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -26,7 +26,6 @@
 #define CPU_SPARC_VM_REGISTER_SPARC_HPP
 
 #include "asm/register.hpp"
-#include "vm_version_sparc.hpp"
 
 // forward declaration
 class Address;
@@ -65,7 +64,7 @@
   friend Register as_oRegister(int number);
   friend Register as_gRegister(int number);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // accessors
   int   encoding() const                              { assert(is_valid(), "invalid register"); return value(); }
@@ -234,7 +233,7 @@
   };
 
   // construction
-  VMReg as_VMReg( );
+  inline VMReg as_VMReg( );
 
   // accessors
   int encoding() const                                { assert(is_valid(), "invalid register"); return value(); }
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Fri Aug 08 12:54:39 2014 -0700
@@ -9728,7 +9728,7 @@
 
   size(4);
   ins_cost(BRANCH_COST);
-  format %{ "CWB$cmp  $op1,op2,$labl\t! compressed ptr" %}
+  format %{ "CWB$cmp  $op1,$op2,$labl\t! compressed ptr" %}
   ins_encode %{
     Label* L = $labl$$label;
     assert(__ use_cbcond(*L), "back to back cbcond");
--- a/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
@@ -1785,7 +1786,7 @@
   __ verify_thread();
   // expression stack is undefined here
   // O0: exception, i.e. Oexception
-  // Lbcp: exception bcx
+  // Lbcp: exception bcp
   __ verify_oop(Oexception);
 
 
--- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/sparc/vm/vmreg_sparc.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/vmreg_sparc.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,10 +25,35 @@
 #ifndef CPU_SPARC_VM_VMREG_SPARC_HPP
 #define CPU_SPARC_VM_VMREG_SPARC_HPP
 
-  bool is_Register();
-  Register as_Register();
+inline bool is_Register() { return value() >= 0 && value() < ConcreteRegisterImpl::max_gpr; }
+inline bool is_FloatRegister() { return value() >= ConcreteRegisterImpl::max_gpr &&
+                                                   value() < ConcreteRegisterImpl::max_fpr; }
+inline Register as_Register() {
+
+  assert( is_Register() && is_even(value()), "even-aligned GPR name" );
+  // Yuk
+  return ::as_Register(value()>>1);
+}
 
-  bool is_FloatRegister();
-  FloatRegister as_FloatRegister();
+inline FloatRegister as_FloatRegister() {
+  assert( is_FloatRegister(), "must be" );
+  // Yuk
+  return ::as_FloatRegister( value() - ConcreteRegisterImpl::max_gpr );
+}
+
+inline   bool is_concrete() {
+  assert(is_reg(), "must be");
+  int v = value();
+  if ( v  <  ConcreteRegisterImpl::max_gpr ) {
+    return is_even(v);
+  }
+  // F0..F31
+  if ( v <= ConcreteRegisterImpl::max_gpr + 31) return true;
+  if ( v <  ConcreteRegisterImpl::max_fpr) {
+    return is_even(v);
+  }
+  assert(false, "what register?");
+  return false;
+}
 
 #endif // CPU_SPARC_VM_VMREG_SPARC_HPP
--- a/hotspot/src/cpu/sparc/vm/vmreg_sparc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/vmreg_sparc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -33,35 +33,5 @@
 inline VMReg FloatRegisterImpl::as_VMReg() { return VMRegImpl::as_VMReg( ConcreteRegisterImpl::max_gpr + encoding() ); }
 
 
-inline bool VMRegImpl::is_Register() { return value() >= 0 && value() < ConcreteRegisterImpl::max_gpr; }
-inline bool VMRegImpl::is_FloatRegister() { return value() >= ConcreteRegisterImpl::max_gpr &&
-                                                   value() < ConcreteRegisterImpl::max_fpr; }
-inline Register VMRegImpl::as_Register() {
-
-  assert( is_Register() && is_even(value()), "even-aligned GPR name" );
-  // Yuk
-  return ::as_Register(value()>>1);
-}
-
-inline FloatRegister VMRegImpl::as_FloatRegister() {
-  assert( is_FloatRegister(), "must be" );
-  // Yuk
-  return ::as_FloatRegister( value() - ConcreteRegisterImpl::max_gpr );
-}
-
-inline   bool VMRegImpl::is_concrete() {
-  assert(is_reg(), "must be");
-  int v = value();
-  if ( v  <  ConcreteRegisterImpl::max_gpr ) {
-    return is_even(v);
-  }
-  // F0..F31
-  if ( v <= ConcreteRegisterImpl::max_gpr + 31) return true;
-  if ( v <  ConcreteRegisterImpl::max_fpr) {
-    return is_even(v);
-  }
-  assert(false, "what register?");
-  return false;
-}
 
 #endif // CPU_SPARC_VM_VMREG_SPARC_INLINE_HPP
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -537,10 +537,6 @@
   return _fp == (fp - diff);
 }
 
-void frame::pd_gc_epilog() {
-  // nothing done here now
-}
-
 bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
 // QQQ
 #ifdef CC_INTERP
@@ -577,10 +573,10 @@
     return false;
   }
 
-  // validate bci/bcx
+  // validate bci/bcp
 
-  intptr_t  bcx    = interpreter_frame_bcx();
-  if (m->validate_bci_from_bcx(bcx) < 0) {
+  address bcp = interpreter_frame_bcp();
+  if (m->validate_bci_from_bcp(bcp) < 0) {
     return false;
   }
 
@@ -692,10 +688,10 @@
     DESCRIBE_FP_OFFSET(interpreter_frame_sender_sp);
     DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
     DESCRIBE_FP_OFFSET(interpreter_frame_method);
-    DESCRIBE_FP_OFFSET(interpreter_frame_mdx);
+    DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
     DESCRIBE_FP_OFFSET(interpreter_frame_cache);
     DESCRIBE_FP_OFFSET(interpreter_frame_locals);
-    DESCRIBE_FP_OFFSET(interpreter_frame_bcx);
+    DESCRIBE_FP_OFFSET(interpreter_frame_bcp);
     DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
 #endif
   }
--- a/hotspot/src/cpu/x86/vm/frame_x86.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -40,7 +40,7 @@
 //     ...                        | monitor block size
 //    [monitors              ]   /
 //    [monitor block size    ]
-//    [byte code index/pointr]                   = bcx()                bcx_offset
+//    [byte code pointer     ]                   = bcp()                bcp_offset
 //    [pointer to locals     ]                   = locals()             locals_offset
 //    [constant pool cache   ]                   = cache()              cache_offset
 //    [methodData            ]                   = mdp()                mdx_offset
@@ -111,11 +111,11 @@
     // outgoing sp before a call to an invoked method
     interpreter_frame_last_sp_offset                 = interpreter_frame_sender_sp_offset - 1,
     interpreter_frame_method_offset                  = interpreter_frame_last_sp_offset - 1,
-    interpreter_frame_mdx_offset                     = interpreter_frame_method_offset - 1,
-    interpreter_frame_cache_offset                   = interpreter_frame_mdx_offset - 1,
+    interpreter_frame_mdp_offset                     = interpreter_frame_method_offset - 1,
+    interpreter_frame_cache_offset                   = interpreter_frame_mdp_offset - 1,
     interpreter_frame_locals_offset                  = interpreter_frame_cache_offset - 1,
-    interpreter_frame_bcx_offset                     = interpreter_frame_locals_offset - 1,
-    interpreter_frame_initial_sp_offset              = interpreter_frame_bcx_offset - 1,
+    interpreter_frame_bcp_offset                     = interpreter_frame_locals_offset - 1,
+    interpreter_frame_initial_sp_offset              = interpreter_frame_bcp_offset - 1,
 
     interpreter_frame_monitor_block_top_offset       = interpreter_frame_initial_sp_offset,
     interpreter_frame_monitor_block_bottom_offset    = interpreter_frame_initial_sp_offset,
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -26,6 +26,7 @@
 #define CPU_X86_VM_FRAME_X86_INLINE_HPP
 
 #include "code/codeCache.hpp"
+#include "code/vmreg.inline.hpp"
 
 // Inline functions for Intel frames:
 
@@ -168,7 +169,7 @@
   return &(get_interpreterState()->_locals);
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   assert(is_interpreted_frame(), "must be interpreted");
   return (intptr_t*) &(get_interpreterState()->_bcp);
 }
@@ -188,7 +189,7 @@
   return &(get_interpreterState()->_method);
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   assert(is_interpreted_frame(), "must be interpreted");
   return (intptr_t*) &(get_interpreterState()->_mdx);
 }
@@ -210,13 +211,13 @@
   return *(intptr_t**)addr_at(interpreter_frame_last_sp_offset);
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
-  return (intptr_t*)addr_at(interpreter_frame_bcx_offset);
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
+  return (intptr_t*)addr_at(interpreter_frame_bcp_offset);
 }
 
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
-  return (intptr_t*)addr_at(interpreter_frame_mdx_offset);
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
+  return (intptr_t*)addr_at(interpreter_frame_mdp_offset);
 }
 
 
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -134,7 +134,7 @@
         shll(tmp, exact_log2(DataLayout::cell_size));
         addptr(mdp, tmp);
       }
-      movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp);
+      movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp);
     } else {
       assert(MethodData::profile_return(), "either profile call args or call ret");
       update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -826,7 +826,7 @@
 // Test ImethodDataPtr.  If it is null, continue at the specified label
 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp, Label& zero_continue) {
   assert(ProfileInterpreter, "must be profiling interpreter");
-  movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
+  movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
   testptr(mdp, mdp);
   jcc(Assembler::zero, zero_continue);
 }
@@ -853,7 +853,7 @@
   addptr(rbx, in_bytes(MethodData::data_offset()));
   addptr(rax, rbx);
   bind(set_mdp);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
   pop(rbx);
   pop(rax);
 }
@@ -975,7 +975,7 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, offset_of_disp);
   addptr(mdp_in,disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
@@ -983,14 +983,14 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
   addptr(mdp_in, disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in, int constant) {
   assert(ProfileInterpreter, "must be profiling interpreter");
   addptr(mdp_in, constant);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -61,8 +61,8 @@
 
 #else
 
-  void save_bcp()                                          { movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), rsi); }
-  void restore_bcp()                                       { movptr(rsi, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize)); }
+  void save_bcp()                                          { movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), rsi); }
+  void restore_bcp()                                       { movptr(rsi, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize)); }
   void restore_locals()                                    { movptr(rdi, Address(rbp, frame::interpreter_frame_locals_offset * wordSize)); }
 
   // Helpers for runtime call arguments/results
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -841,7 +841,7 @@
 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
                                                          Label& zero_continue) {
   assert(ProfileInterpreter, "must be profiling interpreter");
-  movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
+  movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
   testptr(mdp, mdp);
   jcc(Assembler::zero, zero_continue);
 }
@@ -868,7 +868,7 @@
   addptr(rbx, in_bytes(MethodData::data_offset()));
   addptr(rax, rbx);
   bind(set_mdp);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
   pop(rbx);
   pop(rax);
 }
@@ -991,7 +991,7 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, offset_of_disp);
   addptr(mdp_in, disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
@@ -1001,7 +1001,7 @@
   assert(ProfileInterpreter, "must be profiling interpreter");
   Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
   addptr(mdp_in, disp_address);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
@@ -1009,7 +1009,7 @@
                                                        int constant) {
   assert(ProfileInterpreter, "must be profiling interpreter");
   addptr(mdp_in, constant);
-  movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+  movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
 }
 
 
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -58,11 +58,11 @@
 
   // Interpreter-specific registers
   void save_bcp() {
-    movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), r13);
+    movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), r13);
   }
 
   void restore_bcp() {
-    movptr(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize));
+    movptr(r13, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
   }
 
   void restore_locals() {
--- a/hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interpreter_x86_32.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/interpreter_x86_64.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -28,6 +28,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/register_x86.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/register_x86.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -26,7 +26,6 @@
 #define CPU_X86_VM_REGISTER_X86_HPP
 
 #include "asm/register.hpp"
-#include "vm_version_x86.hpp"
 
 class VMRegImpl;
 typedef VMRegImpl* VMReg;
@@ -59,7 +58,7 @@
   // construction
   inline friend Register as_Register(int encoding);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // accessors
   int   encoding() const                         { assert(is_valid(), "invalid register"); return (intptr_t)this; }
@@ -110,9 +109,10 @@
   // construction
   inline friend FloatRegister as_FloatRegister(int encoding);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // derived registers, offsets, and addresses
+
   FloatRegister successor() const                          { return as_FloatRegister(encoding() + 1); }
 
   // accessors
@@ -152,7 +152,7 @@
   // construction
   friend XMMRegister as_XMMRegister(int encoding);
 
-  VMReg as_VMReg();
+  inline VMReg as_VMReg();
 
   // derived registers, offsets, and addresses
   XMMRegister successor() const                          { return as_XMMRegister(encoding() + 1); }
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
@@ -51,7 +52,7 @@
 
 #ifndef CC_INTERP
 const int method_offset = frame::interpreter_frame_method_offset * wordSize;
-const int bci_offset    = frame::interpreter_frame_bcx_offset    * wordSize;
+const int bcp_offset    = frame::interpreter_frame_bcp_offset    * wordSize;
 const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
 
 //------------------------------------------------------------------------------------------------------------------------
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/methodData.hpp"
@@ -51,7 +52,7 @@
 #ifndef CC_INTERP
 
 const int method_offset = frame::interpreter_frame_method_offset * wordSize;
-const int bci_offset    = frame::interpreter_frame_bcx_offset    * wordSize;
+const int bcp_offset    = frame::interpreter_frame_bcp_offset    * wordSize;
 const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
 
 //-----------------------------------------------------------------------------
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -26,6 +26,7 @@
 #include "asm/macroAssembler.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -26,6 +26,7 @@
 #include "asm/macroAssembler.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/methodData.hpp"
--- a/hotspot/src/cpu/x86/vm/vmreg_x86.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/vmreg_x86.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,13 +25,49 @@
 #ifndef CPU_X86_VM_VMREG_X86_HPP
 #define CPU_X86_VM_VMREG_X86_HPP
 
-  bool is_Register();
-  Register as_Register();
+
+
+inline bool is_Register() {
+  return (unsigned int) value() < (unsigned int) ConcreteRegisterImpl::max_gpr;
+}
+
+inline bool is_FloatRegister() {
+  return value() >= ConcreteRegisterImpl::max_gpr && value() < ConcreteRegisterImpl::max_fpr;
+}
+
+inline bool is_XMMRegister() {
+  return value() >= ConcreteRegisterImpl::max_fpr && value() < ConcreteRegisterImpl::max_xmm;
+}
+
+inline Register as_Register() {
 
-  bool is_FloatRegister();
-  FloatRegister as_FloatRegister();
+  assert( is_Register(), "must be");
+  // Yuk
+#ifdef AMD64
+  return ::as_Register(value() >> 1);
+#else
+  return ::as_Register(value());
+#endif // AMD64
+}
 
-  bool is_XMMRegister();
-  XMMRegister as_XMMRegister();
+inline FloatRegister as_FloatRegister() {
+  assert( is_FloatRegister() && is_even(value()), "must be" );
+  // Yuk
+  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
+}
+
+inline XMMRegister as_XMMRegister() {
+  assert( is_XMMRegister() && is_even(value()), "must be" );
+  // Yuk
+  return ::as_XMMRegister((value() - ConcreteRegisterImpl::max_fpr) >> 3);
+}
+
+inline   bool is_concrete() {
+  assert(is_reg(), "must be");
+#ifndef AMD64
+  if (is_Register()) return true;
+#endif // AMD64
+  return is_even(value());
+}
 
 #endif // CPU_X86_VM_VMREG_X86_HPP
--- a/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -42,48 +42,4 @@
   return VMRegImpl::as_VMReg((encoding() << 3) + ConcreteRegisterImpl::max_fpr);
 }
 
-
-inline bool VMRegImpl::is_Register() {
-  return (unsigned int) value() < (unsigned int) ConcreteRegisterImpl::max_gpr;
-}
-
-inline bool VMRegImpl::is_FloatRegister() {
-  return value() >= ConcreteRegisterImpl::max_gpr && value() < ConcreteRegisterImpl::max_fpr;
-}
-
-inline bool VMRegImpl::is_XMMRegister() {
-  return value() >= ConcreteRegisterImpl::max_fpr && value() < ConcreteRegisterImpl::max_xmm;
-}
-
-inline Register VMRegImpl::as_Register() {
-
-  assert( is_Register(), "must be");
-  // Yuk
-#ifdef AMD64
-  return ::as_Register(value() >> 1);
-#else
-  return ::as_Register(value());
-#endif // AMD64
-}
-
-inline FloatRegister VMRegImpl::as_FloatRegister() {
-  assert( is_FloatRegister() && is_even(value()), "must be" );
-  // Yuk
-  return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
-}
-
-inline XMMRegister VMRegImpl::as_XMMRegister() {
-  assert( is_XMMRegister() && is_even(value()), "must be" );
-  // Yuk
-  return ::as_XMMRegister((value() - ConcreteRegisterImpl::max_fpr) >> 3);
-}
-
-inline   bool VMRegImpl::is_concrete() {
-  assert(is_reg(), "must be");
-#ifndef AMD64
-  if (is_Register()) return true;
-#endif // AMD64
-  return is_even(value());
-}
-
 #endif // CPU_X86_VM_VMREG_X86_INLINE_HPP
--- a/hotspot/src/cpu/x86/vm/x86.ad	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/x86.ad	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -487,6 +487,8 @@
 // To keep related declarations/definitions/uses close together,
 // we switch between source %{ }% and source_hpp %{ }% freely as needed.
 
+class NativeJump;
+
 class CallStubImpl {
  
   //--------------------------------------------------------------
--- a/hotspot/src/cpu/zero/vm/frame_zero.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/zero/vm/frame_zero.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -119,9 +119,6 @@
   return false;
 }
 
-void frame::pd_gc_epilog() {
-}
-
 bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
   ShouldNotCallThis();
   return false;
--- a/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -101,7 +101,7 @@
   return &(get_interpreterState()->_locals);
 }
 
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
   return (intptr_t*) &(get_interpreterState()->_bcp);
 }
 
@@ -113,7 +113,7 @@
   return &(get_interpreterState()->_method);
 }
 
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
   return (intptr_t*) &(get_interpreterState()->_mdx);
 }
 
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -66,6 +66,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/timer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/runtimeService.hpp"
 #include "utilities/decoder.hpp"
@@ -1213,10 +1214,6 @@
   ::abort();
 }
 
-// Unused on Aix for now.
-void os::set_error_file(const char *logfile) {}
-
-
 // This method is a copy of JDK's sysGetLastErrorString
 // from src/solaris/hpi/src/system_md.c
 
--- a/hotspot/src/os/aix/vm/os_aix.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/aix/vm/os_aix.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -36,9 +36,6 @@
 #include <sys/ioctl.h>
 #include <netdb.h>
 
-// Defined in the system headers included above.
-#undef rem_size
-
 inline void* os::thread_local_storage_at(int index) {
   return pthread_getspecific((pthread_key_t)index);
 }
--- a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -202,11 +202,11 @@
   GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size);     /* L2 in saved window */
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
   // Fake value for consistency. It is not going to be used.
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
 #elif defined(i386) || defined(__i386) || defined(__amd64)
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
   GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
 #endif
 
   GEN_OFFS(Klass, _name);
--- a/hotspot/src/os/bsd/dtrace/libjvm_db.c	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/bsd/dtrace/libjvm_db.c	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -164,7 +164,7 @@
   int32_t  SIZE_CodeCache_log2_segment;
 
   uint64_t methodPtr;
-  uint64_t bcx;
+  uint64_t bcp;
 
   Nmethod_t *N;                 /*Inlined methods support */
   Frame_t   prev_fr;
@@ -260,6 +260,9 @@
   uint64_t base;
   int err;
 
+  /* Clear *vmp now in case we jump to fail: */
+  memset(vmp, 0, sizeof(VMStructEntry));
+
   err = ps_pglobal_lookup(J->P, LIBJVM_SO, "gHotSpotVMStructs", &sym_addr);
   CHECK_FAIL(err);
   err = read_pointer(J, sym_addr, &gHotSpotVMStructs);
@@ -1068,19 +1071,9 @@
   return err;
 }
 
-int is_bci(intptr_t bcx) {
-  switch (DATA_MODEL) {
-  case PR_MODEL_LP64:
-    return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
-  case PR_MODEL_ILP32:
-  default:
-    return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
-  }
-}
-
 static int
 name_for_imethod(jvm_agent_t* J,
-                 uint64_t bcx,
+                 uint64_t bcp,
                  uint64_t method,
                  char *result,
                  size_t size,
@@ -1095,7 +1088,7 @@
   err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
   CHECK_FAIL(err);
 
-  bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
+  bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
 
   if (debug)
       fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
@@ -1169,7 +1162,7 @@
     if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
       *is_interpreted = 1;
       if (is_method(J, J->methodPtr)) {
-        return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
+        return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
       }
     }
 
@@ -1326,7 +1319,7 @@
   /* arguments given to read_pointer need to be worst case sized */
   uint64_t methodPtr = 0;
   uint64_t sender_sp;
-  uint64_t bcx = 0;
+  uint64_t bcp = 0;
   int is_interpreted = 0;
   int result = PS_OK;
   int err = PS_OK;
@@ -1357,7 +1350,7 @@
      * regs[R_PC] contains a CALL instruction pc offset.
      */
     pc += 8;
-    bcx          = (uintptr_t) regs[R_L1];
+    bcp          = (uintptr_t) regs[R_L1];
     methodPtr = (uintptr_t) regs[R_L2];
     sender_sp = regs[R_I5];
     if (debug > 2) {
@@ -1385,13 +1378,13 @@
     if (read_pointer(J,  fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
       sender_sp = 0;
     }
-    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
-      bcx = 0;
+    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
+      bcp = 0;
     }
 #endif /* i386 */
 
   J->methodPtr = methodPtr;
-  J->bcx = bcx;
+  J->bcp = bcp;
 
   /* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
    * For example: JVM_SuspendThread frame poins to the top interpreted frame.
@@ -1402,7 +1395,7 @@
    */
 #ifndef X86_COMPILER2
   if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
@@ -1416,7 +1409,7 @@
   }
 #ifdef X86_COMPILER2
   else if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -197,11 +197,11 @@
   GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size);     /* L2 in saved window */
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
   // Fake value for consistency. It is not going to be used.
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
 #elif defined(i386) || defined(__i386) || defined(__amd64)
   GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
   GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
-  GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
+  GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
 #endif
 
   GEN_OFFS(Klass, _name);
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -164,7 +164,7 @@
   int32_t  SIZE_CodeCache_log2_segment;
 
   uint64_t methodPtr;
-  uint64_t bcx;
+  uint64_t bcp;
 
   Nmethod_t *N;                 /*Inlined methods support */
   Frame_t   prev_fr;
@@ -260,6 +260,9 @@
   uint64_t base;
   int err;
 
+  /* Clear *vmp now in case we jump to fail: */
+  memset(vmp, 0, sizeof(VMStructEntry));
+
   err = ps_pglobal_lookup(J->P, LIBJVM_SO, "gHotSpotVMStructs", &sym_addr);
   CHECK_FAIL(err);
   err = read_pointer(J, sym_addr, &gHotSpotVMStructs);
@@ -1068,19 +1071,9 @@
   return err;
 }
 
-int is_bci(intptr_t bcx) {
-  switch (DATA_MODEL) {
-  case PR_MODEL_LP64:
-    return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
-  case PR_MODEL_ILP32:
-  default:
-    return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
-  }
-}
-
 static int
 name_for_imethod(jvm_agent_t* J,
-                 uint64_t bcx,
+                 uint64_t bcp,
                  uint64_t method,
                  char *result,
                  size_t size,
@@ -1095,7 +1088,7 @@
   err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
   CHECK_FAIL(err);
 
-  bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
+  bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
 
   if (debug)
       fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
@@ -1169,7 +1162,7 @@
     if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
       *is_interpreted = 1;
       if (is_method(J, J->methodPtr)) {
-        return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
+        return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
       }
     }
 
@@ -1326,7 +1319,7 @@
   /* arguments given to read_pointer need to be worst case sized */
   uint64_t methodPtr = 0;
   uint64_t sender_sp;
-  uint64_t bcx = 0;
+  uint64_t bcp = 0;
   int is_interpreted = 0;
   int result = PS_OK;
   int err = PS_OK;
@@ -1357,7 +1350,7 @@
      * regs[R_PC] contains a CALL instruction pc offset.
      */
     pc += 8;
-    bcx          = (uintptr_t) regs[R_L1];
+    bcp          = (uintptr_t) regs[R_L1];
     methodPtr = (uintptr_t) regs[R_L2];
     sender_sp = regs[R_I5];
     if (debug > 2) {
@@ -1385,13 +1378,13 @@
     if (read_pointer(J,  fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
       sender_sp = 0;
     }
-    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
-      bcx = 0;
+    if (read_pointer(J,  fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
+      bcp = 0;
     }
 #endif /* i386 */
 
   J->methodPtr = methodPtr;
-  J->bcx = bcx;
+  J->bcp = bcp;
 
   /* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
    * For example: JVM_SuspendThread frame poins to the top interpreted frame.
@@ -1402,7 +1395,7 @@
    */
 #ifndef X86_COMPILER2
   if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
@@ -1416,7 +1409,7 @@
   }
 #ifdef X86_COMPILER2
   else if (is_method(J, J->methodPtr)) {
-    result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+    result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
     /* If the methodPtr is a method then this is highly likely to be
        an interpreter frame */
     if (result >= 0) {
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -59,6 +59,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/timer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/memTracker.hpp"
 #include "services/runtimeService.hpp"
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -62,6 +62,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 #include "runtime/timer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/memTracker.hpp"
 #include "services/runtimeService.hpp"
--- a/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_ppc.hpp"
 
 #ifndef _LP64
 #error "Atomic currently only impleneted for PPC64"
--- a/hotspot/src/os_cpu/aix_ppc/vm/orderAccess_aix_ppc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/aix_ppc/vm/orderAccess_aix_ppc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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
@@ -27,7 +27,6 @@
 #define OS_CPU_AIX_OJDKPPC_VM_ORDERACCESS_AIX_PPC_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_ppc.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_zero.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,6 @@
 #define OS_CPU_BSD_ZERO_VM_ORDERACCESS_BSD_ZERO_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_zero.hpp"
 
 #ifdef ARM
 
--- a/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_ppc.hpp"
 
 #ifndef PPC64
 #error "Atomic currently only implemented for PPC64"
--- a/hotspot/src/os_cpu/linux_ppc/vm/orderAccess_linux_ppc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_ppc/vm/orderAccess_linux_ppc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, SAP AG. 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
@@ -27,7 +27,6 @@
 #define OS_CPU_LINUX_PPC_VM_ORDERACCESS_LINUX_PPC_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_ppc.hpp"
 
 #ifndef PPC64
 #error "OrderAccess currently only implemented for PPC64"
--- a/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -26,7 +26,6 @@
 #define OS_CPU_LINUX_SPARC_VM_ORDERACCESS_LINUX_SPARC_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -118,7 +118,7 @@
       *ret_sp = os::Linux::ucontext_get_sp(uc);
     }
     if (ret_fp) {
-      *ret_fp = os::Linux::ucontext_get_fp(uc);
+      *ret_fp = (intptr_t*)NULL;
     }
   } else {
     // construct empty ExtendedPC for return value checking
@@ -136,18 +136,15 @@
 
 frame os::fetch_frame_from_context(void* ucVoid) {
   intptr_t* sp;
-  intptr_t* fp;
-  ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, &fp);
-  return frame(sp, fp, epc.pc());
+  ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, NULL);
+  return frame(sp, frame::unpatchable, epc.pc());
 }
 
 frame os::get_sender_for_C_frame(frame* fr) {
-  return frame(fr->sender_sp(), fr->link(), fr->sender_pc());
+  return frame(fr->sender_sp(), frame::unpatchable, fr->sender_pc());
 }
 
 frame os::current_frame() {
-  fprintf(stderr, "current_frame()");
-
   intptr_t* sp = StubRoutines::Sparc::flush_callers_register_windows_func()();
   frame myframe(sp, frame::unpatchable,
                 CAST_FROM_FN_PTR(address, os::current_frame));
--- a/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,7 +28,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_zero.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,7 +27,6 @@
 #define OS_CPU_LINUX_ZERO_VM_ORDERACCESS_LINUX_ZERO_INLINE_HPP
 
 #include "runtime/orderAccess.hpp"
-#include "vm_version_zero.hpp"
 
 #ifdef ARM
 
--- a/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class atomic
 
--- a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
-#include "vm_version_sparc.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
--- a/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 inline void Atomic::store    (jbyte    store_value, jbyte*    dest) { *dest = store_value; }
 inline void Atomic::store    (jshort   store_value, jshort*   dest) { *dest = store_value; }
--- a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,6 @@
 
 #include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // The following alternative implementations are needed because
 // Windows 95 doesn't support (some of) the corresponding Windows NT
--- a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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,7 +28,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
-#include "vm_version_x86.hpp"
 
 // Implementation of class OrderAccess.
 
--- a/hotspot/src/share/vm/adlc/main.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/adlc/main.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -213,7 +213,8 @@
   AD.addInclude(AD._CPP_file, "memory/allocation.inline.hpp");
   AD.addInclude(AD._CPP_file, "asm/macroAssembler.inline.hpp");
   AD.addInclude(AD._CPP_file, "code/compiledIC.hpp");
-  AD.addInclude(AD._CPP_file, "code/vmreg.hpp");
+  AD.addInclude(AD._CPP_file, "code/nativeInst.hpp");
+  AD.addInclude(AD._CPP_file, "code/vmreg.inline.hpp");
   AD.addInclude(AD._CPP_file, "gc_interface/collectedHeap.inline.hpp");
   AD.addInclude(AD._CPP_file, "oops/compiledICHolder.hpp");
   AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
@@ -230,23 +231,8 @@
   AD.addInclude(AD._CPP_file, "runtime/sharedRuntime.hpp");
   AD.addInclude(AD._CPP_file, "runtime/stubRoutines.hpp");
   AD.addInclude(AD._CPP_file, "utilities/growableArray.hpp");
-#ifdef TARGET_ARCH_x86
-  AD.addInclude(AD._CPP_file, "nativeInst_x86.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_x86.inline.hpp");
-#endif
-#ifdef TARGET_ARCH_sparc
-  AD.addInclude(AD._CPP_file, "nativeInst_sparc.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_sparc.inline.hpp");
-#endif
-#ifdef TARGET_ARCH_arm
-  AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp");
-#endif
-#ifdef TARGET_ARCH_ppc
-  AD.addInclude(AD._CPP_file, "nativeInst_ppc.hpp");
-  AD.addInclude(AD._CPP_file, "vmreg_ppc.inline.hpp");
-#endif
   AD.addInclude(AD._HPP_file, "memory/allocation.hpp");
+  AD.addInclude(AD._HPP_file, "code/nativeInst.hpp");
   AD.addInclude(AD._HPP_file, "opto/machnode.hpp");
   AD.addInclude(AD._HPP_file, "opto/node.hpp");
   AD.addInclude(AD._HPP_file, "opto/regalloc.hpp");
--- a/hotspot/src/share/vm/asm/assembler.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/asm/assembler.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -26,34 +26,15 @@
 #define SHARE_VM_ASM_ASSEMBLER_HPP
 
 #include "asm/codeBuffer.hpp"
+#include "asm/register.hpp"
 #include "code/oopRecorder.hpp"
 #include "code/relocInfo.hpp"
 #include "memory/allocation.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/growableArray.hpp"
 #include "utilities/top.hpp"
 
-#ifdef TARGET_ARCH_x86
-# include "register_x86.hpp"
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "register_sparc.hpp"
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "register_zero.hpp"
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "register_arm.hpp"
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "register_ppc.hpp"
-# include "vm_version_ppc.hpp"
-#endif
-
 // This file contains platform-independent assembler declarations.
 
 class MacroAssembler;
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -28,6 +28,7 @@
 #include "memory/gcLocker.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/icache.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/xmlstream.hpp"
 
--- a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -30,6 +30,7 @@
 #include "c1/c1_Instruction.hpp"
 #include "c1/c1_LIR.hpp"
 #include "c1/c1_Runtime1.hpp"
+#include "code/nativeInst.hpp"
 #include "utilities/array.hpp"
 #include "utilities/macros.hpp"
 
--- a/hotspot/src/share/vm/c1/c1_Defs.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_Defs.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -26,21 +26,7 @@
 #define SHARE_VM_C1_C1_DEFS_HPP
 
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "register_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "register_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "register_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "register_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "register_ppc.hpp"
-#endif
+#include "asm/register.hpp"
 
 // set frame size and return address offset to these values in blobs
 // (if the compiled frame uses ebp as link pointer on IA; otherwise,
--- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -25,24 +25,8 @@
 #include "precompiled.hpp"
 #include "c1/c1_FrameMap.hpp"
 #include "c1/c1_LIR.hpp"
+#include "code/vmreg.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
-
-
 
 //-----------------------------------------------------
 
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -36,6 +36,7 @@
 #include "interpreter/bytecode.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/compilationPolicy.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/bitMap.inline.hpp"
 
 class BlockListBuilder VALUE_OBJ_CLASS_SPEC {
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -30,27 +30,6 @@
 #include "c1/c1_MacroAssembler.hpp"
 #include "c1/c1_ValueStack.hpp"
 #include "ci/ciInstance.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-# include "vmreg_ppc.inline.hpp"
-#endif
-
 
 void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
   // we must have enough patching space so that call can be inserted
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -34,6 +34,7 @@
 #include "ci/ciObjArray.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/bitMap.inline.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -31,23 +31,8 @@
 #include "c1/c1_LIRGenerator.hpp"
 #include "c1/c1_LinearScan.hpp"
 #include "c1/c1_ValueStack.hpp"
+#include "code/vmreg.inline.hpp"
 #include "utilities/bitMap.inline.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
-
 
 #ifndef PRODUCT
 
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -56,6 +56,7 @@
 #include "runtime/threadCritical.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vframeArray.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/events.hpp"
 
--- a/hotspot/src/share/vm/ci/ciField.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/ci/ciField.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -138,6 +138,17 @@
     return;
   }
 
+  // Access check based on declared_holder. canonical_holder should not be used
+  // to check access because it can erroneously succeed. If this check fails,
+  // propagate the declared holder to will_link() which in turn will bail out
+  // compilation for this field access.
+  if (!Reflection::verify_field_access(klass->get_Klass(), declared_holder->get_Klass(), canonical_holder, field_desc.access_flags(), true)) {
+    _holder = declared_holder;
+    _offset = -1;
+    _is_constant = false;
+    return;
+  }
+
   assert(canonical_holder == field_desc.field_holder(), "just checking");
   initialize_from(&field_desc);
 }
--- a/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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,22 +28,7 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/oopFactory.hpp"
 #include "oops/constantPool.hpp"
-
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 u2 BytecodeConstantPool::find_or_add(BytecodeCPEntry const& bcpe) {
   u2 index;
--- a/hotspot/src/share/vm/classfile/classFileStream.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/classfile/classFileStream.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,22 +25,8 @@
 #ifndef SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP
 #define SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP
 
+#include "utilities/bytes.hpp"
 #include "utilities/top.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 // Input stream for reading .class file
 //
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1639,9 +1639,9 @@
       if (fr.is_first_frame()) break;
       address pc = fr.pc();
       if (fr.is_interpreted_frame()) {
-        intptr_t bcx = fr.interpreter_frame_bcx();
+        address bcp = fr.interpreter_frame_bcp();
         method = fr.interpreter_frame_method();
-        bci =  fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx);
+        bci =  method->bci_from(bcp);
         fr = fr.sender(&map);
       } else {
         CodeBlob* cb = fr.cb();
--- a/hotspot/src/share/vm/classfile/stackMapTable.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/classfile/stackMapTable.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -30,22 +30,8 @@
 #include "memory/allocation.hpp"
 #include "oops/constantPool.hpp"
 #include "oops/method.hpp"
+#include "utilities/bytes.hpp"
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 class StackMapReader;
 
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -45,21 +45,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 #define NOFAILOVER_MAJOR_VERSION                       51
 #define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION  51
@@ -439,7 +425,7 @@
   if (_bci != -1 && method != NULL) {
     streamIndentor si(ss);
     const char* bytecode_name = "<invalid>";
-    if (method->validate_bci_from_bcx(_bci) != -1) {
+    if (method->validate_bci(_bci) != -1) {
       Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci));
       if (Bytecodes::is_defined(code)) {
           bytecode_name = Bytecodes::name(code);
--- a/hotspot/src/share/vm/code/codeBlob.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/code/codeBlob.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -39,21 +39,6 @@
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/vframe.hpp"
 #include "services/memoryService.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
--- a/hotspot/src/share/vm/code/compiledIC.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/code/compiledIC.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -25,23 +25,9 @@
 #ifndef SHARE_VM_CODE_COMPILEDIC_HPP
 #define SHARE_VM_CODE_COMPILEDIC_HPP
 
+#include "code/nativeInst.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "oops/compiledICHolder.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 //-----------------------------------------------------------------------------
 // The CompiledIC represents a compiled inline cache.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/code/nativeInst.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_CODE_NATIVEINST_HPP
+#define SHARE_VM_CODE_NATIVEINST_HPP
+
+#ifdef TARGET_ARCH_x86
+# include "nativeInst_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "nativeInst_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "nativeInst_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "nativeInst_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "nativeInst_ppc.hpp"
+#endif
+
+#endif // SHARE_VM_CODE_NATIVEINST_HPP
--- a/hotspot/src/share/vm/code/nmethod.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/code/nmethod.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -69,7 +69,12 @@
   friend class VMStructs;
  private:
   enum { cache_size = 4 };
-  PcDesc* _pc_descs[cache_size]; // last cache_size pc_descs found
+  // The array elements MUST be volatile! Several threads may modify
+  // and read from the cache concurrently. find_pc_desc_internal has
+  // returned wrong results. C++ compiler (namely xlC12) may duplicate
+  // C++ field accesses if the elements are not volatile.
+  typedef PcDesc* PcDescPtr;
+  volatile PcDescPtr _pc_descs[cache_size]; // last cache_size pc_descs found
  public:
   PcDescCache() { debug_only(_pc_descs[0] = NULL); }
   void    reset_to(PcDesc* initial_pc_desc);
--- a/hotspot/src/share/vm/code/vmreg.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/code/vmreg.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. 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
@@ -25,34 +25,13 @@
 #ifndef SHARE_VM_CODE_VMREG_HPP
 #define SHARE_VM_CODE_VMREG_HPP
 
+#include "asm/register.hpp"
 #include "memory/allocation.hpp"
 #include "utilities/globalDefinitions.hpp"
-#include "asm/register.hpp"
 
 #ifdef COMPILER2
 #include "opto/adlcVMDeps.hpp"
 #include "utilities/ostream.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
 #endif
 
 //------------------------------VMReg------------------------------------------
@@ -107,7 +86,7 @@
   // also a register you could use in the assembler. On machines with
   // 64bit registers only one half of the VMReg (and OptoReg) is considered
   // concrete.
-  bool is_concrete();
+  //  bool is_concrete();
 
   // VMRegs are 4 bytes wide on all platforms
   static const int stack_slot_size;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/code/vmreg.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_CODE_VMREG_INLINE_HPP
+#define SHARE_VM_CODE_VMREG_INLINE_HPP
+
+#include "asm/register.hpp"
+#include "code/vmreg.hpp"
+#ifdef TARGET_ARCH_x86
+# include "vmreg_x86.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "vmreg_sparc.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "vmreg_zero.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "vmreg_arm.inline.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "vmreg_ppc.inline.hpp"
+#endif
+
+#endif // SHARE_VM_CODE_VMREG_INLINE_HPP
--- a/hotspot/src/share/vm/compiler/compileLog.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/compiler/compileLog.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "ci/ciMethod.hpp"
+#include "code/codeCache.hpp"
 #include "compiler/compileLog.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/method.hpp"
--- a/hotspot/src/share/vm/compiler/oopMap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -36,6 +36,9 @@
 #ifdef COMPILER1
 #include "c1/c1_Defs.hpp"
 #endif
+#ifdef COMPILER2
+#include "opto/optoreg.hpp"
+#endif
 
 // OopMapStream
 
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1904,12 +1904,12 @@
   assert(size > new_size, "Split from a smaller block?");
   assert(is_aligned(chunk), "alignment problem");
   assert(size == adjustObjectSize(size), "alignment problem");
-  size_t rem_size = size - new_size;
-  assert(rem_size == adjustObjectSize(rem_size), "alignment problem");
-  assert(rem_size >= MinChunkSize, "Free chunk smaller than minimum");
+  size_t rem_sz = size - new_size;
+  assert(rem_sz == adjustObjectSize(rem_sz), "alignment problem");
+  assert(rem_sz >= MinChunkSize, "Free chunk smaller than minimum");
   FreeChunk* ffc = (FreeChunk*)((HeapWord*)chunk + new_size);
   assert(is_aligned(ffc), "alignment problem");
-  ffc->set_size(rem_size);
+  ffc->set_size(rem_sz);
   ffc->link_next(NULL);
   ffc->link_prev(NULL); // Mark as a free block for other (parallel) GC threads.
   // Above must occur before BOT is updated below.
@@ -1917,18 +1917,18 @@
   OrderAccess::storestore();
   assert(chunk->is_free() && ffc->is_free(), "Error");
   _bt.split_block((HeapWord*)chunk, chunk->size(), new_size);
-  if (rem_size < SmallForDictionary) {
+  if (rem_sz < SmallForDictionary) {
     bool is_par = (SharedHeap::heap()->n_par_threads() > 0);
-    if (is_par) _indexedFreeListParLocks[rem_size]->lock();
+    if (is_par) _indexedFreeListParLocks[rem_sz]->lock();
     assert(!is_par ||
            (SharedHeap::heap()->n_par_threads() ==
             SharedHeap::heap()->workers()->active_workers()), "Mismatch");
     returnChunkToFreeList(ffc);
-    split(size, rem_size);
-    if (is_par) _indexedFreeListParLocks[rem_size]->unlock();
+    split(size, rem_sz);
+    if (is_par) _indexedFreeListParLocks[rem_sz]->unlock();
   } else {
     returnChunkToDictionary(ffc);
-    split(size ,rem_size);
+    split(size, rem_sz);
   }
   chunk->set_size(new_size);
   return chunk;
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -891,6 +891,10 @@
   guarantee(!g1h->mark_in_progress(), "invariant");
 }
 
+bool ConcurrentMark::nextMarkBitmapIsClear() {
+  return _nextMarkBitMap->getNextMarkedWordAddress(_heap_start, _heap_end) == _heap_end;
+}
+
 class NoteStartOfMarkHRClosure: public HeapRegionClosure {
 public:
   bool doHeapRegion(HeapRegion* r) {
@@ -3358,7 +3362,8 @@
 
 // abandon current marking iteration due to a Full GC
 void ConcurrentMark::abort() {
-  // Clear all marks to force marking thread to do nothing
+  // Clear all marks in the next bitmap for the next marking cycle. This will allow us to skip the next
+  // concurrent bitmap clearing.
   _nextMarkBitMap->clearAll();
 
   // Note we cannot clear the previous marking bitmap here
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -736,6 +736,9 @@
   // Clear the next marking bitmap (will be called concurrently).
   void clearNextBitmap();
 
+  // Return whether the next mark bitmap has no marks set.
+  bool nextMarkBitmapIsClear();
+
   // These two do the work that needs to be done before and after the
   // initial root checkpoint. Since this checkpoint can be done at two
   // different points (i.e. an explicit pause or piggy-backed on a
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -277,9 +277,13 @@
 
       // We now want to allow clearing of the marking bitmap to be
       // suspended by a collection pause.
-      {
+      // We may have aborted just before the remark. Do not bother clearing the
+      // bitmap then, as it has been done during mark abort.
+      if (!cm()->has_aborted()) {
         SuspendibleThreadSetJoiner sts;
         _cm->clearNextBitmap();
+      } else {
+        assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
       }
     }
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -2950,10 +2950,17 @@
   }
 }
 
-CompactibleSpace* G1CollectedHeap::first_compactible_space() {
-  return n_regions() > 0 ? region_at(0) : NULL;
-}
-
+HeapRegion* G1CollectedHeap::next_compaction_region(const HeapRegion* from) const {
+  // We're not using an iterator given that it will wrap around when
+  // it reaches the last region and this is not what we want here.
+  for (uint index = from->hrs_index() + 1; index < n_regions(); index++) {
+    HeapRegion* hr = region_at(index);
+    if (!hr->isHumongous()) {
+      return hr;
+    }
+  }
+  return NULL;
+}
 
 Space* G1CollectedHeap::space_containing(const void* addr) const {
   return heap_region_containing(addr);
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1158,19 +1158,19 @@
   }
 
   // The total number of regions in the heap.
-  uint n_regions() { return _hrs.length(); }
+  uint n_regions() const { return _hrs.length(); }
 
   // The max number of regions in the heap.
-  uint max_regions() { return _hrs.max_length(); }
+  uint max_regions() const { return _hrs.max_length(); }
 
   // The number of regions that are completely free.
-  uint free_regions() { return _free_list.length(); }
+  uint free_regions() const { return _free_list.length(); }
 
   // The number of regions that are not completely free.
-  uint used_regions() { return n_regions() - free_regions(); }
+  uint used_regions() const { return n_regions() - free_regions(); }
 
   // The number of regions available for "regular" expansion.
-  uint expansion_regions() { return _expansion_regions; }
+  uint expansion_regions() const { return _expansion_regions; }
 
   // Factory method for HeapRegion instances. It will return NULL if
   // the allocation fails.
@@ -1392,8 +1392,7 @@
   // As above but starting from region r
   void collection_set_iterate_from(HeapRegion* r, HeapRegionClosure *blk);
 
-  // Returns the first (lowest address) compactible space in the heap.
-  virtual CompactibleSpace* first_compactible_space();
+  HeapRegion* next_compaction_region(const HeapRegion* from) const;
 
   // A CollectedHeap will contain some number of spaces.  This finds the
   // space containing a given address, or else returns NULL.
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1047,7 +1047,7 @@
 
   bool new_in_marking_window = _in_marking_window;
   bool new_in_marking_window_im = false;
-  if (during_initial_mark_pause()) {
+  if (last_pause_included_initial_mark) {
     new_in_marking_window = true;
     new_in_marking_window_im = true;
   }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -76,7 +76,6 @@
   // When collecting the permanent generation Method*s may be moving,
   // so we either have to flush all bcp data or convert it into bci.
   CodeCache::gc_prologue();
-  Threads::gc_prologue();
 
   bool marked_for_unloading = false;
 
@@ -106,7 +105,6 @@
   //  Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
   //  Universe::set_heap_used_at_last_gc(Universe::heap()->used());
 
-  Threads::gc_epilogue();
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
@@ -201,6 +199,23 @@
   CompactPoint _cp;
   HeapRegionSetCount _humongous_regions_removed;
 
+  bool is_cp_initialized() const {
+    return _cp.space != NULL;
+  }
+
+  void prepare_for_compaction(HeapRegion* hr, HeapWord* end) {
+    // If this is the first live region that we came across which we can compact,
+    // initialize the CompactPoint.
+    if (!is_cp_initialized()) {
+      _cp.space = hr;
+      _cp.threshold = hr->initialize_threshold();
+    }
+    hr->prepare_for_compaction(&_cp);
+    // Also clear the part of the card table that will be unused after
+    // compaction.
+    _mrbs->clear(MemRegion(hr->compaction_top(), end));
+  }
+
   void free_humongous_region(HeapRegion* hr) {
     HeapWord* end = hr->end();
     FreeRegionList dummy_free_list("Dummy Free List for G1MarkSweep");
@@ -212,18 +227,15 @@
     _humongous_regions_removed.increment(1u, hr->capacity());
 
     _g1h->free_humongous_region(hr, &dummy_free_list, false /* par */);
-    hr->prepare_for_compaction(&_cp);
-    // Also clear the part of the card table that will be unused after
-    // compaction.
-    _mrbs->clear(MemRegion(hr->compaction_top(), end));
+    prepare_for_compaction(hr, end);
     dummy_free_list.remove_all();
   }
 
 public:
-  G1PrepareCompactClosure(CompactibleSpace* cs)
+  G1PrepareCompactClosure()
   : _g1h(G1CollectedHeap::heap()),
     _mrbs(_g1h->g1_barrier_set()),
-    _cp(NULL, cs, cs->initialize_threshold()),
+    _cp(NULL),
     _humongous_regions_removed() { }
 
   void update_sets() {
@@ -246,10 +258,7 @@
         assert(hr->continuesHumongous(), "Invalid humongous.");
       }
     } else {
-      hr->prepare_for_compaction(&_cp);
-      // Also clear the part of the card table that will be unused after
-      // compaction.
-      _mrbs->clear(MemRegion(hr->compaction_top(), hr->end()));
+      prepare_for_compaction(hr, hr->end());
     }
     return false;
   }
@@ -267,14 +276,7 @@
   GCTraceTime tm("phase 2", G1Log::fine() && Verbose, true, gc_timer(), gc_tracer()->gc_id());
   GenMarkSweep::trace("2");
 
-  // find the first region
-  HeapRegion* r = g1h->region_at(0);
-  CompactibleSpace* sp = r;
-  if (r->isHumongous() && oop(r->bottom())->is_gc_marked()) {
-    sp = r->next_compaction_space();
-  }
-
-  G1PrepareCompactClosure blk(sp);
+  G1PrepareCompactClosure blk;
   g1h->heap_region_iterate(&blk);
   blk.update_sets();
 }
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -381,18 +381,7 @@
 }
 
 CompactibleSpace* HeapRegion::next_compaction_space() const {
-  // We're not using an iterator given that it will wrap around when
-  // it reaches the last region and this is not what we want here.
-  G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  uint index = hrs_index() + 1;
-  while (index < g1h->n_regions()) {
-    HeapRegion* hr = g1h->region_at(index);
-    if (!hr->isHumongous()) {
-      return hr;
-    }
-    index += 1;
-  }
-  return NULL;
+  return G1CollectedHeap::heap()->next_compaction_region(this);
 }
 
 void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -119,7 +119,7 @@
 public:
   const char* name() { return _name; }
 
-  uint length() { return _count.length(); }
+  uint length() const { return _count.length(); }
 
   bool is_empty() { return _count.length() == 0; }
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -180,7 +180,6 @@
     size_policy->major_collection_begin();
 
     CodeCache::gc_prologue();
-    Threads::gc_prologue();
     BiasedLocking::preserve_marks();
 
     // Capture heap size before collection for printing.
@@ -251,7 +250,6 @@
     MetaspaceAux::verify_metrics();
 
     BiasedLocking::restore_marks();
-    Threads::gc_epilogue();
     CodeCache::gc_epilogue();
     JvmtiExport::gc_epilogue();
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1066,7 +1066,6 @@
   ClassLoaderDataGraph::purge();
   MetaspaceAux::verify_metrics();
 
-  Threads::gc_epilogue();
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
@@ -2068,7 +2067,6 @@
     size_policy->major_collection_begin();
 
     CodeCache::gc_prologue();
-    Threads::gc_prologue();
 
     COMPILER2_PRESENT(DerivedPointerTable::clear());
 
--- a/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -25,29 +25,12 @@
 #ifndef SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP
 #define SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP
 
+#include "asm/macroAssembler.hpp"
 #include "code/stubs.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/top.hpp"
-#ifdef TARGET_ARCH_x86
-# include "interp_masm_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "interp_masm_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "interp_masm_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "interp_masm_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "interp_masm_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "interp_masm_ppc_64.hpp"
-#endif
 
 // This file contains the platform-independent parts
 // of the abstract interpreter and the abstract interpreter generator.
@@ -75,6 +58,8 @@
 //------------------------------------------------------------------------------------------------------------------------
 // The C++ interface to the bytecode interpreter(s).
 
+class InterpreterMacroAssembler;
+
 class AbstractInterpreter: AllStatic {
   friend class VMStructs;
   friend class Interpreter;
--- a/hotspot/src/share/vm/interpreter/bytecode.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/bytecode.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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,21 +28,7 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.hpp"
 #include "oops/method.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 class ciBytecodeStream;
 
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. 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
@@ -32,21 +32,6 @@
 #include "runtime/frame.hpp"
 #include "runtime/globals.hpp"
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 #ifdef CC_INTERP
 
@@ -56,6 +41,8 @@
 
 // CVM definitions find hotspot equivalents...
 
+class InterpreterMacroAssembler;
+
 union VMJavaVal64 {
     jlong   l;
     jdouble d;
--- a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -29,21 +29,7 @@
 #include "memory/allocation.hpp"
 #include "oops/method.hpp"
 #include "runtime/handles.inline.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 // A BytecodeStream is used for fast iteration over the bytecodes
 // of a Method*.
--- a/hotspot/src/share/vm/interpreter/bytecodes.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -26,21 +26,7 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/method.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 
 #if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/interpreter/interp_masm.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_INTERPRETER_INTERP_MASM_HPP
+#define SHARE_VM_INTERPRETER_INTERP_MASM_HPP
+
+#include "asm/macroAssembler.hpp"
+
+#ifdef TARGET_ARCH_x86
+# include "interp_masm_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_sparc
+# include "interp_masm_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_zero
+# include "interp_masm_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_arm
+# include "interp_masm_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_32
+# include "interp_masm_ppc_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_64
+# include "interp_masm_ppc_64.hpp"
+#endif
+
+#endif // SHARE_VM_INTERPRETER_INTERP_MASM_HPP
--- a/hotspot/src/share/vm/interpreter/interpreter.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/interpreter.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,7 @@
 #include "interpreter/bytecodeInterpreter.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
@@ -80,9 +81,35 @@
   }
 }
 
+CodeletMark::CodeletMark(InterpreterMacroAssembler*& masm,
+                         const char* description,
+                         Bytecodes::Code bytecode) :
+  _clet((InterpreterCodelet*)AbstractInterpreter::code()->request(codelet_size())),
+  _cb(_clet->code_begin(), _clet->code_size()) {
+  // Request all space (add some slack for Codelet data).
+  assert(_clet != NULL, "we checked not enough space already");
+
+  // Initialize Codelet attributes.
+  _clet->initialize(description, bytecode);
+  // Create assembler for code generation.
+  masm = new InterpreterMacroAssembler(&_cb);
+  _masm = &masm;
+}
+
+CodeletMark::~CodeletMark() {
+  // Align so printing shows nop's instead of random code at the end (Codelets are aligned).
+  (*_masm)->align(wordSize);
+  // Make sure all code is in code buffer.
+  (*_masm)->flush();
+
+  // Commit Codelet.
+  AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->strings());
+  // Make sure nobody can use _masm outside a CodeletMark lifespan.
+  *_masm = NULL;
+}
 
 //------------------------------------------------------------------------------------------------------------------------
-// Implementation of  platform independent aspects of Interpreter
+// Implementation of platform independent aspects of Interpreter
 
 void AbstractInterpreter::initialize() {
   if (_code != NULL) return;
--- a/hotspot/src/share/vm/interpreter/interpreter.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/interpreter.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -37,6 +37,8 @@
 // This file contains the platform-independent parts
 // of the interpreter and the interpreter generator.
 
+class InterpreterMacroAssembler;
+
 //------------------------------------------------------------------------------------------------------------------------
 // An InterpreterCodelet is a piece of interpreter code. All
 // interpreter code is generated into little codelets which
@@ -99,42 +101,17 @@
     int codelet_size = AbstractInterpreter::code()->available_space() - 2*K;
 
     // Guarantee there's a little bit of code space left.
-    guarantee (codelet_size > 0 && (size_t)codelet_size >  2*K,
-               "not enough space for interpreter generation");
+    guarantee(codelet_size > 0 && (size_t)codelet_size > 2*K,
+              "not enough space for interpreter generation");
 
     return codelet_size;
   }
 
  public:
-  CodeletMark(
-    InterpreterMacroAssembler*& masm,
-    const char* description,
-    Bytecodes::Code bytecode = Bytecodes::_illegal):
-    _clet((InterpreterCodelet*)AbstractInterpreter::code()->request(codelet_size())),
-    _cb(_clet->code_begin(), _clet->code_size())
-
-  { // request all space (add some slack for Codelet data)
-    assert (_clet != NULL, "we checked not enough space already");
-
-    // initialize Codelet attributes
-    _clet->initialize(description, bytecode);
-    // create assembler for code generation
-    masm  = new InterpreterMacroAssembler(&_cb);
-    _masm = &masm;
-  }
-
-  ~CodeletMark() {
-    // align so printing shows nop's instead of random code at the end (Codelets are aligned)
-    (*_masm)->align(wordSize);
-    // make sure all code is in code buffer
-    (*_masm)->flush();
-
-
-    // commit Codelet
-    AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->strings());
-    // make sure nobody can use _masm outside a CodeletMark lifespan
-    *_masm = NULL;
-  }
+  CodeletMark(InterpreterMacroAssembler*& masm,
+              const char* description,
+              Bytecodes::Code bytecode = Bytecodes::_illegal);
+  ~CodeletMark();
 };
 
 // Wrapper classes to produce Interpreter/InterpreterGenerator from either
@@ -142,9 +119,10 @@
 
 class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateInterpreter) {
 
-  public:
+ public:
   // Debugging/printing
-  static InterpreterCodelet* codelet_containing(address pc)     { return (InterpreterCodelet*)_code->stub_containing(pc); }
+  static InterpreterCodelet* codelet_containing(address pc) { return (InterpreterCodelet*)_code->stub_containing(pc); }
+
 #ifdef TARGET_ARCH_x86
 # include "interpreter_x86.hpp"
 #endif
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -48,6 +48,7 @@
 #include "runtime/deoptimization.hpp"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/icache.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/java.hpp"
 #include "runtime/jfieldIDWorkaround.hpp"
@@ -57,21 +58,6 @@
 #include "runtime/synchronizer.hpp"
 #include "runtime/threadCritical.hpp"
 #include "utilities/events.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
 #ifdef COMPILER2
 #include "opto/runtime.hpp"
 #endif
--- a/hotspot/src/share/vm/interpreter/templateInterpreter.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/templateInterpreter.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -26,6 +26,8 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterGenerator.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "interpreter/interp_masm.hpp"
+#include "interpreter/templateInterpreter.hpp"
 #include "interpreter/templateTable.hpp"
 
 #ifndef CC_INTERP
--- a/hotspot/src/share/vm/interpreter/templateInterpreter.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/templateInterpreter.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -33,6 +33,8 @@
 
 #ifndef CC_INTERP
 
+class InterpreterMacroAssembler;
+
 //------------------------------------------------------------------------------------------------------------------------
 // A little wrapper class to group tosca-specific entry points into a unit.
 // (tosca = Top-Of-Stack CAche)
--- a/hotspot/src/share/vm/interpreter/templateTable.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/templateTable.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "gc_interface/collectedHeap.hpp"
+#include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
 #include "runtime/timer.hpp"
 
--- a/hotspot/src/share/vm/interpreter/templateTable.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/templateTable.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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,24 +28,6 @@
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.hpp"
 #include "runtime/frame.hpp"
-#ifdef TARGET_ARCH_x86
-# include "interp_masm_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "interp_masm_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "interp_masm_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "interp_masm_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "interp_masm_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "interp_masm_ppc_64.hpp"
-#endif
 
 #ifndef CC_INTERP
 // All the necessary definitions used for (bytecode) template generation. Instead of
@@ -53,6 +35,7 @@
 // and the snippet generator, a template is assigned to each bytecode which can be
 // used to generate the bytecode's implementation if needed.
 
+class InterpreterMacroAssembler;
 
 // A Template describes the properties of a code template for a given bytecode
 // and provides a generator to generate the code template.
--- a/hotspot/src/share/vm/memory/filemap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/memory/filemap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,7 @@
 #include "runtime/arguments.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/defaultStream.hpp"
 
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1088,7 +1088,7 @@
   guarantee(_n_gens = 2, "Wrong number of generations");
   Generation* old_gen = _gens[1];
   // Start by compacting into same gen.
-  CompactPoint cp(old_gen, NULL, NULL);
+  CompactPoint cp(old_gen);
   old_gen->prepare_for_compaction(&cp);
   Generation* young_gen = _gens[0];
   young_gen->prepare_for_compaction(&cp);
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. 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
@@ -76,7 +76,6 @@
   // When collecting the permanent generation Method*s may be moving,
   // so we either have to flush all bcp data or convert it into bci.
   CodeCache::gc_prologue();
-  Threads::gc_prologue();
 
   // Increment the invocation count
   _total_invocations++;
@@ -132,7 +131,6 @@
     rs->invalidate_or_clear(old_gen);
   }
 
-  Threads::gc_epilogue();
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
--- a/hotspot/src/share/vm/memory/space.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/memory/space.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -330,9 +330,9 @@
   Generation* gen;
   CompactibleSpace* space;
   HeapWord* threshold;
-  CompactPoint(Generation* _gen, CompactibleSpace* _space,
-               HeapWord* _threshold) :
-    gen(_gen), space(_space), threshold(_threshold) {}
+
+  CompactPoint(Generation* _gen) :
+    gen(_gen), space(NULL), threshold(0) {}
 };
 
 
--- a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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 @@
 #include "gc_implementation/shared/gcUtil.hpp"
 #include "oops/typeArrayOop.hpp"
 #include "runtime/perfData.hpp"
+#include "runtime/vm_version.hpp"
 
 class GlobalTLABStats;
 
--- a/hotspot/src/share/vm/oops/constantPool.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/oops/constantPool.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -31,22 +31,8 @@
 #include "oops/symbol.hpp"
 #include "oops/typeArrayOop.hpp"
 #include "runtime/handles.hpp"
+#include "utilities/bytes.hpp"
 #include "utilities/constantTag.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 // A ConstantPool is an array containing class constants as described in the
 // class file.
--- a/hotspot/src/share/vm/oops/method.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/oops/method.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -240,6 +240,9 @@
 
 
 int Method::bci_from(address bcp) const {
+  if (is_native() && bcp == 0) {
+    return 0;
+  }
 #ifdef ASSERT
   { ResourceMark rm;
   assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(),
@@ -250,24 +253,23 @@
 }
 
 
-// Return (int)bcx if it appears to be a valid BCI.
-// Return bci_from((address)bcx) if it appears to be a valid BCP.
+int Method::validate_bci(int bci) const {
+  return (bci == 0 || bci < code_size()) ? bci : -1;
+}
+
+// Return bci if it appears to be a valid bcp
 // Return -1 otherwise.
 // Used by profiling code, when invalid data is a possibility.
 // The caller is responsible for validating the Method* itself.
-int Method::validate_bci_from_bcx(intptr_t bcx) const {
+int Method::validate_bci_from_bcp(address bcp) const {
   // keep bci as -1 if not a valid bci
   int bci = -1;
-  if (bcx == 0 || (address)bcx == code_base()) {
+  if (bcp == 0 || bcp == code_base()) {
     // code_size() may return 0 and we allow 0 here
     // the method may be native
     bci = 0;
-  } else if (frame::is_bci(bcx)) {
-    if (bcx < code_size()) {
-      bci = (int)bcx;
-    }
-  } else if (contains((address)bcx)) {
-    bci = (address)bcx - code_base();
+  } else if (contains(bcp)) {
+    bci = bcp - code_base();
   }
   // Assert that if we have dodged any asserts, bci is negative.
   assert(bci == -1 || bci == bci_from(bcp_from(bci)), "sane bci if >=0");
--- a/hotspot/src/share/vm/oops/method.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/oops/method.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -649,7 +649,8 @@
   // Returns the byte code index from the byte code pointer
   int     bci_from(address bcp) const;
   address bcp_from(int     bci) const;
-  int validate_bci_from_bcx(intptr_t bcx) const;
+  int validate_bci_from_bcp(address bcp) const;
+  int validate_bci(int bci) const;
 
   // Returns the line number for a bci if debugging information for the method is prowided,
   // -1 is returned otherwise.
--- a/hotspot/src/share/vm/oops/methodData.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/oops/methodData.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -2338,10 +2338,6 @@
     return dp - ((address)_data);
   }
 
-  address di_to_dp(int di) {
-    return (address)data_layout_at(di);
-  }
-
   // bci to di/dp conversion.
   address bci_to_dp(int bci);
   int bci_to_di(int bci) {
--- a/hotspot/src/share/vm/oops/oop.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -42,21 +42,6 @@
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
 #include "utilities/macros.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
 
 // Implementation of all inlined member functions defined in oop.hpp
 // We need a separate file to avoid circular references
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/opto/ad.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_OPTO_AD_HPP
+#define SHARE_VM_OPTO_AD_HPP
+
+#ifdef TARGET_ARCH_MODEL_x86_32
+# include "adfiles/ad_x86_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_x86_64
+# include "adfiles/ad_x86_64.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_sparc
+# include "adfiles/ad_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_zero
+# include "adfiles/ad_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_arm
+# include "adfiles/ad_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_32
+# include "adfiles/ad_ppc_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_64
+# include "adfiles/ad_ppc_64.hpp"
+#endif
+
+#endif // SHARE_VM_OPTO_AD_HPP
--- a/hotspot/src/share/vm/opto/buildOopMap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/buildOopMap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/vmreg.inline.hpp"
 #include "compiler/oopMap.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
@@ -32,21 +33,6 @@
 #include "opto/phase.hpp"
 #include "opto/regalloc.hpp"
 #include "opto/rootnode.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
 
 // The functions in this file builds OopMaps after all scheduling is done.
 //
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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
@@ -24,28 +24,8 @@
 
 #include "precompiled.hpp"
 #include "opto/c2compiler.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/runtime.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 // register information defined by ADLC
 extern const char register_save_policy[];
--- a/hotspot/src/share/vm/opto/compile.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/compile.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -69,27 +69,6 @@
 #include "runtime/timer.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/copy.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 
 // -------------------- Compile::mach_constant_base_node -----------------------
--- a/hotspot/src/share/vm/opto/gcm.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/gcm.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -35,28 +35,6 @@
 #include "opto/rootnode.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/deoptimization.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
-
 
 // Portions of code courtesy of Clifford Click
 
--- a/hotspot/src/share/vm/opto/lcm.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/lcm.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. 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
@@ -24,33 +24,13 @@
 
 #include "precompiled.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/block.hpp"
 #include "opto/c2compiler.hpp"
 #include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
 #include "opto/machnode.hpp"
 #include "opto/runtime.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 // Optimization - Graph Style
 
--- a/hotspot/src/share/vm/opto/library_call.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "asm/macroAssembler.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "compiler/compileBroker.hpp"
--- a/hotspot/src/share/vm/opto/locknode.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/locknode.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. 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,27 +28,9 @@
 #include "opto/node.hpp"
 #include "opto/opcodes.hpp"
 #include "opto/subnode.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
+
+class BiasedLockingCounters;
+class RTMLockingCounters;
 
 //------------------------------BoxLockNode------------------------------------
 class BoxLockNode : public Node {
--- a/hotspot/src/share/vm/opto/matcher.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
 #include "opto/idealGraphPrinter.hpp"
@@ -37,27 +38,6 @@
 #include "opto/type.hpp"
 #include "opto/vectornode.hpp"
 #include "runtime/os.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 OptoReg::Name OptoReg::c_frame_pointer;
 
--- a/hotspot/src/share/vm/opto/optoreg.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/optoreg.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. 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
@@ -25,6 +25,30 @@
 #ifndef SHARE_VM_OPTO_OPTOREG_HPP
 #define SHARE_VM_OPTO_OPTOREG_HPP
 
+// AdGlobals contains c2 specific register handling code as specified
+// in the .ad files.
+#ifdef TARGET_ARCH_MODEL_x86_32
+# include "adfiles/adGlobals_x86_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_x86_64
+# include "adfiles/adGlobals_x86_64.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_sparc
+# include "adfiles/adGlobals_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_zero
+# include "adfiles/adGlobals_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_arm
+# include "adfiles/adGlobals_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_32
+# include "adfiles/adGlobals_ppc_32.hpp"
+#endif
+#ifdef TARGET_ARCH_MODEL_ppc_64
+# include "adfiles/adGlobals_ppc_64.hpp"
+#endif
+
 //------------------------------OptoReg----------------------------------------
 // We eventually need Registers for the Real World.  Registers are essentially
 // non-SSA names.  A Register is represented as a number.  Non-regular values
--- a/hotspot/src/share/vm/opto/output.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -30,10 +30,12 @@
 #include "compiler/compileBroker.hpp"
 #include "compiler/oopMap.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
 #include "opto/locknode.hpp"
 #include "opto/machnode.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/output.hpp"
 #include "opto/regalloc.hpp"
 #include "opto/runtime.hpp"
--- a/hotspot/src/share/vm/opto/output.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/output.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -25,29 +25,9 @@
 #ifndef SHARE_VM_OPTO_OUTPUT_HPP
 #define SHARE_VM_OPTO_OUTPUT_HPP
 
+#include "opto/ad.hpp"
 #include "opto/block.hpp"
 #include "opto/node.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 class Arena;
 class Bundle;
--- a/hotspot/src/share/vm/opto/phaseX.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/phaseX.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1089,7 +1089,7 @@
 #endif
 
   while (i != NULL) {
-#ifndef PRODUCT
+#ifdef ASSERT
     if (loop_count >= K) {
       dump_infinite_loop_info(i);
     }
--- a/hotspot/src/share/vm/opto/regmask.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/regmask.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,29 +23,9 @@
  */
 
 #include "precompiled.hpp"
+#include "opto/ad.hpp"
 #include "opto/compile.hpp"
 #include "opto/regmask.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */
 
--- a/hotspot/src/share/vm/opto/regmask.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/regmask.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -27,27 +27,6 @@
 
 #include "code/vmreg.hpp"
 #include "opto/optoreg.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
 
 // Some fun naming (textual) substitutions:
 //
--- a/hotspot/src/share/vm/opto/runtime.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/runtime.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/compiledIC.hpp"
 #include "code/icBuffer.hpp"
 #include "code/nmethod.hpp"
@@ -45,6 +46,7 @@
 #include "memory/oopFactory.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
+#include "opto/ad.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
 #include "opto/cfgnode.hpp"
@@ -68,27 +70,6 @@
 #include "runtime/vframe_hp.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/preserveException.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
 
 
 // For debugging purposes:
--- a/hotspot/src/share/vm/opto/runtime.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/opto/runtime.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 
 #include "code/codeBlob.hpp"
 #include "opto/machnode.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/type.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/rtmLocking.hpp"
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -70,6 +70,7 @@
 # include "code/exceptionHandlerTable.hpp"
 # include "code/jvmticmlr.h"
 # include "code/location.hpp"
+# include "code/nativeInst.hpp"
 # include "code/nmethod.hpp"
 # include "code/oopRecorder.hpp"
 # include "code/pcDesc.hpp"
@@ -106,6 +107,7 @@
 # include "interpreter/bytecodes.hpp"
 # include "interpreter/cppInterpreter.hpp"
 # include "interpreter/interpreter.hpp"
+# include "interpreter/interp_masm.hpp"
 # include "interpreter/invocationCounter.hpp"
 # include "interpreter/linkResolver.hpp"
 # include "interpreter/templateInterpreter.hpp"
@@ -228,6 +230,7 @@
 # include "utilities/array.hpp"
 # include "utilities/bitMap.hpp"
 # include "utilities/bitMap.inline.hpp"
+# include "utilities/bytes.hpp"
 # include "utilities/constantTag.hpp"
 # include "utilities/copy.hpp"
 # include "utilities/debug.hpp"
@@ -250,6 +253,7 @@
 # include "libadt/dict.hpp"
 # include "libadt/set.hpp"
 # include "libadt/vectset.hpp"
+# include "opto/ad.hpp"
 # include "opto/addnode.hpp"
 # include "opto/adlcVMDeps.hpp"
 # include "opto/block.hpp"
--- a/hotspot/src/share/vm/prims/forte.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/forte.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -234,9 +234,8 @@
     *method_p = method;
     if (!method->is_valid_method()) return false;
 
-    intptr_t bcx = fr->interpreter_frame_bcx();
-
-    int      bci = method->validate_bci_from_bcx(bcx);
+    address bcp = fr->interpreter_frame_bcp();
+    int bci = method->validate_bci_from_bcp(bcp);
 
     // note: bci is set to -1 if not a valid bci
     *bci_p = bci;
--- a/hotspot/src/share/vm/prims/jniCheck.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -37,21 +37,6 @@
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/jfieldIDWorkaround.hpp"
 #include "runtime/thread.inline.hpp"
-#ifdef TARGET_ARCH_x86
-# include "jniTypes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "jniTypes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "jniTypes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "jniTypes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "jniTypes_ppc.hpp"
-#endif
 
 // Complain every extra number of unplanned local refs
 #define CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD 32
--- a/hotspot/src/share/vm/prims/jvm.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -59,6 +59,7 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vm_operations.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/management.hpp"
 #include "services/threadService.hpp"
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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,21 +28,8 @@
 #include "oops/fieldStreams.hpp"
 #include "prims/jvmtiClassFileReconstituter.hpp"
 #include "runtime/signature.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
+
 // FIXME: add Deprecated attribute
 // FIXME: fix Synthetic attribute
 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -26,6 +26,7 @@
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
 #include "oops/instanceMirrorKlass.hpp"
 #include "oops/objArrayKlass.hpp"
--- a/hotspot/src/share/vm/prims/unsafe.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/unsafe.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -38,6 +38,7 @@
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/reflection.hpp"
 #include "runtime/synchronizer.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/threadService.hpp"
 #include "trace/tracing.hpp"
 #include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 
+#include "code/codeCache.hpp"
 #include "memory/metadataFactory.hpp"
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
@@ -38,6 +39,7 @@
 #include "runtime/arguments.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 
 #include "utilities/array.hpp"
 #include "utilities/debug.hpp"
--- a/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "runtime/advancedThresholdPolicy.hpp"
 #include "runtime/simpleThresholdPolicy.inline.hpp"
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -38,6 +38,7 @@
 #include "runtime/globals_extension.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/management.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/defaultStream.hpp"
@@ -1537,8 +1538,10 @@
     heap_alignment = G1CollectedHeap::conservative_max_heap_alignment();
   }
 #endif // INCLUDE_ALL_GCS
-  _conservative_max_heap_alignment = MAX3(heap_alignment, os::max_page_size(),
-    CollectorPolicy::compute_heap_alignment());
+  _conservative_max_heap_alignment = MAX4(heap_alignment,
+                                          (size_t)os::vm_allocation_granularity(),
+                                          os::max_page_size(),
+                                          CollectorPolicy::compute_heap_alignment());
 }
 
 void Arguments::set_ergonomics_flags() {
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "code/codeCache.hpp"
 #include "code/debugInfoRec.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
@@ -50,44 +51,6 @@
 #include "runtime/vframe_hp.hpp"
 #include "utilities/events.hpp"
 #include "utilities/xmlstream.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vmreg_ppc.inline.hpp"
-#endif
-#ifdef COMPILER2
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/ad_ppc_64.hpp"
-#endif
-#endif // COMPILER2
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/javaClasses.hpp"
 #include "code/codeBlob.hpp"
+#include "code/nativeInst.hpp"
 #include "memory/allocation.hpp"
 #include "prims/jvm.h"
 #include "runtime/dtraceJSDT.hpp"
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -26,21 +26,6 @@
 #define SHARE_VM_RUNTIME_DTRACEJSDT_HPP
 
 #include "code/nmethod.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 class RegisteredProbes;
 typedef jlong OpaqueProbes;
--- a/hotspot/src/share/vm/runtime/fprofiler.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/fprofiler.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/classLoader.hpp"
+#include "code/codeCache.hpp"
 #include "code/vtableStubs.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
 #include "interpreter/interpreter.hpp"
--- a/hotspot/src/share/vm/runtime/frame.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/frame.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,6 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
+#include "code/vmreg.inline.hpp"
 #include "compiler/abstractCompiler.hpp"
 #include "compiler/disassembler.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
@@ -48,21 +50,6 @@
 #include "runtime/thread.inline.hpp"
 #include "utilities/decoder.hpp"
 
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
@@ -412,91 +399,32 @@
   *interpreter_frame_method_addr() = method;
 }
 
-void frame::interpreter_frame_set_bcx(intptr_t bcx) {
-  assert(is_interpreted_frame(), "Not an interpreted frame");
-  if (ProfileInterpreter) {
-    bool formerly_bci = is_bci(interpreter_frame_bcx());
-    bool is_now_bci = is_bci(bcx);
-    *interpreter_frame_bcx_addr() = bcx;
-
-    intptr_t mdx = interpreter_frame_mdx();
-
-    if (mdx != 0) {
-      if (formerly_bci) {
-        if (!is_now_bci) {
-          // The bcx was just converted from bci to bcp.
-          // Convert the mdx in parallel.
-          MethodData* mdo = interpreter_frame_method()->method_data();
-          assert(mdo != NULL, "");
-          int mdi = mdx - 1; // We distinguish valid mdi from zero by adding one.
-          address mdp = mdo->di_to_dp(mdi);
-          interpreter_frame_set_mdx((intptr_t)mdp);
-        }
-      } else {
-        if (is_now_bci) {
-          // The bcx was just converted from bcp to bci.
-          // Convert the mdx in parallel.
-          MethodData* mdo = interpreter_frame_method()->method_data();
-          assert(mdo != NULL, "");
-          int mdi = mdo->dp_to_di((address)mdx);
-          interpreter_frame_set_mdx((intptr_t)mdi + 1); // distinguish valid from 0.
-        }
-      }
-    }
-  } else {
-    *interpreter_frame_bcx_addr() = bcx;
-  }
-}
-
 jint frame::interpreter_frame_bci() const {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  intptr_t bcx = interpreter_frame_bcx();
-  return is_bci(bcx) ? bcx : interpreter_frame_method()->bci_from((address)bcx);
-}
-
-void frame::interpreter_frame_set_bci(jint bci) {
-  assert(is_interpreted_frame(), "interpreted frame expected");
-  assert(!is_bci(interpreter_frame_bcx()), "should not set bci during GC");
-  interpreter_frame_set_bcx((intptr_t)interpreter_frame_method()->bcp_from(bci));
+  address bcp = interpreter_frame_bcp();
+  return interpreter_frame_method()->bci_from(bcp);
 }
 
 address frame::interpreter_frame_bcp() const {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  intptr_t bcx = interpreter_frame_bcx();
-  return is_bci(bcx) ? interpreter_frame_method()->bcp_from(bcx) : (address)bcx;
+  return (address)*interpreter_frame_bcp_addr();
 }
 
 void frame::interpreter_frame_set_bcp(address bcp) {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  assert(!is_bci(interpreter_frame_bcx()), "should not set bcp during GC");
-  interpreter_frame_set_bcx((intptr_t)bcp);
-}
-
-void frame::interpreter_frame_set_mdx(intptr_t mdx) {
-  assert(is_interpreted_frame(), "Not an interpreted frame");
-  assert(ProfileInterpreter, "must be profiling interpreter");
-  *interpreter_frame_mdx_addr() = mdx;
+  *interpreter_frame_bcp_addr() = (intptr_t)bcp;
 }
 
 address frame::interpreter_frame_mdp() const {
   assert(ProfileInterpreter, "must be profiling interpreter");
   assert(is_interpreted_frame(), "interpreted frame expected");
-  intptr_t bcx = interpreter_frame_bcx();
-  intptr_t mdx = interpreter_frame_mdx();
-
-  assert(!is_bci(bcx), "should not access mdp during GC");
-  return (address)mdx;
+  return (address)*interpreter_frame_mdp_addr();
 }
 
 void frame::interpreter_frame_set_mdp(address mdp) {
   assert(is_interpreted_frame(), "interpreted frame expected");
-  if (mdp == NULL) {
-    // Always allow the mdp to be cleared.
-    interpreter_frame_set_mdx((intptr_t)mdp);
-  }
-  intptr_t bcx = interpreter_frame_bcx();
-  assert(!is_bci(bcx), "should not set mdp during GC");
-  interpreter_frame_set_mdx((intptr_t)mdp);
+  assert(ProfileInterpreter, "must be profiling interpreter");
+  *interpreter_frame_mdp_addr() = (intptr_t)mdp;
 }
 
 BasicObjectLock* frame::next_monitor_in_interpreter_frame(BasicObjectLock* current) const {
@@ -1182,24 +1110,6 @@
   }
 }
 
-void frame::gc_prologue() {
-  if (is_interpreted_frame()) {
-    // set bcx to bci to become Method* position independent during GC
-    interpreter_frame_set_bcx(interpreter_frame_bci());
-  }
-}
-
-
-void frame::gc_epilogue() {
-  if (is_interpreted_frame()) {
-    // set bcx back to bcp for interpreter
-    interpreter_frame_set_bcx((intptr_t)interpreter_frame_bcp());
-  }
-  // call processor specific epilog function
-  pd_gc_epilog();
-}
-
-
 # ifdef ENABLE_ZAP_DEAD_LOCALS
 
 void frame::CheckValueClosure::do_oop(oop* p) {
--- a/hotspot/src/share/vm/runtime/frame.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -30,29 +30,6 @@
 #include "runtime/monitorChunk.hpp"
 #include "runtime/registerMap.hpp"
 #include "utilities/top.hpp"
-#ifdef COMPILER2
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
-#endif // COMPILER2
 #ifdef ZERO
 #ifdef TARGET_ARCH_zero
 # include "stack_zero.hpp"
@@ -241,8 +218,8 @@
 
  private:
   intptr_t** interpreter_frame_locals_addr() const;
-  intptr_t*  interpreter_frame_bcx_addr() const;
-  intptr_t*  interpreter_frame_mdx_addr() const;
+  intptr_t*  interpreter_frame_bcp_addr() const;
+  intptr_t*  interpreter_frame_mdp_addr() const;
 
  public:
   // Locals
@@ -252,23 +229,13 @@
 
   void interpreter_frame_set_locals(intptr_t* locs);
 
-  // byte code index/pointer (use these functions for unchecked frame access only!)
-  intptr_t interpreter_frame_bcx() const                  { return *interpreter_frame_bcx_addr(); }
-  void interpreter_frame_set_bcx(intptr_t bcx);
-
   // byte code index
   jint interpreter_frame_bci() const;
-  void interpreter_frame_set_bci(jint bci);
 
   // byte code pointer
   address interpreter_frame_bcp() const;
   void    interpreter_frame_set_bcp(address bcp);
 
-  // Unchecked access to the method data index/pointer.
-  // Only use this if you know what you are doing.
-  intptr_t interpreter_frame_mdx() const                  { return *interpreter_frame_mdx_addr(); }
-  void interpreter_frame_set_mdx(intptr_t mdx);
-
   // method data pointer
   address interpreter_frame_mdp() const;
   void    interpreter_frame_set_mdp(address dp);
@@ -437,10 +404,6 @@
   // RedefineClasses support for finding live interpreted methods on the stack
   void metadata_do(void f(Metadata*));
 
-  void gc_prologue();
-  void gc_epilogue();
-  void pd_gc_epilog();
-
 # ifdef ENABLE_ZAP_DEAD_LOCALS
  private:
   class CheckValueClosure: public OopClosure {
@@ -477,7 +440,6 @@
   // Verification
   void verify(const RegisterMap* map);
   static bool verify_return_pc(address x);
-  static bool is_bci(intptr_t bcx);
   // Usage:
   // assert(frame::verify_return_pc(return_address), "must be a return pc");
 
--- a/hotspot/src/share/vm/runtime/frame.inline.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/frame.inline.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -31,21 +31,6 @@
 #include "oops/method.hpp"
 #include "runtime/frame.hpp"
 #include "runtime/signature.hpp"
-#ifdef TARGET_ARCH_x86
-# include "jniTypes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "jniTypes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "jniTypes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "jniTypes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "jniTypes_ppc.hpp"
-#endif
 #ifdef ZERO
 #ifdef TARGET_ARCH_zero
 # include "entryFrame_zero.hpp"
@@ -55,26 +40,6 @@
 #endif
 #endif
 
-// This file holds platform-independent bodies of inline functions for frames.
-
-// Note: The bcx usually contains the bcp; however during GC it contains the bci
-//       (changed by gc_prologue() and gc_epilogue()) to be Method* position
-//       independent. These accessors make sure the correct value is returned
-//       by testing the range of the bcx value. bcp's are guaranteed to be above
-//       max_method_code_size, since methods are always allocated in OldSpace and
-//       Eden is allocated before OldSpace.
-//
-//       The bcp is accessed sometimes during GC for ArgumentDescriptors; than
-//       the correct translation has to be performed (was bug).
-
-inline bool frame::is_bci(intptr_t bcx) {
-#ifdef _LP64
-  return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ;
-#else
-  return 0 <= bcx && bcx <= max_method_code_size;
-#endif
-}
-
 inline bool frame::is_entry_frame() const {
   return StubRoutines::returns_to_call_stub(pc());
 }
--- a/hotspot/src/share/vm/runtime/java.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/java.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -65,21 +65,6 @@
 #include "utilities/histogram.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/vmError.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
 #if INCLUDE_ALL_GCS
 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
--- a/hotspot/src/share/vm/runtime/os.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/os.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "gc_implementation/shared/vmGCOperations.hpp"
@@ -49,6 +50,7 @@
 #include "runtime/os.inline.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/memTracker.hpp"
 #include "services/threadService.hpp"
--- a/hotspot/src/share/vm/runtime/registerMap.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/registerMap.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. 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
@@ -27,21 +27,6 @@
 
 #include "code/vmreg.hpp"
 #include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_ARCH_x86
-# include "register_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "register_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "register_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "register_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "register_ppc.hpp"
-#endif
 
 class JavaThread;
 
--- a/hotspot/src/share/vm/runtime/relocator.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/relocator.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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
@@ -27,21 +27,7 @@
 
 #include "interpreter/bytecodes.hpp"
 #include "oops/method.hpp"
-#ifdef TARGET_ARCH_x86
-# include "bytes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "bytes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "bytes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "bytes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "bytes_ppc.hpp"
-#endif
+#include "utilities/bytes.hpp"
 
 // This code has been converted from the 1.1E java virtual machine
 // Thanks to the JavaTopics group for using the code
--- a/hotspot/src/share/vm/runtime/rframe.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/rframe.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
--- a/hotspot/src/share/vm/runtime/safepoint.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -56,26 +56,6 @@
 #include "services/runtimeService.hpp"
 #include "utilities/events.hpp"
 #include "utilities/macros.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-# include "vmreg_ppc.inline.hpp"
-#endif
 #if INCLUDE_ALL_GCS
 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
 #include "gc_implementation/shared/suspendibleThreadSet.hpp"
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/compiledIC.hpp"
 #include "code/scopeDesc.hpp"
 #include "code/vtableStubs.hpp"
@@ -59,26 +60,6 @@
 #include "utilities/hashtable.inline.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/xmlstream.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-# include "vmreg_x86.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-# include "vmreg_sparc.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-# include "vmreg_zero.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-# include "vmreg_arm.inline.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-# include "vmreg_ppc.inline.hpp"
-#endif
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
--- a/hotspot/src/share/vm/runtime/stackValueCollection.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/stackValueCollection.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,21 +24,6 @@
 
 #include "precompiled.hpp"
 #include "runtime/stackValueCollection.hpp"
-#ifdef TARGET_ARCH_x86
-# include "jniTypes_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "jniTypes_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "jniTypes_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "jniTypes_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "jniTypes_ppc.hpp"
-#endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
--- a/hotspot/src/share/vm/runtime/statSampler.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/statSampler.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. 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
@@ -33,21 +33,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/os.hpp"
 #include "runtime/statSampler.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
+#include "runtime/vm_version.hpp"
 
 // --------------------------------------------------------
 // StatSamplerTask
--- a/hotspot/src/share/vm/runtime/stubRoutines.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -31,21 +31,6 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/stubCodeGenerator.hpp"
 #include "utilities/top.hpp"
-#ifdef TARGET_ARCH_x86
-# include "nativeInst_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "nativeInst_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "nativeInst_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "nativeInst_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "nativeInst_ppc.hpp"
-#endif
 
 // StubRoutines provides entry points to assembly routines used by
 // compiled code and the run-time system. Platform-specific entry
--- a/hotspot/src/share/vm/runtime/thread.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/scopeDesc.hpp"
 #include "compiler/compileBroker.hpp"
 #include "interpreter/interpreter.hpp"
@@ -74,6 +75,7 @@
 #include "runtime/vframe_hp.hpp"
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/attachListener.hpp"
 #include "services/management.hpp"
 #include "services/memTracker.hpp"
@@ -2647,20 +2649,6 @@
 }
 
 
-// GC support
-static void frame_gc_epilogue(frame* f, const RegisterMap* map) { f->gc_epilogue(); }
-
-void JavaThread::gc_epilogue() {
-  frames_do(frame_gc_epilogue);
-}
-
-
-static void frame_gc_prologue(frame* f, const RegisterMap* map) { f->gc_prologue(); }
-
-void JavaThread::gc_prologue() {
-  frames_do(frame_gc_prologue);
-}
-
 // If the caller is a NamedThread, then remember, in the current scope,
 // the given JavaThread in its _processed_thread field.
 class RememberProcessedThread: public StackObj {
@@ -4149,18 +4137,6 @@
   }
 }
 
-void Threads::gc_epilogue() {
-  ALL_JAVA_THREADS(p) {
-    p->gc_epilogue();
-  }
-}
-
-void Threads::gc_prologue() {
-  ALL_JAVA_THREADS(p) {
-    p->gc_prologue();
-  }
-}
-
 void Threads::deoptimized_wrt_marked_nmethods() {
   ALL_JAVA_THREADS(p) {
     p->deoptimized_wrt_marked_nmethods();
--- a/hotspot/src/share/vm/runtime/thread.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1416,10 +1416,6 @@
   // RedefineClasses Support
   void metadata_do(void f(Metadata*));
 
-  // Memory management operations
-  void gc_epilogue();
-  void gc_prologue();
-
   // Misc. operations
   char* name() const { return (char*)get_thread_name(); }
   void print_on(outputStream* st) const;
@@ -1899,8 +1895,6 @@
   // RedefineClasses support
   static void metadata_do(void f(Metadata*));
 
-  static void gc_epilogue();
-  static void gc_prologue();
 #ifdef ASSERT
   static bool is_vm_complete() { return _vm_complete; }
 #endif
--- a/hotspot/src/share/vm/runtime/vframe.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vframe.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -511,8 +511,8 @@
 
 inline void vframeStreamCommon::fill_from_interpreter_frame() {
   Method* method = _frame.interpreter_frame_method();
-  intptr_t  bcx    = _frame.interpreter_frame_bcx();
-  int       bci    = method->validate_bci_from_bcx(bcx);
+  address   bcp    = _frame.interpreter_frame_bcp();
+  int       bci    = method->validate_bci_from_bcp(bcp);
   // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
   if (bci < 0) {
     found_bad_method_frame();
--- a/hotspot/src/share/vm/runtime/vframeArray.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vframeArray.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/vmreg.inline.hpp"
 #include "interpreter/bytecode.hpp"
 #include "interpreter/interpreter.hpp"
 #include "memory/allocation.inline.hpp"
@@ -296,9 +297,9 @@
     src->lock()->move_to(src->obj(), top->lock());
   }
   if (ProfileInterpreter) {
-    iframe()->interpreter_frame_set_mdx(0); // clear out the mdp.
+    iframe()->interpreter_frame_set_mdp(0); // clear out the mdp.
   }
-  iframe()->interpreter_frame_set_bcx((intptr_t)bcp); // cannot use bcp because frame is not initialized yet
+  iframe()->interpreter_frame_set_bcp(bcp);
   if (ProfileInterpreter) {
     MethodData* mdo = method()->method_data();
     if (mdo != NULL) {
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -193,33 +193,13 @@
 #include "opto/movenode.hpp"
 #include "opto/narrowptrnode.hpp"
 #include "opto/opaquenode.hpp"
+#include "opto/optoreg.hpp"
 #include "opto/phaseX.hpp"
 #include "opto/parse.hpp"
 #include "opto/regalloc.hpp"
 #include "opto/rootnode.hpp"
 #include "opto/subnode.hpp"
 #include "opto/vectornode.hpp"
-#ifdef TARGET_ARCH_MODEL_x86_32
-# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
-# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
-# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
-# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
-# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
 #endif // COMPILER2
 
 // Note: the cross-product of (c1, c2, product, nonproduct, ...),
--- a/hotspot/src/share/vm/runtime/vm_operations.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vm_operations.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
 #include "compiler/compilerOracle.hpp"
 #include "gc_implementation/shared/isGCActiveMark.hpp"
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -26,21 +26,7 @@
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/arguments.hpp"
-#ifdef TARGET_ARCH_x86
-# include "vm_version_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_sparc
-# include "vm_version_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_zero
-# include "vm_version_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_arm
-# include "vm_version_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_ppc
-# include "vm_version_ppc.hpp"
-#endif
+#include "runtime/vm_version.hpp"
 
 const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
 const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -128,4 +128,20 @@
   static unsigned int calc_parallel_worker_threads();
 };
 
+#ifdef TARGET_ARCH_x86
+# include "vm_version_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "vm_version_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "vm_version_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "vm_version_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "vm_version_ppc.hpp"
+#endif
+
 #endif // SHARE_VM_RUNTIME_VM_VERSION_HPP
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,17 +25,16 @@
 #ifndef SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP
 #define SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP
 
+#include "classfile/vmSymbols.hpp"
 #include "runtime/arguments.hpp"
-#include "classfile/vmSymbols.hpp"
-#include "utilities/ostream.hpp"
-#include "runtime/vm_version.hpp"
+#include "runtime/os.hpp"
 #include "runtime/vmThread.hpp"
-#include "runtime/os.hpp"
 #include "services/diagnosticArgument.hpp"
 #include "services/diagnosticCommand.hpp"
+#include "services/diagnosticCommand_ext.hpp"
 #include "services/diagnosticFramework.hpp"
-#include "services/diagnosticCommand_ext.hpp"
 #include "utilities/macros.hpp"
+#include "utilities/ostream.hpp"
 
 class HelpDCmd : public DCmdWithParser {
 protected:
--- a/hotspot/src/share/vm/services/diagnosticFramework.hpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/services/diagnosticFramework.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -29,7 +29,6 @@
 #include "memory/allocation.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/os.hpp"
-#include "runtime/vm_version.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/ostream.hpp"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/utilities/bytes.hpp	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_UTILITIES_BYTES_HPP
+#define SHARE_VM_UTILITIES_BYTES_HPP
+
+#ifdef TARGET_ARCH_x86
+# include "bytes_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "bytes_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "bytes_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "bytes_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "bytes_ppc.hpp"
+#endif
+
+#endif // SHARE_VM_UTILITIES_BYTES_HPP
--- a/hotspot/src/share/vm/utilities/debug.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -48,6 +48,7 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
+#include "runtime/vm_version.hpp"
 #include "services/heapDumper.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/events.hpp"
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -28,6 +28,7 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/os.hpp"
+#include "runtime/vm_version.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/ostream.hpp"
 #include "utilities/top.hpp"
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Fri Aug 08 12:54:39 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
 #include "gc_interface/collectedHeap.hpp"
 #include "prims/whitebox.hpp"
--- a/hotspot/test/TEST.groups	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/TEST.groups	Fri Aug 08 12:54:39 2014 -0700
@@ -117,15 +117,6 @@
 # Tests that require compact3 API's
 #
 needs_compact3 = \
-  compiler/8009761/Test8009761.java \
-  compiler/whitebox/DeoptimizeMethodTest.java \
-  compiler/whitebox/SetForceInlineMethodTest.java \
-  compiler/whitebox/SetDontInlineMethodTest.java \
-  compiler/whitebox/DeoptimizeAllTest.java \
-  compiler/whitebox/MakeMethodNotCompilableTest.java \
-  compiler/whitebox/ClearMethodStateTest.java \
-  compiler/whitebox/EnqueueMethodForCompilationTest.java \
-  compiler/whitebox/IsMethodCompilableTest.java \
   gc/6581734/Test6581734.java \
   gc/7072527/TestFullGCCount.java \
   gc/g1/TestHumongousAllocInitialMark.java \
@@ -138,11 +129,7 @@
   runtime/InternalApi/ThreadCpuTimesDeadlock.java \
   serviceability/threads/TestFalseDeadLock.java \
   serviceability/jvmti/GetObjectSizeOverflow.java \
-  serviceability/jvmti/TestRedefineWithUnresolvedClass.java \
-  compiler/tiered/NonTieredLevelsTest.java \
-  compiler/tiered/TieredLevelsTest.java \
-  compiler/intrinsics/bmi/verifycode \
-  runtime/whitebox/WBStackSize.java
+  serviceability/jvmti/TestRedefineWithUnresolvedClass.java
 
 # Compact 2 adds full VM tests
 compact2 = \
@@ -199,8 +186,7 @@
 
 # Tests that require compact2 API's
 #
-needs_compact2 = \
-  compiler/6589834/Test_ia32.java
+needs_compact2 =
 
 # All tests that run on the most minimal configuration: Minimal VM on Compact 1
 compact1_minimal = \
--- a/hotspot/test/compiler/5091921/Test6890943.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/5091921/Test6890943.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -27,163 +27,195 @@
  * @bug 6890943
  * @summary JVM mysteriously gives wrong result on 64-bit 1.6 VMs in hotspot mode.
  *
- * @run shell/timeout=240 Test6890943.sh
+ * @run main/othervm/timeout=240 Test6890943
  */
-import java.util.*;
+
 import java.io.*;
-import java.util.regex.*;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Scanner;
 
 public class Test6890943 {
-  public static final boolean AIR = true, ROCK = false;
-  public static void main(String[] args) {
-    new Test6890943().go();
-  }
+    public static final boolean AIR = true, ROCK = false;
+    private static final Path PATH = Paths.get(System.getProperty("test.src", "."));
+    private static final Path INPUT_FILE = PATH.resolve("input6890943.txt");
+    private static final Path GOLDEN_FILE = PATH.resolve("output6890943.txt");
+
+    public static void main(String[] args) {
+        new Test6890943().go();
+    }
 
-  int r, c, f, t;
-  boolean[][] grid;
+    int r, c, f, t;
+    boolean[][] grid;
+
+    public void go() {
+        Scanner in, golden;
+        try {
+            in = new Scanner(new FileInputStream(INPUT_FILE.toFile()));
+            golden = new Scanner(new FileInputStream(GOLDEN_FILE.toFile()));
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("TEST failure: can't open test file", e);
+        }
+        in.useDelimiter("\\s+");
+        golden.useDelimiter("\\s+");
 
-  public void go() {
-    Scanner s = new Scanner(System.in);
-    s.useDelimiter("\\s+");
-    int T = s.nextInt();
-    for (t = 0 ; t < T ; t++) {
-      r = s.nextInt(); c = s.nextInt(); f = s.nextInt();
-      grid = new boolean[r][c];
-      for (int x = 0 ; x < r ; x++) {
-        String line = s.next();
-        for (int y = 0 ; y < c ; y++) grid[x][y] = line.charAt(y) == '.';
-      }
-      int digs = solve();
-      String res = digs == -1 ? "No" : "Yes " + digs;
-      System.out.printf("Case #%d: %s\n", t+1, res);
+        int T = in.nextInt();
+        for (t = 0; t < T; t++) {
+            r = in.nextInt();
+            c = in.nextInt();
+            f = in.nextInt();
+            grid = new boolean[r][c];
+            for (int x = 0; x < r; x++) {
+                String line = in.next();
+                for (int y = 0; y < c; y++) {
+                    grid[x][y] = line.charAt(y) == '.';
+                }
+            }
+            int digs = solve();
+            String result = "Case #" + (t + 1) + ": " + (digs == -1 ? "No" : "Yes " + digs);
+            System.out.println(result);
+            // Compare with golden string from the file
+            String goldenStr = golden.nextLine();
+            if (!result.equals(goldenStr)) {
+                System.err.println("FAIL: strings are not equal\n"
+                        + "-- Result: " + result + "\n"
+                        + "-- Golden: " + goldenStr);
+                throw new RuntimeException("FAIL: Result string is not equal to the golden");
+            }
+        }
     }
-  }
 
-  Map<Integer, Integer> M = new HashMap<Integer, Integer>();
+    Map<Integer, Integer> M = new HashMap<Integer, Integer>();
 
-  private int solve() {
-    M = new HashMap<Integer, Integer>();
-    M.put(calcWalkingRange(0, 0), 0);
-    for (int digDown = 0 ; digDown < r ; digDown++) {
-      Map<Integer, Integer> tries = new HashMap<Integer, Integer>();
-      for (Map.Entry<Integer, Integer> m : M.entrySet()) {
-        int q = m.getKey();
-        if (depth(q) != (digDown)) continue;
-        if (stuck(q)) continue;
-        tries.put(q, m.getValue());
-      }
+    private int solve() {
+        M = new HashMap<Integer, Integer>();
+        M.put(calcWalkingRange(0, 0), 0);
+        for (int digDown = 0; digDown < r; digDown++) {
+            Map<Integer, Integer> tries = new HashMap<Integer, Integer>();
+            for (Map.Entry<Integer, Integer> m : M.entrySet()) {
+                int q = m.getKey();
+                if (depth(q) != (digDown)) continue;
+                if (stuck(q)) continue;
+                tries.put(q, m.getValue());
+            }
+
+            for (Map.Entry<Integer, Integer> m : tries.entrySet()) {
+                int q = m.getKey();
+                int fallLeftDelta = 0, fallRightDelta = 0;
+                //fall left
+                int fallLeft = fall(digDown, start(q));
+                if (fallLeft > 0) {
+                    fallLeftDelta = 1;
+                    if (fallLeft <= f) addToM(calcWalkingRange(digDown + fallLeft, start(q)), m.getValue());
+                }
+
+                //fall right
+                int fallRight = fall(digDown, end(q));
+                if (fallRight > 0) {
+                    fallRightDelta = 1;
+
+                    if (fallRight <= f) addToM(calcWalkingRange(digDown + fallRight, end(q)), m.getValue());
+                }
 
-      for (Map.Entry<Integer, Integer> m : tries.entrySet()) {
-        int q = m.getKey();
-        int fallLeftDelta = 0, fallRightDelta = 0;
-        //fall left
-        int fallLeft = fall(digDown, start(q));
-        if (fallLeft > 0) {
-          fallLeftDelta = 1;
-          if (fallLeft <= f) addToM(calcWalkingRange(digDown+fallLeft, start(q)), m.getValue());
-        }
+                for (int p = start(q) + fallLeftDelta; p <= end(q) - fallRightDelta; p++) {
+                    //goLeft
+                    for (int digSpot = p; digSpot > start(q) + fallLeftDelta; digSpot--) {
+                        int fallDown = 1 + fall(digDown + 1, digSpot);
+                        if (fallDown <= f) {
+                            if (fallDown == 1) {
+                                addToM(calcWalkingRange(digDown + 1, digSpot, digSpot, p),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            } else {
+                                addToM(calcWalkingRange(digDown + fallDown, digSpot),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            }
+                        }
+                    }
 
-        //fall right
-        int fallRight = fall(digDown, end(q));
-        if (fallRight > 0) {
-          fallRightDelta = 1;
-
-          if (fallRight <= f) addToM(calcWalkingRange(digDown+fallRight, end(q)), m.getValue());
+                    //goRight
+                    for (int digSpot = p; digSpot < end(q) - fallRightDelta; digSpot++) {
+                        int fallDown = 1 + fall(digDown + 1, digSpot);
+                        if (fallDown <= f) {
+                            if (fallDown == 1) {
+                                addToM(calcWalkingRange(digDown + 1, digSpot, p, digSpot),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            } else {
+                                addToM(calcWalkingRange(digDown + fallDown, digSpot),
+                                        m.getValue() + Math.abs(digSpot - p) + 1);
+                            }
+                        }
+                    }
+                }
+            }
         }
 
-        for (int p = start(q) + fallLeftDelta ; p <= end(q) - fallRightDelta ; p++) {
-          //goLeft
-          for (int digSpot = p ; digSpot > start(q) +fallLeftDelta ; digSpot--) {
-            int fallDown = 1+fall(digDown+1, digSpot);
-            if (fallDown <= f) {
-              if (fallDown == 1) {
-                addToM(calcWalkingRange(digDown + 1, digSpot, digSpot, p), m.getValue() + Math.abs(digSpot-p)+1);
-              } else {
-                addToM(calcWalkingRange(digDown + fallDown, digSpot), m.getValue() + Math.abs(digSpot-p)+1);
-              }
-            }
-          }
+        int result = Integer.MAX_VALUE;
+        for (Map.Entry<Integer, Integer> m : M.entrySet()) {
+            if (depth(m.getKey()) == r - 1) result = Math.min(m.getValue(), result);
+        }
 
-          //goRight
-          for (int digSpot = p ; digSpot < end(q)-fallRightDelta ;digSpot++) {
-            int fallDown = 1+fall(digDown+1, digSpot);
-            if (fallDown <= f) {
-              if (fallDown == 1) {
-                addToM(calcWalkingRange(digDown + 1, digSpot, p, digSpot), m.getValue() + Math.abs(digSpot-p)+1);
-              } else {
-                addToM(calcWalkingRange(digDown + fallDown, digSpot), m.getValue() + Math.abs(digSpot-p)+1);
-              }
-            }
-          }
-        }
-      }
+        if (result == Integer.MAX_VALUE) return -1;
+        return result;
+    }
+
+    private void addToM(int q, int i) {
+        Integer original = M.get(q);
+        if (original == null) M.put(q, i);
+        else M.put(q, Math.min(original, i));
     }
 
-    int result = Integer.MAX_VALUE;
-    for (Map.Entry<Integer, Integer> m : M.entrySet()) {
-      if (depth(m.getKey()) == r-1) result = Math.min(m.getValue(), result);
+    private int fall(int row, int column) {
+        int res = 0;
+        for (int p = row + 1; p < r; p++) {
+            if (grid[p][column] == AIR) res++;
+            else break;
+        }
+        return res;
+    }
+
+    private boolean stuck(int q) {
+        return start(q) == end(q);
+    }
+
+    private int depth(int q) {
+        return q % 50;
     }
 
-    if (result == Integer.MAX_VALUE) return -1;
-    return result;
-  }
-
-  private void addToM(int q, int i) {
-    Integer original = M.get(q);
-    if ( original == null ) M.put(q, i);
-    else M.put(q, Math.min(original, i));
-  }
-
-  private int fall(int row, int column) {
-    int res = 0;
-    for ( int p = row+1 ; p < r ; p++) {
-      if (grid[p][column] == AIR) res++;
-      else break;
+    private int start(int q) {
+        return q / (50 * 50);
     }
-    return res;
-  }
-
-  private boolean stuck(int q) {
-    return start(q) == end(q);
-  }
-
-  private int depth(int q) {
-    return q % 50;
-  }
 
-  private int start(int q) {
-    return q / (50*50);
-  }
-
-  private int end(int q) {
-    return (q / 50) % 50;
-  }
-
-  private int calcWalkingRange(int depth, int pos) {
-    return calcWalkingRange(depth, pos, Integer.MAX_VALUE, Integer.MIN_VALUE);
-  }
-
-  private int calcWalkingRange(int depth, int pos, int airOverrideStart, int airOverrideEnd) {
-    int left = pos, right = pos;
-    if (depth >= r) return (c-1)*50 + depth;
+    private int end(int q) {
+        return (q / 50) % 50;
+    }
 
-    while (left > 0) {
-      if (grid[depth][left-1] == ROCK && (left-1 < airOverrideStart || left-1 > airOverrideEnd)) break;
-      if (depth < r-1 && grid[depth+1][left-1] == AIR) {
-        left--;
-        break;
-      }
-      left--;
-    }
-    while (right < c-1) {
-      if (grid[depth][right+1] == ROCK && (right+1 < airOverrideStart || right+1 > airOverrideEnd)) break;
-      if (depth < r-1 && grid[depth+1][right+1] == AIR) {
-        right++;
-        break;
-      }
-      right++;
+    private int calcWalkingRange(int depth, int pos) {
+        return calcWalkingRange(depth, pos, Integer.MAX_VALUE, Integer.MIN_VALUE);
     }
 
-    return left *50*50 + right*50 + depth;
-  }
+    private int calcWalkingRange(int depth, int pos, int airOverrideStart, int airOverrideEnd) {
+        int left = pos, right = pos;
+        if (depth >= r) return (c - 1) * 50 + depth;
+
+        while (left > 0) {
+            if (grid[depth][left - 1] == ROCK && (left - 1 < airOverrideStart || left - 1 > airOverrideEnd)) break;
+            if (depth < r - 1 && grid[depth + 1][left - 1] == AIR) {
+                left--;
+                break;
+            }
+            left--;
+        }
+        while (right < c - 1) {
+            if (grid[depth][right + 1] == ROCK && (right + 1 < airOverrideStart || right + 1 > airOverrideEnd)) break;
+            if (depth < r - 1 && grid[depth + 1][right + 1] == AIR) {
+                right++;
+                break;
+            }
+            right++;
+        }
+
+        return left * 50 * 50 + right * 50 + depth;
+    }
 }
--- a/hotspot/test/compiler/5091921/Test6890943.sh	Fri Aug 08 21:46:29 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#!/bin/sh
-# 
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-# 
-# 
-## some tests require path to find test source dir
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../test_env.sh
-
-
-set -x
-
-cp ${TESTSRC}/Test6890943.java .
-cp ${TESTSRC}/input6890943.txt .
-cp ${TESTSRC}/output6890943.txt .
-cp ${TESTSRC}/Test6890943.sh .
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test6890943.java
-
-${TESTJAVA}/bin/java -XX:-PrintVMOptions -XX:+IgnoreUnrecognizedVMOptions ${TESTVMOPTS} Test6890943 < input6890943.txt > pretest.out 2>&1
-
-# This test sometimes tickles an unrelated performance warning that interferes with diff.
-grep -v 'warning: Performance bug: SystemDictionary' pretest.out > test.out
-
-diff output6890943.txt test.out
-
-result=$?
-if [ $result -eq 0 ]
-then
-  echo "Passed"
-  exit 0
-else
-  echo "Failed"
-  exit 1
-fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6589834/InlinedArrayCloneTestCase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+public class InlinedArrayCloneTestCase implements Runnable {
+    private Test_ia32 executionController;
+
+    public InlinedArrayCloneTestCase(Test_ia32 executionController) {
+        this.executionController = executionController;
+    }
+
+    /*
+     * Please leave following two methods (invokeArrayClone and verifyArguments)
+     * static.
+     *
+     * It does not really matter if these methods are static or instance,
+     * original issue could be reproduced in both cases, but if these methods
+     * are static then it is much easier to understand that reproduced issue
+     * is actually interpreter's stack corruption.
+     *
+     * If these methods are non-static, then interpreter's stack will contain
+     * invalid 'this' pointer required for instance's method call and
+     * verifyArguments' call may throw NullPointerException. There was another
+     * issue w/ NPE after deoptimization addressed by JDK-6833129, so NPE looks
+     * a little bit confusing.
+     *
+     * If these methods are static then after deptimization we'll get incorrect
+     * arguments values in verifyArguments.
+     * Something like "2, -1289936896, 3, 4" instead of "1, 2, 3, 4".
+     * This information tells much more about actual issue comparing to NPE,
+     * so it's preferable to leave these methods static.
+     */
+    private static int verifyArguments(int i1, int i2, LoadedClass[] arr,
+            int i3, int i4) {
+        if (!(i1==1 && i2==2 && i3==3 && i4==4)) {
+            throw new RuntimeException(String.format(
+                    "Arguments have unexpected values: %d, %d, %d, %d",
+                    i1, i2, i3, i4));
+        }
+        return arr.length;
+    }
+
+    private static int invokeArrayClone(LoadedClass[] a) {
+        return InlinedArrayCloneTestCase.verifyArguments(1, 2, a.clone(), 3, 4);
+    }
+
+    @Override
+    public void run() {
+        LoadedClass[] array = executionController.getArray();
+        int length;
+
+        while (executionController.continueExecution()) {
+            try {
+                length = InlinedArrayCloneTestCase.invokeArrayClone(array);
+            } catch (Throwable e) {
+                e.printStackTrace();
+                executionController.setTestFailed();
+                return;
+            }
+            if (length != array.length) {
+                System.out.println(String.format("f(array) returned %d "
+                        + "instead of %d.", length, array.length));
+                executionController.setTestFailed();
+            }
+        }
+    }
+}
--- a/hotspot/test/compiler/6589834/Test_ia32.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/6589834/Test_ia32.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. 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
@@ -24,103 +24,116 @@
 /**
  * @test
  * @bug 6589834
- * @summary deoptimization problem with -XX:+DeoptimizeALot
- *
- * @run main Test_ia32
+ * @summary Safepoint placed between stack pointer increment and decrement leads
+ *          to interpreter's stack corruption after deoptimization.
+ * @library /testlibrary /testlibrary/whitebox
+ * @build ClassFileInstaller sun.hotspot.WhiteBox com.oracle.java.testlibrary.*
+ *        Test_ia32 InlinedArrayCloneTestCase
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI -XX:CompileOnly=InlinedArrayCloneTestCase
+ *      -XX:CompileCommand=dontinline,InlinedArrayCloneTestCase.invokeArrayClone
+ *      -XX:CompileCommand=inline,InlinedArrayCloneTestCase.verifyArguments
+ *      -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack Test_ia32
  */
 
-/***************************************************************************************
-NOTE: The bug shows up (with several "Bug!" message) even without the
-      flag -XX:+DeoptimizeALot. In a debug build, you may want to try
-      the flags -XX:+VerifyStack and -XX:+DeoptimizeALot to get more information.
-****************************************************************************************/
-import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import com.oracle.java.testlibrary.Asserts;
+import sun.hotspot.WhiteBox;
 
 public class Test_ia32 {
+    private static final int NUM_THREADS
+            = Math.min(100, 2 * Runtime.getRuntime().availableProcessors());
+    private static final int CLONE_LENGTH = 1000;
 
-    public static int NUM_THREADS = 100;
+    private static WhiteBox wb = WhiteBox.getWhiteBox();
+
+    private final LoadedClass[] ARRAY = new LoadedClass[Test_ia32.CLONE_LENGTH];
+    private volatile boolean doSpin = true;
+    private volatile boolean testFailed = false;
 
-    public static int CLONE_LENGTH = 1000;
+    public boolean continueExecution() {
+        return doSpin;
+    }
+
+    public void stopExecution() {
+        doSpin = false;
+    }
+
+    public boolean isTestFailed() {
+        return testFailed;
+    }
 
-    public static void main(String[] args) throws InterruptedException, ClassNotFoundException {
+    public void setTestFailed() {
+        this.testFailed = true;
+        stopExecution();
+    }
+
+    public LoadedClass[] getArray() {
+        return ARRAY;
+    }
+
+    public void runTest() {
+        Thread[] threads = new Thread[Test_ia32.NUM_THREADS];
+        Method method;
 
-        Reflector[] threads = new Reflector[NUM_THREADS];
+        try {
+            method = InlinedArrayCloneTestCase.class.getDeclaredMethod(
+                    "invokeArrayClone", LoadedClass[].class);
+        } catch (NoSuchMethodException e) {
+            throw new Error("Tested method not found", e);
+        }
+
+        Asserts.assertTrue(wb.isMethodCompilable(method),
+                "Method " + method.getName() + " should be compilable.");
+
         for (int i = 0; i < threads.length; i++) {
-            threads[i] = new Reflector();
+            threads[i] = new Thread(new InlinedArrayCloneTestCase(this));
             threads[i].start();
         }
 
-        System.out.println("Give Reflector.run() some time to compile...");
-        Thread.sleep(5000);
+        /*
+         * Wait until InlinedArrayCloneTestCase::invokeArrayClone is compiled.
+         */
+        while (!wb.isMethodCompiled(method)) {
+            Thread.yield();
+        }
 
-        System.out.println("Load RMISecurityException causing run() deoptimization");
-        ClassLoader.getSystemClassLoader().loadClass("java.rmi.RMISecurityException");
+        /*
+         * Load NotLoadedClass to cause deoptimization of
+         * InlinedArrayCloneTestCase::invokeArrayClone due to invalidated
+         * dependency.
+         */
+        try {
+            Class.forName("NotLoadedClass");
+        } catch (ClassNotFoundException e) {
+            throw new Error("Unable to load class that invalidates "
+                    + "CHA-dependency for method " + method.getName(), e);
+        }
 
-        for (Reflector thread : threads)
-            thread.requestStop();
+        stopExecution();
 
-        for (Reflector thread : threads)
+        for (Thread thread : threads) {
             try {
                 thread.join();
             } catch (InterruptedException e) {
-                System.out.println(e);
+                throw new Error("Fail to join thread " + thread, e);
             }
-
-    }
-
-}
-
-class Reflector extends Thread {
-
-    volatile boolean _doSpin = true;
-
-    Test_ia32[] _tests;
-
-    Reflector() {
-        _tests = new Test_ia32[Test_ia32.CLONE_LENGTH];
-        for (int i = 0; i < _tests.length; i++) {
-            _tests[i] = new Test_ia32();
-        }
-    }
-
-    static int g(int i1, int i2, Test_ia32[] arr, int i3, int i4) {
-
-        if (!(i1==1 && i2==2 && i3==3 && i4==4)) {
-            System.out.println("Bug!");
         }
 
-        return arr.length;
+        Asserts.assertFalse(isTestFailed(), "Test failed.");
     }
 
-    static int f(Test_ia32[] arr) {
-        return g(1, 2, arr.clone(), 3, 4);
+    public static void main(String[] args) {
+        new Test_ia32().runTest();
     }
-
-    @Override
-    public void run() {
-        Constructor[] ctrs = null;
-        Class<Test_ia32> klass = Test_ia32.class;
-        try {
-            ctrs = klass.getConstructors();
-        } catch (SecurityException e) {
-            System.out.println(e);
-        }
+}
 
-        try {
-            while (_doSpin) {
-                if (f(_tests) < 0)
-                    System.out.println("return value usage");
-            }
-        } catch (NullPointerException e) {
-            e.printStackTrace();
-        }
+class LoadedClass {
+}
 
-        System.out.println(this + " - stopped.");
-    }
-
-    public void requestStop() {
-        System.out.println(this + " - stop requested.");
-        _doSpin = false;
-    }
-
+@SuppressWarnings("unused")
+class NotLoadedClass extends LoadedClass {
 }
--- a/hotspot/test/compiler/8004051/Test8004051.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/8004051/Test8004051.java	Fri Aug 08 12:54:39 2014 -0700
@@ -28,7 +28,7 @@
  * @bug 8005722
  * @summary assert(_oprs_len[mode] < maxNumberOfOperands) failed: array overflow
  *
- * @run main/othervm -Xcomp -client Test8004051
+ * @run main/othervm -Xcomp Test8004051
  */
 
 public class Test8004051 {
--- a/hotspot/test/compiler/ciReplay/TestSA.sh	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/ciReplay/TestSA.sh	Fri Aug 08 12:54:39 2014 -0700
@@ -26,7 +26,7 @@
 ##
 ## @test
 ## @bug 8011675
-## @ignore 8032226, 8031978
+## @ignore 8031978
 ## @summary testing of ciReplay with using generated by SA replay.txt 
 ## @author igor.ignatyev@oracle.com
 ## @run shell TestSA.sh
--- a/hotspot/test/compiler/ciReplay/TestVM.sh	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/ciReplay/TestVM.sh	Fri Aug 08 12:54:39 2014 -0700
@@ -26,7 +26,6 @@
 ##
 ## @test
 ## @bug 8011675
-## @ignore 8031978
 ## @summary testing of ciReplay with using generated by VM replay.txt 
 ## @author igor.ignatyev@oracle.com
 ## @run shell TestVM.sh
--- a/hotspot/test/compiler/ciReplay/TestVM_no_comp_level.sh	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/ciReplay/TestVM_no_comp_level.sh	Fri Aug 08 12:54:39 2014 -0700
@@ -26,7 +26,6 @@
 ##
 ## @test
 ## @bug 8011675
-## @ignore 8031978
 ## @summary testing of ciReplay with using generated by VM replay.txt w/o comp_level
 ## @author igor.ignatyev@oracle.com
 ## @run shell TestVM_no_comp_level.sh
--- a/hotspot/test/compiler/ciReplay/common.sh	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/ciReplay/common.sh	Fri Aug 08 12:54:39 2014 -0700
@@ -1,6 +1,6 @@
 #!/bin/sh
 # 
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -223,21 +223,29 @@
             -XX:CICrashAt=1 \
             -XX:+CreateMinidumpOnCrash \
             -XX:+DumpReplayDataOnError \
+            -XX:-TransmitErrorReport \
+            -XX:+PreferInterpreterNativeStubs \
+            -XX:+PrintCompilation \
             -XX:ReplayDataFile=${replay_data} \
             -version"
     echo GENERATION OF REPLAY.TXT:
     echo $cmd
 
     ${cmd} > crash.out 2>&1
-    
+
+    exit_code=$?
+    if [ ${exit_code} -eq 0 ]
+    then
+        cat crash.out
+        test_fail 3 "CHECK :: CRASH" "JVM exits gracefully"
+    fi
+
     core_locations=`grep -i core crash.out | grep "location:" | \
             sed -e 's/.*location: //'`
-    echo CRASH OUTPUT:
-    cat crash.out    
-    
-    if [ "${core_locations}" = "" ]
+   
+    if [ -z "${core_locations}" ]
     then
-        test_fail 2 "CHECK :: CORE_LOCATION" "output doesn't contain the location of core file, see crash.out"
+        test_fail 4 "CHECK :: CORE_LOCATION" "output doesn't contain the location of core file, see crash.out"
     fi
 
     rm crash.out 
@@ -245,16 +253,19 @@
     # processing core locations for *nix
     if [ $VM_OS != "windows" ]
     then
-        # remove 'or' between '/core.<pid>' and 'core'
+        # remove 'or' between '<core_path>/core.<pid>' and 'core'
+        # and the rest of line -- ' (max size ...) . To ensure a full core ...'
         core_locations=`echo $core_locations | \
-                sed -e 's/\([^ ]*\) or \([^ ]*\)/\1 \2/'`
-        # add <core_path>/core.<pid> core.<pid>
+                sed -e 's/\([^ ]*\) or \([^ ]*\).*/\1 \2/'`
         core_with_dir=`echo $core_locations | awk '{print $1}'`
+        core_with_pid=`echo $core_locations | awk '{print $2}'`
         dir=`dirname $core_with_dir`
-        core_with_pid=`echo $core_locations | awk '{print $2}'`
-        if [ -n ${core_with_pid} ]
+        file=`basename $core_with_dir`
+        # add <core_path>/core.<pid> core
+        core_locations="'$core_with_dir' '$file'"
+        if [ -n "${core_with_pid}" ]
         then
-            core_locations="$core_locations $dir${FS}$core_with_pid $core_with_pid"
+            core_locations="$core_locations '$core_with_pid' '$dir${FS}$core_with_pid'"
         fi
     fi
 
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -146,6 +146,10 @@
         }
 
         protected int countCpuInstructions(byte[] nativeCode) {
+            return countCpuInstructions(nativeCode, instrMask, instrPattern);
+        }
+
+        public static int countCpuInstructions(byte[] nativeCode, byte[] instrMask, byte[] instrPattern) {
             int count = 0;
             int patternSize = Math.min(instrMask.length, instrPattern.length);
             boolean found;
@@ -183,4 +187,21 @@
             return "UseBMI1Instructions";
         }
     }
+
+    abstract static class BmiTestCase_x64 extends BmiTestCase {
+        protected byte[] instrMask_x64;
+        protected byte[] instrPattern_x64;
+
+        protected BmiTestCase_x64(Method method) {
+            super(method);
+        }
+
+        protected int countCpuInstructions(byte[] nativeCode) {
+            int cnt = super.countCpuInstructions(nativeCode);
+            if (Platform.isX64()) { // on x64 platform the instruction we search for can be encoded in 2 different ways
+                cnt += countCpuInstructions(nativeCode, instrMask_x64, instrPattern_x64);
+            }
+            return cnt;
+        }
+    }
 }
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,12 +33,15 @@
 
 import java.lang.reflect.Method;
 
-public class LZcntTestI extends BmiIntrinsicBase.BmiTestCase {
+public class LZcntTestI extends BmiIntrinsicBase.BmiTestCase_x64 {
 
     protected LZcntTestI(Method method) {
         super(method);
         instrMask = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
         instrPattern = new byte[]{(byte) 0xF3, (byte) 0x0F, (byte) 0xBD};
+
+        instrMask_x64 = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
+        instrPattern_x64 = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBD};
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,8 +31,6 @@
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountLeadingZerosInstruction LZcntTestL
  */
 
-import com.oracle.java.testlibrary.Platform;
-
 import java.lang.reflect.Method;
 
 public class LZcntTestL extends LZcntTestI {
@@ -40,10 +38,6 @@
     protected LZcntTestL(Method method) {
         super(method);
         isLongOperation = true;
-        if (Platform.isX64()) {
-            instrMask = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
-            instrPattern = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBD};
-        }
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,12 +33,15 @@
 
 import java.lang.reflect.Method;
 
-public class TZcntTestI extends BmiIntrinsicBase.BmiTestCase {
+public class TZcntTestI extends BmiIntrinsicBase.BmiTestCase_x64 {
 
     protected TZcntTestI(Method method) {
         super(method);
         instrMask = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
         instrPattern = new byte[]{(byte) 0xF3, (byte) 0x0F, (byte) 0xBC};
+
+        instrMask_x64 = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
+        instrPattern_x64 = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBC};
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,8 +31,6 @@
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountTrailingZerosInstruction TZcntTestL
  */
 
-import com.oracle.java.testlibrary.Platform;
-
 import java.lang.reflect.Method;
 
 public class TZcntTestL extends TZcntTestI {
@@ -40,11 +38,6 @@
     protected TZcntTestL(Method method) {
         super(method);
         isLongOperation = true;
-        if (Platform.isX64()) {
-            instrMask = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
-            instrPattern = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBC};
-        }
-        isLongOperation = true;
     }
 
     public static void main(String[] args) throws Exception {
--- a/hotspot/test/compiler/tiered/NonTieredLevelsTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/tiered/NonTieredLevelsTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -25,8 +25,8 @@
 
 /**
  * @test NonTieredLevelsTest
+ * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @ignore 8046268
- * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @build NonTieredLevelsTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation
--- a/hotspot/test/compiler/tiered/TieredLevelsTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/tiered/TieredLevelsTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -23,8 +23,8 @@
 
 /**
  * @test TieredLevelsTest
+ * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @ignore 8046268
- * @library /testlibrary /testlibrary/whitebox /compiler/whitebox
  * @build TieredLevelsTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
--- a/hotspot/test/compiler/whitebox/ClearMethodStateTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/ClearMethodStateTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -25,9 +25,9 @@
 
 /*
  * @test ClearMethodStateTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build ClearMethodStateTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* ClearMethodStateTest
--- a/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -21,11 +21,8 @@
  * questions.
  */
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
 import sun.hotspot.WhiteBox;
 import sun.hotspot.code.NMethod;
-import sun.management.ManagementFactoryHelper;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Executable;
@@ -98,15 +95,7 @@
      */
     protected static String getVMOption(String name) {
         Objects.requireNonNull(name);
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption(name);
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        return (tmp == null ? null : tmp.getValue());
+        return Objects.toString(WHITE_BOX.getVMFlag(name), null);
     }
 
     /**
@@ -174,7 +163,7 @@
      * @see #test()
      */
     protected final void runTest() {
-        if (ManagementFactoryHelper.getCompilationMXBean() == null) {
+        if (CompilerWhiteBoxTest.MODE.startsWith("interpreted ")) {
             System.err.println(
                     "Warning: test is not applicable in interpreted mode");
             return;
--- a/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -23,9 +23,9 @@
 
 /*
  * @test DeoptimizeAllTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build DeoptimizeAllTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* DeoptimizeAllTest
--- a/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -23,9 +23,9 @@
 
 /*
  * @test DeoptimizeMethodTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build DeoptimizeMethodTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* DeoptimizeMethodTest
--- a/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -23,9 +23,9 @@
 
 /*
  * @test EnqueueMethodForCompilationTest
- * @ignore 8046268
  * @bug 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build EnqueueMethodForCompilationTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* EnqueueMethodForCompilationTest
--- a/hotspot/test/compiler/whitebox/GetNMethodTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/GetNMethodTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -26,9 +26,9 @@
 
 /*
  * @test GetNMethodTest
- * @ignore 8046268
  * @bug 8038240
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build GetNMethodTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* GetNMethodTest
--- a/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -23,9 +23,9 @@
 
 /*
  * @test MakeMethodNotCompilableTest
- * @ignore 8046268
  * @bug 8012322 8006683 8007288 8022832
  * @library /testlibrary /testlibrary/whitebox
+ * @ignore 8046268
  * @build MakeMethodNotCompilableTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* MakeMethodNotCompilableTest
--- a/hotspot/test/runtime/whitebox/WBStackSize.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/runtime/whitebox/WBStackSize.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,7 +39,6 @@
  * Please file a test bug, if this is a problem.
  */
 
-import com.sun.management.HotSpotDiagnosticMXBean;
 import sun.hotspot.WhiteBox;
 
 public class WBStackSize {
@@ -81,8 +80,7 @@
     }
 
     public static void main(String[] args) {
-        HotSpotDiagnosticMXBean bean = sun.management.ManagementFactoryHelper.getDiagnosticMXBean();
-        long configStackSize = Long.valueOf(bean.getVMOption("ThreadStackSize").getValue()) * K;
+        long configStackSize = wb.getIntxVMFlag("ThreadStackSize") * K;
 
         System.out.println("ThreadStackSize VM option: " + configStackSize);
 
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,10 @@
 package sun.hotspot;
 
 import java.lang.reflect.Executable;
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Stream;
 import java.security.BasicPermission;
 import sun.hotspot.parser.DiagnosticCommand;
 
@@ -171,4 +175,15 @@
   public native Long    getUint64VMFlag(String name);
   public native String  getStringVMFlag(String name);
   public native Double  getDoubleVMFlag(String name);
+  private final List<Function<String,Object>> flagsGetters = Arrays.asList(
+    this::getBooleanVMFlag, this::getIntxVMFlag, this::getUintxVMFlag,
+    this::getUint64VMFlag, this::getStringVMFlag, this::getDoubleVMFlag);
+
+  public Object getVMFlag(String name) {
+    return flagsGetters.stream()
+                       .map(f -> f.apply(name))
+                       .filter(x -> x != null)
+                       .findAny()
+                       .orElse(null);
+  }
 }
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -91,16 +91,20 @@
     }
 
     private void testPositive(T value, T expected) {
-        Asserts.assertEQ(getVMOptionAsString(), asString(getValue()));
+        String oldValue = getVMOptionAsString();
+        Asserts.assertEQ(oldValue, asString(getValue()));
+        Asserts.assertEQ(oldValue, asString(WHITE_BOX.getVMFlag(flagName)));
         setNewValue(value);
         String newValue = getVMOptionAsString();
         Asserts.assertEQ(newValue, asString(expected));
-        Asserts.assertEQ(getVMOptionAsString(), asString(getValue()));
+        Asserts.assertEQ(newValue, asString(getValue()));
+        Asserts.assertEQ(newValue, asString(WHITE_BOX.getVMFlag(flagName)));
     }
 
     private void testNegative(T value, T expected) {
         String oldValue = getVMOptionAsString();
         Asserts.assertEQ(oldValue, asString(getValue()));
+        Asserts.assertEQ(oldValue, asString(WHITE_BOX.getVMFlag(flagName)));
         setNewValue(value);
         String newValue = getVMOptionAsString();
         Asserts.assertEQ(oldValue, newValue);
--- a/jaxp/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -267,3 +267,4 @@
 82b94ff002c6e007a03bf0f364ca94b381e09135 jdk9-b22
 2e5b63006187bfc64d8eace374dbc2806267a160 jdk9-b23
 345af113f57206711f75089c3ebf84a36a789122 jdk9-b24
+73757f4b8aa353ca8937abc07e79e7ece4c011a1 jdk9-b25
--- a/jaxp/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -385,8 +386,18 @@
          * reference to the default error handler.
          */
         public LSSerializer createLSSerializer() {
-        return new DOMSerializerImpl();
-    }
+            try {
+                Class serializerClass = ObjectFactory.findProviderClass(
+                    "com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl",
+                    ObjectFactory.findClassLoader(), true);
+                return (LSSerializer) serializerClass.newInstance();
+            }
+            catch (Exception e) {}
+            // Fall back to Xerces' deprecated serializer if
+            // the Xalan based serializer is unavailable.
+            return new DOMSerializerImpl();
+        }
+
         /**
          * DOM Level 3 LS CR - Experimental.
          * Create a new empty input source.
--- a/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3145,7 +3145,11 @@
                                   m_data.elementAt(-dataIndex+1));
       }
     }
-    else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type
+    else if (DTM.ELEMENT_NODE == type)
+    {
+      return getStringValueX(nodeHandle);
+    }
+    else if (DTM.DOCUMENT_FRAGMENT_NODE == type
              || DTM.DOCUMENT_NODE == type)
     {
       return null;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -123,6 +123,11 @@
  * @author Sunitha Reddy, Sun Microsystems
  * @see Serializer
  * @see org.w3c.dom.ls.LSSerializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public abstract class BaseMarkupSerializer
     implements ContentHandler, DocumentHandler, LexicalHandler,
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -35,6 +36,11 @@
  *
  * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public interface DOMSerializer
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -72,6 +72,9 @@
  * @author Gopal Sharma, Sun Microsystems
  * @author Arun Yadav, Sun Microsystems
  * @author Sunitha Reddy, Sun Microsystems
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, replaced by
+ * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}
  */
 public class DOMSerializerImpl implements LSSerializer, DOMConfiguration {
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/ElementState.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/ElementState.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -28,9 +29,13 @@
 /**
  * Holds the state of the currently serialized element.
  *
- *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see BaseMarkupSerializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class ElementState
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2000-2002,2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -29,6 +30,10 @@
 /**
  * This class represents an encoding.
  *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class EncodingInfo {
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Encodings.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Encodings.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -36,6 +37,11 @@
  * for each encoding.
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class Encodings
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -45,8 +46,12 @@
  * from value to name. A small entities resource is loaded into memory the
  * first time any of these methods is called for fast and efficient access.
  *
+ * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  *
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public final class HTMLdtd
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/IndentPrinter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/IndentPrinter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -32,6 +33,11 @@
  * wrapping.
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class IndentPrinter
     extends Printer
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/LineSeparator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/LineSeparator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -25,6 +26,11 @@
 /**
  * @author <a href="mailto:arkin@intalio..com">Assaf Arkin</a>
  * @see OutputFormat
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public final class LineSeparator
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Method.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Method.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -25,6 +26,11 @@
 /**
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see OutputFormat
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public final class Method
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/OutputFormat.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/OutputFormat.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -59,6 +60,11 @@
  * @see Serializer
  * @see Method
  * @see LineSeparator
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class OutputFormat
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Printer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Printer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -40,6 +41,11 @@
  * extending this class.
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class Printer
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/Serializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/Serializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -60,6 +61,11 @@
  * @see ContentHandler
  * @see OutputFormat
  * @see DOMSerializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public interface Serializer
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -34,6 +35,11 @@
  *
  * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public abstract class SerializerFactory
 {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactoryImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/SerializerFactoryImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -34,6 +35,11 @@
  *
  * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 final class SerializerFactoryImpl
     extends SerializerFactory
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/TextSerializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/TextSerializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,11 +3,12 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (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.apache.org/licenses/LICENSE-2.0
  *
@@ -58,6 +59,11 @@
  *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see Serializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class TextSerializer
     extends BaseMarkupSerializer
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/XML11Serializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/XML11Serializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -73,10 +73,16 @@
  * boundaries, indent lines, and serialize elements on separate
  * lines. Line terminators will be regarded as spaces, and
  * spaces at beginning of line will be stripped.
+ *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @author <a href="mailto:rahul.srivastava@sun.com">Rahul Srivastava</a>
  * @author Elena Litani IBM
  * @see Serializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class XML11Serializer
 extends XMLSerializer {
--- a/jaxp/src/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -84,10 +84,16 @@
  * boundaries, indent lines, and serialize elements on separate
  * lines. Line terminators will be regarded as spaces, and
  * spaces at beginning of line will be stripped.
+ *
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @author <a href="mailto:rahul.srivastava@sun.com">Rahul Srivastava</a>
  * @author Elena Litani IBM
  * @see Serializer
+ *
+ * @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
+ * is replaced by that of Xalan. Main class
+ * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
+ * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
 public class XMLSerializer
 extends BaseMarkupSerializer {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/DOM3Serializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer;
+
+import java.io.IOException;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.ls.LSSerializerFilter;
+
+/**
+ * Interface for a DOM serializer capable of serializing DOMs as specified in
+ * the DOM Level 3 Save Recommendation.
+ * <p>
+ * The DOM3Serializer is a facet of a serializer and is obtained from the
+ * asDOM3Serializer() method of the org.apache.xml.serializer.Serializer interface.
+ * A serializer may or may not support a level 3 DOM serializer, if it does not then the
+ * return value from asDOM3Serializer() is null.
+ * <p>
+ * Example:
+ * <pre>
+ * Document     doc;
+ * Serializer   ser;
+ * OutputStream os;
+ * DOMErrorHandler handler;
+ *
+ * ser = ...;
+ * os = ...;
+ * handler = ...;
+ *
+ * ser.setOutputStream( os );
+ * DOM3Serialzier dser = (DOM3Serialzier)ser.asDOM3Serializer();
+ * dser.setErrorHandler(handler);
+ * dser.serialize(doc);
+ * </pre>
+ *
+ * @see org.apache.xml.serializer.Serializer
+ *
+ * @xsl.usage general
+ *
+ */
+public interface DOM3Serializer {
+    /**
+     * Serializes the Level 3 DOM node. Throws an exception only if an I/O
+     * exception occured while serializing.
+     *
+     * This interface is a public API.
+     *
+     * @param node the Level 3 DOM node to serialize
+     * @throws IOException if an I/O exception occured while serializing
+     */
+    public void serializeDOM3(Node node) throws IOException;
+
+    /**
+     * Sets a DOMErrorHandler on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @param handler the Level 3 DOMErrorHandler
+     */
+    public void setErrorHandler(DOMErrorHandler handler);
+
+    /**
+     * Returns a DOMErrorHandler set on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @return A Level 3 DOMErrorHandler
+     */
+    public DOMErrorHandler getErrorHandler();
+
+    /**
+     * Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @param filter the Level 3 LSSerializerFilter
+     */
+    public void setNodeFilter(LSSerializerFilter filter);
+
+    /**
+     * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @return The Level 3 LSSerializerFilter
+     */
+    public LSSerializerFilter getNodeFilter();
+
+    /**
+     * Sets the new line character to be used during serialization
+     * @param newLine a String that is the end-of-line character sequence to be
+     * used in serialization.
+     */
+    public void setNewLine(String newLine);
+}
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -786,4 +786,13 @@
         aMethodIsCalled();
 
     }
+
+    /**
+     * @see org.apache.xml.serializer.Serializer#asDOM3Serializer()
+     */
+    public Object asDOM3Serializer() throws IOException
+    {
+        couldThrowIOException();
+        return null;
+    }
 }
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/Encodings.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/Encodings.java	Fri Aug 08 12:54:39 2014 -0700
@@ -153,6 +153,24 @@
     }
 
     /**
+     * Determines if the encoding specified was recognized by the
+     * serializer or not.
+     *
+     * @param encoding The encoding
+     * @return boolean - true if the encoding was recognized else false
+     */
+    public static boolean isRecognizedEncoding(String encoding)
+    {
+        EncodingInfo ei;
+
+        String normalizedEncoding = toUpperCaseFast(encoding);
+        ei = _encodingInfos.findEncoding(normalizedEncoding);
+        if (ei != null)
+            return true;
+        return false;
+    }
+
+    /**
      * A fast and cheap way to uppercase a String that is
      * only made of printable ASCII characters.
      * <p>
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializationHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializationHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -110,9 +112,29 @@
     public void setNamespaceMappings(NamespaceMappings mappings);
 
     /**
-     * Flush any pending events currently queued up in the serializer. This will
-     * flush any input that the serializer has which it has not yet sent as
-     * output.
+     * A SerializationHandler accepts SAX-like events, so
+     * it can accumulate attributes or namespace nodes after
+     * a startElement().
+     * <p>
+     * If the SerializationHandler has a Writer or OutputStream,
+     * a call to this method will flush such accumulated
+     * events as a closed start tag for an element.
+     * <p>
+     * If the SerializationHandler wraps a ContentHandler,
+     * a call to this method will flush such accumulated
+     * events as a SAX (not SAX-like) calls to
+     * startPrefixMapping() and startElement().
+     * <p>
+     * If one calls endDocument() then one need not call
+     * this method since a call to endDocument() will
+     * do what this method does. However, in some
+     * circumstances, such as with document fragments,
+     * endDocument() is not called and it may be
+     * necessary to call this method to flush
+     * any pending events.
+     * <p>
+     * For performance reasons this method should not be called
+     * very often.
      */
     public void flushPending() throws SAXException;
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/Serializer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/Serializer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -220,4 +222,20 @@
      * @return True if serializer has been reset and can be reused
      */
     public boolean reset();
+
+    /**
+     * Return an Object into this serializer to be cast to a DOM3Serializer.
+     * Through the returned object the document to be serialized,
+     * a DOM (Level 3), can be provided to the serializer.
+     * If the serializer does not support casting to a {@link DOM3Serializer}
+     * interface, it should return null.
+     * <p>
+     * In principle only one of asDOM3Serializer() or asContentHander()
+     * should be called.
+     *
+     * @return An Object to be cast to a DOM3Serializer interface into this serializer,
+     *  or null if the serializer is not DOM capable
+     * @throws IOException An I/O exception occured
+     */
+    public Object asDOM3Serializer() throws IOException;
 }
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1559,6 +1559,21 @@
     }
 
     /**
+     * Return a {@link DOM3Serializer} interface into this serializer. If the
+     * serializer does not support the {@link DOM3Serializer} interface, it should
+     * return null.
+     *
+     * @return A {@link DOM3Serializer} interface into this serializer,  or null
+     * if the serializer is not DOM capable
+     * @throws IOException An I/O exception occured
+     * @see org.apache.xml.serializer.Serializer#asDOM3Serializer()
+     */
+    public Object asDOM3Serializer() throws IOException
+    {
+        return new com.sun.org.apache.xml.internal.serializer.dom3.DOM3SerializerImpl(this);
+    }
+
+    /**
      * Get the default value of an xsl:output property,
      * which would be null only if no default value exists
      * for the property.
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -136,7 +136,7 @@
         if (obj instanceof SerializationHandler)
         {
               // this is one of the supplied serializers
-            ser = (Serializer) cls.newInstance();
+            ser = (Serializer) obj;
             ser.setOutputFormat(format);
         }
         else
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java	Fri Aug 08 12:54:39 2014 -0700
@@ -537,7 +537,7 @@
                 if (OutputPropertiesFactory.S_KEY_INDENT_AMOUNT.equals(name)) {
                     setIndentAmount(Integer.parseInt(val));
                 } else if (OutputKeys.INDENT.equals(name)) {
-                    boolean b = "yes".equals(val) ? true : false;
+                    boolean b = val.endsWith("yes") ? true : false;
                     m_doIndent = b;
                 }
 
@@ -556,7 +556,7 @@
                 break;
             case 'o':
                 if (OutputKeys.OMIT_XML_DECLARATION.equals(name)) {
-                    boolean b = "yes".equals(val) ? true : false;
+                    boolean b = val.endsWith("yes") ? true : false;
                     this.m_shouldNotWriteXMLHeader = b;
                 }
                 break;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1335,4 +1335,12 @@
                 ch.length);
         }
     }
+
+    /**
+     * @see org.apache.xml.serializer.Serializer#asDOM3Serializer()
+     */
+    public Object asDOM3Serializer() throws IOException
+    {
+        return m_handler.asDOM3Serializer();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOM3SerializerImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.io.IOException;
+
+import com.sun.org.apache.xml.internal.serializer.DOM3Serializer;
+import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
+import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.Node;
+import org.w3c.dom.ls.LSSerializerFilter;
+
+/**
+ * This class implements the DOM3Serializer interface.
+ *
+ * @xsl.usage internal
+ */
+public final class DOM3SerializerImpl implements DOM3Serializer {
+
+    /**
+     * Private class members
+     */
+    // The DOMErrorHandler
+    private DOMErrorHandler fErrorHandler;
+
+    // A LSSerializerFilter
+    private LSSerializerFilter fSerializerFilter;
+
+    // The end-of-line character sequence
+    private String fNewLine;
+
+    // A SerializationHandler ex. an instance of ToXMLStream
+    private SerializationHandler fSerializationHandler;
+
+    /**
+     * Constructor
+     *
+     * @param handler An instance of the SerializationHandler interface.
+     */
+    public DOM3SerializerImpl(SerializationHandler handler) {
+        fSerializationHandler = handler;
+    }
+
+    // Public memebers
+
+    /**
+     * Returns a DOMErrorHandler set on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @return A Level 3 DOMErrorHandler
+     */
+    public DOMErrorHandler getErrorHandler() {
+        return fErrorHandler;
+    }
+
+    /**
+     * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @return The Level 3 LSSerializerFilter
+     */
+    public LSSerializerFilter getNodeFilter() {
+        return fSerializerFilter;
+    }
+
+
+    /**
+     * Serializes the Level 3 DOM node by creating an instance of DOM3TreeWalker
+     * which traverses the DOM tree and invokes handler events to serialize
+     * the DOM NOde. Throws an exception only if an I/O exception occured
+     * while serializing.
+     * This interface is a public API.
+     *
+     * @param node the Level 3 DOM node to serialize
+     * @throws IOException if an I/O exception occured while serializing
+     */
+    public void serializeDOM3(Node node) throws IOException {
+        try {
+            DOM3TreeWalker walker = new DOM3TreeWalker(fSerializationHandler,
+                    fErrorHandler, fSerializerFilter, fNewLine);
+
+            walker.traverse(node);
+        } catch (org.xml.sax.SAXException se) {
+            throw new WrappedRuntimeException(se);
+        }
+    }
+
+    /**
+     * Sets a DOMErrorHandler on the DOM Level 3 Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @param handler the Level 3 DOMErrorHandler
+     */
+    public void setErrorHandler(DOMErrorHandler handler) {
+        fErrorHandler = handler;
+    }
+
+    /**
+     * Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes
+     * during serialization.
+     *
+     * This interface is a public API.
+     *
+     * @param filter the Level 3 LSSerializerFilter
+     */
+    public void setNodeFilter(LSSerializerFilter filter) {
+        fSerializerFilter = filter;
+    }
+
+    /**
+     * Sets a SerializationHandler on the DOM Serializer.
+     *
+     * This interface is a public API.
+     *
+     * @param handler An instance of SerializationHandler
+     */
+    public void setSerializationHandler(SerializationHandler handler) {
+        fSerializationHandler = handler;
+    }
+
+    /**
+     * Sets the new line character to be used during serialization
+     * @param newLine a String that is the end-of-line character sequence to be
+     * used in serialization.
+     */
+    public void setNewLine(String newLine) {
+        fNewLine = newLine;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,2145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory;
+import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
+import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
+import com.sun.org.apache.xml.internal.serializer.utils.Utils;
+import com.sun.org.apache.xerces.internal.util.XML11Char;
+import com.sun.org.apache.xerces.internal.util.XMLChar;
+import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Comment;
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.Entity;
+import org.w3c.dom.EntityReference;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+import org.w3c.dom.ls.LSSerializerFilter;
+import org.w3c.dom.traversal.NodeFilter;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.LocatorImpl;
+
+/**
+ * Built on org.apache.xml.serializer.TreeWalker and adds functionality to
+ * traverse and serialize a DOM Node (Level 2 or Level 3) as specified in
+ * the DOM Level 3 LS Recommedation by evaluating and applying DOMConfiguration
+ * parameters and filters if any during serialization.
+ *
+ * @xsl.usage internal
+ */
+final class DOM3TreeWalker {
+
+    /**
+     * The SerializationHandler, it extends ContentHandler and when
+     * this class is instantiated via the constructor provided, a
+     * SerializationHandler object is passed to it.
+     */
+    private SerializationHandler fSerializer = null;
+
+    /** We do not need DOM2Helper since DOM Level 3 LS applies to DOM Level 2 or newer */
+
+    /** Locator object for this TreeWalker          */
+    private LocatorImpl fLocator = new LocatorImpl();
+
+    /** ErrorHandler */
+    private DOMErrorHandler fErrorHandler = null;
+
+    /** LSSerializerFilter */
+    private LSSerializerFilter fFilter = null;
+
+    /** If the serializer is an instance of a LexicalHandler */
+    private LexicalHandler fLexicalHandler = null;
+
+    private int fWhatToShowFilter;
+
+    /** New Line character to use in serialization */
+    private String fNewLine = null;
+
+    /** DOMConfiguration Properties */
+    private Properties fDOMConfigProperties = null;
+
+    /** Keeps track if we are in an entity reference when entities=true */
+    private boolean fInEntityRef = false;
+
+    /** Stores the version of the XML document to be serialize */
+    private String fXMLVersion = null;
+
+    /** XML Version, default 1.0 */
+    private boolean fIsXMLVersion11 = false;
+
+    /** Is the Node a Level 3 DOM node */
+    private boolean fIsLevel3DOM = false;
+
+    /** DOM Configuration Parameters */
+    private int fFeatures = 0;
+
+    /** Flag indicating whether following text to be processed is raw text          */
+    boolean fNextIsRaw = false;
+
+    //
+    private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+
+    //
+    private static final String XMLNS_PREFIX = "xmlns";
+
+    //
+    private static final String XML_URI = "http://www.w3.org/XML/1998/namespace";
+
+    //
+    private static final String XML_PREFIX = "xml";
+
+    /** stores namespaces in scope */
+    protected NamespaceSupport fNSBinder;
+
+    /** stores all namespace bindings on the current element */
+    protected NamespaceSupport fLocalNSBinder;
+
+    /** stores the current element depth */
+    private int fElementDepth = 0;
+
+    // ***********************************************************************
+    // DOMConfiguration paramter settings
+    // ***********************************************************************
+    // Parameter canonical-form, true [optional] - NOT SUPPORTED
+    private final static int CANONICAL = 0x1 << 0;
+
+    // Parameter cdata-sections, true [required] (default)
+    private final static int CDATA = 0x1 << 1;
+
+    // Parameter check-character-normalization, true [optional] - NOT SUPPORTED
+    private final static int CHARNORMALIZE = 0x1 << 2;
+
+    // Parameter comments, true [required] (default)
+    private final static int COMMENTS = 0x1 << 3;
+
+    // Parameter datatype-normalization, true [optional] - NOT SUPPORTED
+    private final static int DTNORMALIZE = 0x1 << 4;
+
+    // Parameter element-content-whitespace, true [required] (default) - value - false [optional] NOT SUPPORTED
+    private final static int ELEM_CONTENT_WHITESPACE = 0x1 << 5;
+
+    // Parameter entities, true [required] (default)
+    private final static int ENTITIES = 0x1 << 6;
+
+    // Parameter infoset, true [required] (default), false has no effect --> True has no effect for the serializer
+    private final static int INFOSET = 0x1 << 7;
+
+    // Parameter namespaces, true [required] (default)
+    private final static int NAMESPACES = 0x1 << 8;
+
+    // Parameter namespace-declarations, true [required] (default)
+    private final static int NAMESPACEDECLS = 0x1 << 9;
+
+    // Parameter normalize-characters, true [optional] - NOT SUPPORTED
+    private final static int NORMALIZECHARS = 0x1 << 10;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int SPLITCDATA = 0x1 << 11;
+
+    // Parameter validate, true [optional] - NOT SUPPORTED
+    private final static int VALIDATE = 0x1 << 12;
+
+    // Parameter validate-if-schema, true [optional] - NOT SUPPORTED
+    private final static int SCHEMAVALIDATE = 0x1 << 13;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int WELLFORMED = 0x1 << 14;
+
+    // Parameter discard-default-content, true [required] (default)
+    // Not sure how this will be used in level 2 Documents
+    private final static int DISCARDDEFAULT = 0x1 << 15;
+
+    // Parameter format-pretty-print, true [optional]
+    private final static int PRETTY_PRINT = 0x1 << 16;
+
+    // Parameter ignore-unknown-character-denormalizations, true [required] (default)
+    // We currently do not support XML 1.1 character normalization
+    private final static int IGNORE_CHAR_DENORMALIZE = 0x1 << 17;
+
+    // Parameter discard-default-content, true [required] (default)
+    private final static int XMLDECL = 0x1 << 18;
+
+    /**
+     * Constructor.
+     * @param   contentHandler serialHandler The implemention of the SerializationHandler interface
+     */
+    DOM3TreeWalker(
+        SerializationHandler serialHandler,
+        DOMErrorHandler errHandler,
+        LSSerializerFilter filter,
+        String newLine) {
+        fSerializer = serialHandler;
+        //fErrorHandler = errHandler == null ? new DOMErrorHandlerImpl() : errHandler; // Should we be using the default?
+        fErrorHandler = errHandler;
+        fFilter = filter;
+        fLexicalHandler = null;
+        fNewLine = newLine;
+
+        fNSBinder = new NamespaceSupport();
+        fLocalNSBinder = new NamespaceSupport();
+
+        fDOMConfigProperties = fSerializer.getOutputFormat();
+        fSerializer.setDocumentLocator(fLocator);
+        initProperties(fDOMConfigProperties);
+
+        try {
+            // Bug see Bugzilla  26741
+            fLocator.setSystemId(
+                System.getProperty("user.dir") + File.separator + "dummy.xsl");
+        } catch (SecurityException se) { // user.dir not accessible from applet
+
+        }
+    }
+
+    /**
+     * Perform a pre-order traversal non-recursive style.
+     *
+     * Note that TreeWalker assumes that the subtree is intended to represent
+     * a complete (though not necessarily well-formed) document and, during a
+     * traversal, startDocument and endDocument will always be issued to the
+     * SAX listener.
+     *
+     * @param pos Node in the tree where to start traversal
+     *
+     * @throws TransformerException
+     */
+    public void traverse(Node pos) throws org.xml.sax.SAXException {
+        this.fSerializer.startDocument();
+
+        // Determine if the Node is a DOM Level 3 Core Node.
+        if (pos.getNodeType() != Node.DOCUMENT_NODE) {
+            Document ownerDoc = pos.getOwnerDocument();
+            if (ownerDoc != null
+                && ownerDoc.getImplementation().hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        } else {
+            if (((Document) pos)
+                .getImplementation()
+                .hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        }
+
+        if (fSerializer instanceof LexicalHandler) {
+            fLexicalHandler = ((LexicalHandler) this.fSerializer);
+        }
+
+        if (fFilter != null)
+            fWhatToShowFilter = fFilter.getWhatToShow();
+
+        Node top = pos;
+
+        while (null != pos) {
+            startNode(pos);
+
+            Node nextNode = null;
+
+            nextNode = pos.getFirstChild();
+
+            while (null == nextNode) {
+                endNode(pos);
+
+                if (top.equals(pos))
+                    break;
+
+                nextNode = pos.getNextSibling();
+
+                if (null == nextNode) {
+                    pos = pos.getParentNode();
+
+                    if ((null == pos) || (top.equals(pos))) {
+                        if (null != pos)
+                            endNode(pos);
+
+                        nextNode = null;
+
+                        break;
+                    }
+                }
+            }
+
+            pos = nextNode;
+        }
+        this.fSerializer.endDocument();
+    }
+
+    /**
+     * Perform a pre-order traversal non-recursive style.
+
+     * Note that TreeWalker assumes that the subtree is intended to represent
+     * a complete (though not necessarily well-formed) document and, during a
+     * traversal, startDocument and endDocument will always be issued to the
+     * SAX listener.
+     *
+     * @param pos Node in the tree where to start traversal
+     * @param top Node in the tree where to end traversal
+     *
+     * @throws TransformerException
+     */
+    public void traverse(Node pos, Node top) throws org.xml.sax.SAXException {
+
+        this.fSerializer.startDocument();
+
+        // Determine if the Node is a DOM Level 3 Core Node.
+        if (pos.getNodeType() != Node.DOCUMENT_NODE) {
+            Document ownerDoc = pos.getOwnerDocument();
+            if (ownerDoc != null
+                && ownerDoc.getImplementation().hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        } else {
+            if (((Document) pos)
+                .getImplementation()
+                .hasFeature("Core", "3.0")) {
+                fIsLevel3DOM = true;
+            }
+        }
+
+        if (fSerializer instanceof LexicalHandler) {
+            fLexicalHandler = ((LexicalHandler) this.fSerializer);
+        }
+
+        if (fFilter != null)
+            fWhatToShowFilter = fFilter.getWhatToShow();
+
+        while (null != pos) {
+            startNode(pos);
+
+            Node nextNode = null;
+
+            nextNode = pos.getFirstChild();
+
+            while (null == nextNode) {
+                endNode(pos);
+
+                if ((null != top) && top.equals(pos))
+                    break;
+
+                nextNode = pos.getNextSibling();
+
+                if (null == nextNode) {
+                    pos = pos.getParentNode();
+
+                    if ((null == pos) || ((null != top) && top.equals(pos))) {
+                        nextNode = null;
+
+                        break;
+                    }
+                }
+            }
+
+            pos = nextNode;
+        }
+        this.fSerializer.endDocument();
+    }
+
+    /**
+     * Optimized dispatch of characters.
+     */
+    private final void dispatachChars(Node node)
+        throws org.xml.sax.SAXException {
+        if (fSerializer != null) {
+            this.fSerializer.characters(node);
+        } else {
+            String data = ((Text) node).getData();
+            this.fSerializer.characters(data.toCharArray(), 0, data.length());
+        }
+    }
+
+    /**
+     * Start processing given node
+     *
+     * @param node Node to process
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void startNode(Node node) throws org.xml.sax.SAXException {
+        if (node instanceof Locator) {
+            Locator loc = (Locator) node;
+            fLocator.setColumnNumber(loc.getColumnNumber());
+            fLocator.setLineNumber(loc.getLineNumber());
+            fLocator.setPublicId(loc.getPublicId());
+            fLocator.setSystemId(loc.getSystemId());
+        } else {
+            fLocator.setColumnNumber(0);
+            fLocator.setLineNumber(0);
+        }
+
+        switch (node.getNodeType()) {
+            case Node.DOCUMENT_TYPE_NODE :
+                serializeDocType((DocumentType) node, true);
+                break;
+            case Node.COMMENT_NODE :
+                serializeComment((Comment) node);
+                break;
+            case Node.DOCUMENT_FRAGMENT_NODE :
+                // Children are traversed
+                break;
+            case Node.DOCUMENT_NODE :
+                break;
+            case Node.ELEMENT_NODE :
+                serializeElement((Element) node, true);
+                break;
+            case Node.PROCESSING_INSTRUCTION_NODE :
+                serializePI((ProcessingInstruction) node);
+                break;
+            case Node.CDATA_SECTION_NODE :
+                serializeCDATASection((CDATASection) node);
+                break;
+            case Node.TEXT_NODE :
+                serializeText((Text) node);
+                break;
+            case Node.ENTITY_REFERENCE_NODE :
+                serializeEntityReference((EntityReference) node, true);
+                break;
+            default :
+                }
+    }
+
+    /**
+     * End processing of given node
+     *
+     *
+     * @param node Node we just finished processing
+     *
+     * @throws org.xml.sax.SAXException
+     */
+    protected void endNode(Node node) throws org.xml.sax.SAXException {
+
+        switch (node.getNodeType()) {
+            case Node.DOCUMENT_NODE :
+                break;
+            case Node.DOCUMENT_TYPE_NODE :
+                serializeDocType((DocumentType) node, false);
+                break;
+            case Node.ELEMENT_NODE :
+                serializeElement((Element) node, false);
+                break;
+            case Node.CDATA_SECTION_NODE :
+                break;
+            case Node.ENTITY_REFERENCE_NODE :
+                serializeEntityReference((EntityReference) node, false);
+                break;
+            default :
+                }
+    }
+
+    // ***********************************************************************
+    // Node serialization methods
+    // ***********************************************************************
+    /**
+     * Applies a filter on the node to serialize
+     *
+     * @param node The Node to serialize
+     * @return True if the node is to be serialized else false if the node
+     *         is to be rejected or skipped.
+     */
+    protected boolean applyFilter(Node node, int nodeType) {
+        if (fFilter != null && (fWhatToShowFilter & nodeType) != 0) {
+
+            short code = fFilter.acceptNode(node);
+            switch (code) {
+                case NodeFilter.FILTER_REJECT :
+                case NodeFilter.FILTER_SKIP :
+                    return false; // skip the node
+                default : // fall through..
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Serializes a Document Type Node.
+     *
+     * @param node The Docuemnt Type Node to serialize
+     * @param bStart Invoked at the start or end of node.  Default true.
+     */
+    protected void serializeDocType(DocumentType node, boolean bStart)
+        throws SAXException {
+        // The DocType and internalSubset can not be modified in DOM and is
+        // considered to be well-formed as the outcome of successful parsing.
+        String docTypeName = node.getNodeName();
+        String publicId = node.getPublicId();
+        String systemId = node.getSystemId();
+        String internalSubset = node.getInternalSubset();
+
+        //DocumentType nodes are never passed to the filter
+
+        if (internalSubset != null && !"".equals(internalSubset)) {
+
+            if (bStart) {
+                try {
+                    // The Serializer does not provide a way to write out the
+                    // DOCTYPE internal subset via an event call, so we write it
+                    // out here.
+                    Writer writer = fSerializer.getWriter();
+                    StringBuffer dtd = new StringBuffer();
+
+                    dtd.append("<!DOCTYPE ");
+                    dtd.append(docTypeName);
+                    if (null != publicId) {
+                        dtd.append(" PUBLIC \"");
+                        dtd.append(publicId);
+                        dtd.append('\"');
+                    }
+
+                    if (null != systemId) {
+                        if (null == publicId) {
+                            dtd.append(" SYSTEM \"");
+                        } else {
+                            dtd.append(" \"");
+                        }
+                        dtd.append(systemId);
+                        dtd.append('\"');
+                    }
+
+                    dtd.append(" [ ");
+
+                    dtd.append(fNewLine);
+                    dtd.append(internalSubset);
+                    dtd.append("]>");
+                    dtd.append(fNewLine);
+
+                    writer.write(dtd.toString());
+                    writer.flush();
+
+                } catch (IOException e) {
+                    throw new SAXException(Utils.messages.createMessage(
+                            MsgKey.ER_WRITING_INTERNAL_SUBSET, null), e);
+                }
+            } // else if !bStart do nothing
+
+        } else {
+
+            if (bStart) {
+                if (fLexicalHandler != null) {
+                    fLexicalHandler.startDTD(docTypeName, publicId, systemId);
+                }
+            } else {
+                if (fLexicalHandler != null) {
+                    fLexicalHandler.endDTD();
+                }
+            }
+        }
+    }
+
+    /**
+     * Serializes a Comment Node.
+     *
+     * @param node The Comment Node to serialize
+     */
+    protected void serializeComment(Comment node) throws SAXException {
+        // comments=true
+        if ((fFeatures & COMMENTS) != 0) {
+            String data = node.getData();
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isCommentWellFormed(data);
+            }
+
+            if (fLexicalHandler != null) {
+                // apply the LSSerializer filter after the operations requested by the
+                // DOMConfiguration parameters have been applied
+                if (!applyFilter(node, NodeFilter.SHOW_COMMENT)) {
+                    return;
+                }
+
+                fLexicalHandler.comment(data.toCharArray(), 0, data.length());
+            }
+        }
+    }
+
+    /**
+     * Serializes an Element Node.
+     *
+     * @param node The Element Node to serialize
+     * @param bStart Invoked at the start or end of node.
+     */
+    protected void serializeElement(Element node, boolean bStart)
+        throws SAXException {
+        if (bStart) {
+            fElementDepth++;
+
+            // We use the Xalan specific startElement and starPrefixMapping calls
+            // (and addAttribute and namespaceAfterStartElement) as opposed to
+            // SAX specific, for performance reasons as they reduce the overhead
+            // of creating an AttList object upfront.
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isElementWellFormed(node);
+            }
+
+            // REVISIT: We apply the LSSerializer filter for elements before
+            // namesapce fixup
+            if (!applyFilter(node, NodeFilter.SHOW_ELEMENT)) {
+                return;
+            }
+
+            // namespaces=true, record and fixup namspaced element
+            if ((fFeatures & NAMESPACES) != 0) {
+                fNSBinder.pushContext();
+                fLocalNSBinder.reset();
+
+                recordLocalNSDecl(node);
+                fixupElementNS(node);
+            }
+
+            // Namespace normalization
+            fSerializer.startElement(
+                        node.getNamespaceURI(),
+                    node.getLocalName(),
+                    node.getNodeName());
+
+            serializeAttList(node);
+
+        } else {
+                fElementDepth--;
+
+            // apply the LSSerializer filter
+            if (!applyFilter(node, NodeFilter.SHOW_ELEMENT)) {
+                return;
+            }
+
+            this.fSerializer.endElement(
+                node.getNamespaceURI(),
+                node.getLocalName(),
+                node.getNodeName());
+            // since endPrefixMapping was not used by SerializationHandler it was removed
+            // for performance reasons.
+
+            if ((fFeatures & NAMESPACES) != 0 ) {
+                    fNSBinder.popContext();
+            }
+
+        }
+    }
+
+    /**
+     * Serializes the Attr Nodes of an Element.
+     *
+     * @param node The OwnerElement whose Attr Nodes are to be serialized.
+     */
+    protected void serializeAttList(Element node) throws SAXException {
+        NamedNodeMap atts = node.getAttributes();
+        int nAttrs = atts.getLength();
+
+        for (int i = 0; i < nAttrs; i++) {
+            Node attr = atts.item(i);
+
+            String localName = attr.getLocalName();
+            String attrName = attr.getNodeName();
+            String attrPrefix = attr.getPrefix() == null ? "" : attr.getPrefix();
+            String attrValue = attr.getNodeValue();
+
+            // Determine the Attr's type.
+            String type = null;
+            if (fIsLevel3DOM) {
+                type = ((Attr) attr).getSchemaTypeInfo().getTypeName();
+            }
+            type = type == null ? "CDATA" : type;
+
+            String attrNS = attr.getNamespaceURI();
+            if (attrNS !=null && attrNS.length() == 0) {
+                attrNS=null;
+                // we must remove prefix for this attribute
+                attrName=attr.getLocalName();
+            }
+
+            boolean isSpecified = ((Attr) attr).getSpecified();
+            boolean addAttr = true;
+            boolean applyFilter = false;
+            boolean xmlnsAttr =
+                attrName.equals("xmlns") || attrName.startsWith("xmlns:");
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isAttributeWellFormed(attr);
+            }
+
+            //-----------------------------------------------------------------
+            // start Attribute namespace fixup
+            //-----------------------------------------------------------------
+            // namespaces=true, normalize all non-namespace attributes
+            // Step 3. Attribute
+            if ((fFeatures & NAMESPACES) != 0 && !xmlnsAttr) {
+
+                        // If the Attr has a namespace URI
+                        if (attrNS != null) {
+                                attrPrefix = attrPrefix == null ? "" : attrPrefix;
+
+                                String declAttrPrefix = fNSBinder.getPrefix(attrNS);
+                                String declAttrNS = fNSBinder.getURI(attrPrefix);
+
+                                // attribute has no prefix (default namespace decl does not apply to
+                                // attributes)
+                                // OR
+                                // attribute prefix is not declared
+                                // OR
+                                // conflict: attribute has a prefix that conflicts with a binding
+                                if ("".equals(attrPrefix) || "".equals(declAttrPrefix)
+                                                || !attrPrefix.equals(declAttrPrefix)) {
+
+                                        // namespaceURI matches an in scope declaration of one or
+                                        // more prefixes
+                                        if (declAttrPrefix != null && !"".equals(declAttrPrefix)) {
+                                                // pick the prefix that was found and change attribute's
+                                                // prefix and nodeName.
+                                                attrPrefix = declAttrPrefix;
+
+                                                if (declAttrPrefix.length() > 0 ) {
+                                                        attrName = declAttrPrefix + ":" + localName;
+                                                } else {
+                                                        attrName = localName;
+                                                }
+                                        } else {
+                                                // The current prefix is not null and it has no in scope
+                                                // declaration
+                                                if (attrPrefix != null && !"".equals(attrPrefix)
+                                                                && declAttrNS == null) {
+                                                        // declare this prefix
+                                                        if ((fFeatures & NAMESPACEDECLS) != 0) {
+                                                                fSerializer.addAttribute(XMLNS_URI, attrPrefix,
+                                                                                XMLNS_PREFIX + ":" + attrPrefix, "CDATA",
+                                                                                attrNS);
+                                                                fNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                                fLocalNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                        }
+                                                } else {
+                                                        // find a prefix following the pattern "NS" +index
+                                                        // (starting at 1)
+                                                        // make sure this prefix is not declared in the current
+                                                        // scope.
+                                                        int counter = 1;
+                                                        attrPrefix = "NS" + counter++;
+
+                                                        while (fLocalNSBinder.getURI(attrPrefix) != null) {
+                                                                attrPrefix = "NS" + counter++;
+                                                        }
+                                                        // change attribute's prefix and Name
+                                                        attrName = attrPrefix + ":" + localName;
+
+                                                        // create a local namespace declaration attribute
+                                                        // Add the xmlns declaration attribute
+                                                        if ((fFeatures & NAMESPACEDECLS) != 0) {
+
+                                                                fSerializer.addAttribute(XMLNS_URI, attrPrefix,
+                                                                                XMLNS_PREFIX + ":" + attrPrefix, "CDATA",
+                                                                                attrNS);
+                                                        fNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                        fLocalNSBinder.declarePrefix(attrPrefix, attrNS);
+                                                        }
+                                                }
+                                        }
+                                }
+
+                        } else { // if the Attr has no namespace URI
+                                // Attr has no localName
+                                if (localName == null) {
+                                        // DOM Level 1 node!
+                                        String msg = Utils.messages.createMessage(
+                                                        MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                                                        new Object[] { attrName });
+
+                                        if (fErrorHandler != null) {
+                                                fErrorHandler
+                                                                .handleError(new DOMErrorImpl(
+                                                                                DOMError.SEVERITY_ERROR, msg,
+                                                                                MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, null,
+                                                                                null, null));
+                                        }
+
+                                } else { // uri=null and no colon
+                                        // attr has no namespace URI and no prefix
+                                        // no action is required, since attrs don't use default
+                                }
+                        }
+
+            }
+
+
+            // discard-default-content=true
+            // Default attr's are not passed to the filter and this contraint
+            // is applied only when discard-default-content=true
+            // What about default xmlns attributes???? check for xmlnsAttr
+            if ((((fFeatures & DISCARDDEFAULT) != 0) && isSpecified)
+                || ((fFeatures & DISCARDDEFAULT) == 0)) {
+                applyFilter = true;
+            } else {
+                addAttr = false;
+            }
+
+            if (applyFilter) {
+                // apply the filter for Attributes that are not default attributes
+                // or namespace decl attributes
+                if (fFilter != null
+                    && (fFilter.getWhatToShow() & NodeFilter.SHOW_ATTRIBUTE)
+                        != 0) {
+
+                    if (!xmlnsAttr) {
+                        short code = fFilter.acceptNode(attr);
+                        switch (code) {
+                            case NodeFilter.FILTER_REJECT :
+                            case NodeFilter.FILTER_SKIP :
+                                addAttr = false;
+                                break;
+                            default : //fall through..
+                        }
+                    }
+                }
+            }
+
+            // if the node is a namespace node
+            if (addAttr && xmlnsAttr) {
+                // If namespace-declarations=true, add the node , else don't add it
+                if ((fFeatures & NAMESPACEDECLS) != 0) {
+                        // The namespace may have been fixed up, in that case don't add it.
+                        if (localName != null && !"".equals(localName)) {
+                                fSerializer.addAttribute(attrNS, localName, attrName, type, attrValue);
+                        }
+                }
+            } else if (
+                addAttr && !xmlnsAttr) { // if the node is not a namespace node
+                // If namespace-declarations=true, add the node with the Attr nodes namespaceURI
+                // else add the node setting it's namespace to null or else the serializer will later
+                // attempt to add a xmlns attr for the prefixed attribute
+                if (((fFeatures & NAMESPACEDECLS) != 0) && (attrNS != null)) {
+                    fSerializer.addAttribute(
+                        attrNS,
+                        localName,
+                        attrName,
+                        type,
+                        attrValue);
+                } else {
+                    fSerializer.addAttribute(
+                        "",
+                        localName,
+                        attrName,
+                        type,
+                        attrValue);
+                }
+            }
+
+            //
+            if (xmlnsAttr && ((fFeatures & NAMESPACEDECLS) != 0)) {
+                int index;
+                // Use "" instead of null, as Xerces likes "" for the
+                // name of the default namespace.  Fix attributed
+                // to "Steven Murray" <smurray@ebt.com>.
+                String prefix =
+                    (index = attrName.indexOf(":")) < 0
+                        ? ""
+                        : attrName.substring(index + 1);
+
+                if (!"".equals(prefix)) {
+                    fSerializer.namespaceAfterStartElement(prefix, attrValue);
+                }
+            }
+        }
+
+    }
+
+    /**
+     * Serializes an ProcessingInstruction Node.
+     *
+     * @param node The ProcessingInstruction Node to serialize
+     */
+    protected void serializePI(ProcessingInstruction node)
+        throws SAXException {
+        ProcessingInstruction pi = node;
+        String name = pi.getNodeName();
+
+        // well-formed=true
+        if ((fFeatures & WELLFORMED) != 0) {
+            isPIWellFormed(node);
+        }
+
+        // apply the LSSerializer filter
+        if (!applyFilter(node, NodeFilter.SHOW_PROCESSING_INSTRUCTION)) {
+            return;
+        }
+
+        // String data = pi.getData();
+        if (name.equals("xslt-next-is-raw")) {
+            fNextIsRaw = true;
+        } else {
+            this.fSerializer.processingInstruction(name, pi.getData());
+        }
+    }
+
+    /**
+     * Serializes an CDATASection Node.
+     *
+     * @param node The CDATASection Node to serialize
+     */
+    protected void serializeCDATASection(CDATASection node)
+        throws SAXException {
+        // well-formed=true
+        if ((fFeatures & WELLFORMED) != 0) {
+            isCDATASectionWellFormed(node);
+        }
+
+        // cdata-sections = true
+        if ((fFeatures & CDATA) != 0) {
+
+            // split-cdata-sections = true
+            // Assumption: This parameter has an effect only when
+                        // cdata-sections=true
+            // ToStream, by default splits cdata-sections. Hence the check
+                        // below.
+            String nodeValue = node.getNodeValue();
+            int endIndex = nodeValue.indexOf("]]>");
+            if ((fFeatures & SPLITCDATA) != 0) {
+                if (endIndex >= 0) {
+                    // The first node split will contain the ]] markers
+                    String relatedData = nodeValue.substring(0, endIndex + 2);
+
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_CDATA_SECTIONS_SPLIT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_WARNING,
+                                msg,
+                                MsgKey.ER_CDATA_SECTIONS_SPLIT,
+                                null,
+                                relatedData,
+                                null));
+                    }
+                }
+            } else {
+                if (endIndex >= 0) {
+                    // The first node split will contain the ]] markers
+                    String relatedData = nodeValue.substring(0, endIndex + 2);
+
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_CDATA_SECTIONS_SPLIT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_ERROR,
+                                msg,
+                                MsgKey.ER_CDATA_SECTIONS_SPLIT));
+                    }
+                    // Report an error and return.  What error???
+                    return;
+                }
+            }
+
+            // apply the LSSerializer filter
+            if (!applyFilter(node, NodeFilter.SHOW_CDATA_SECTION)) {
+                return;
+            }
+
+            // splits the cdata-section
+            if (fLexicalHandler != null) {
+                fLexicalHandler.startCDATA();
+            }
+            dispatachChars(node);
+            if (fLexicalHandler != null) {
+                fLexicalHandler.endCDATA();
+            }
+        } else {
+            dispatachChars(node);
+        }
+    }
+
+    /**
+     * Serializes an Text Node.
+     *
+     * @param node The Text Node to serialize
+     */
+    protected void serializeText(Text node) throws SAXException {
+        if (fNextIsRaw) {
+            fNextIsRaw = false;
+            fSerializer.processingInstruction(
+                javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING,
+                "");
+            dispatachChars(node);
+            fSerializer.processingInstruction(
+                javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING,
+                "");
+        } else {
+            // keep track of dispatch or not to avoid duplicaiton of filter code
+            boolean bDispatch = false;
+
+            // well-formed=true
+            if ((fFeatures & WELLFORMED) != 0) {
+                isTextWellFormed(node);
+            }
+
+            // if the node is whitespace
+            // Determine the Attr's type.
+            boolean isElementContentWhitespace = false;
+            if (fIsLevel3DOM) {
+                isElementContentWhitespace =
+                       node.isElementContentWhitespace();
+            }
+
+            if (isElementContentWhitespace) {
+                // element-content-whitespace=true
+                if ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) {
+                    bDispatch = true;
+                }
+            } else {
+                bDispatch = true;
+            }
+
+            // apply the LSSerializer filter
+            if (!applyFilter(node, NodeFilter.SHOW_TEXT)) {
+                return;
+            }
+
+            if (bDispatch) {
+                dispatachChars(node);
+            }
+        }
+    }
+
+    /**
+     * Serializes an EntityReference Node.
+     *
+     * @param node The EntityReference Node to serialize
+     * @param bStart Inicates if called from start or endNode
+     */
+    protected void serializeEntityReference(
+        EntityReference node,
+        boolean bStart)
+        throws SAXException {
+        if (bStart) {
+            EntityReference eref = node;
+            // entities=true
+            if ((fFeatures & ENTITIES) != 0) {
+
+                // perform well-formedness and other checking only if
+                // entities = true
+
+                // well-formed=true
+                if ((fFeatures & WELLFORMED) != 0) {
+                    isEntityReferneceWellFormed(node);
+                }
+
+                // check "unbound-prefix-in-entity-reference" [fatal]
+                // Raised if the configuration parameter "namespaces" is set to true
+                if ((fFeatures & NAMESPACES) != 0) {
+                    checkUnboundPrefixInEntRef(node);
+                }
+
+                // The filter should not apply in this case, since the
+                // EntityReference is not being expanded.
+                // should we pass entity reference nodes to the filter???
+            }
+
+            if (fLexicalHandler != null) {
+
+                // startEntity outputs only Text but not Element, Attr, Comment
+                // and PI child nodes.  It does so by setting the m_inEntityRef
+                // in ToStream and using this to decide if a node is to be
+                // serialized or not.
+                fLexicalHandler.startEntity(eref.getNodeName());
+            }
+
+        } else {
+            EntityReference eref = node;
+            // entities=true or false,
+            if (fLexicalHandler != null) {
+                fLexicalHandler.endEntity(eref.getNodeName());
+            }
+        }
+    }
+
+
+    // ***********************************************************************
+    // Methods to check well-formedness
+    // ***********************************************************************
+    /**
+     * Taken from org.apache.xerces.dom.CoreDocumentImpl
+     *
+     * Check the string against XML's definition of acceptable names for
+     * elements and attributes and so on using the XMLCharacterProperties
+     * utility class
+     */
+    protected boolean isXMLName(String s, boolean xml11Version) {
+
+        if (s == null) {
+            return false;
+        }
+        if (!xml11Version)
+            return XMLChar.isValidName(s);
+        else
+            return XML11Char.isXML11ValidName(s);
+    }
+
+    /**
+     * Taken from org.apache.xerces.dom.CoreDocumentImpl
+     *
+     * Checks if the given qualified name is legal with respect
+     * to the version of XML to which this document must conform.
+     *
+     * @param prefix prefix of qualified name
+     * @param local local part of qualified name
+     */
+    protected boolean isValidQName(
+        String prefix,
+        String local,
+        boolean xml11Version) {
+
+        // check that both prefix and local part match NCName
+        if (local == null)
+            return false;
+        boolean validNCName = false;
+
+        if (!xml11Version) {
+            validNCName =
+                (prefix == null || XMLChar.isValidNCName(prefix))
+                    && XMLChar.isValidNCName(local);
+        } else {
+            validNCName =
+                (prefix == null || XML11Char.isXML11ValidNCName(prefix))
+                    && XML11Char.isXML11ValidNCName(local);
+        }
+
+        return validNCName;
+    }
+
+    /**
+     * Checks if a XML character is well-formed
+     *
+     * @param characters A String of characters to be checked for Well-Formedness
+     * @param refInvalidChar A reference to the character to be returned that was determined invalid.
+     */
+    protected boolean isWFXMLChar(String chardata, Character refInvalidChar) {
+        if (chardata == null || (chardata.length() == 0)) {
+            return true;
+        }
+
+        char[] dataarray = chardata.toCharArray();
+        int datalength = dataarray.length;
+
+        // version of the document is XML 1.1
+        if (fIsXMLVersion11) {
+            //we need to check all characters as per production rules of XML11
+            int i = 0;
+            while (i < datalength) {
+                if (XML11Char.isXML11Invalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return false;
+                }
+            }
+        } // version of the document is XML 1.0
+        else {
+            // we need to check all characters as per production rules of XML 1.0
+            int i = 0;
+            while (i < datalength) {
+                if (XMLChar.isInvalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return false;
+                }
+            }
+        } // end-else fDocument.isXMLVersion()
+
+        return true;
+    } // isXMLCharWF
+
+    /**
+     * Checks if a XML character is well-formed.  If there is a problem with
+     * the character a non-null Character is returned else null is returned.
+     *
+     * @param characters A String of characters to be checked for Well-Formedness
+     * @return Character A reference to the character to be returned that was determined invalid.
+     */
+    protected Character isWFXMLChar(String chardata) {
+        Character refInvalidChar;
+        if (chardata == null || (chardata.length() == 0)) {
+            return null;
+        }
+
+        char[] dataarray = chardata.toCharArray();
+        int datalength = dataarray.length;
+
+        // version of the document is XML 1.1
+        if (fIsXMLVersion11) {
+            //we need to check all characters as per production rules of XML11
+            int i = 0;
+            while (i < datalength) {
+                if (XML11Char.isXML11Invalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return refInvalidChar;
+                }
+            }
+        } // version of the document is XML 1.0
+        else {
+            // we need to check all characters as per production rules of XML 1.0
+            int i = 0;
+            while (i < datalength) {
+                if (XMLChar.isInvalid(dataarray[i++])) {
+                    // check if this is a supplemental character
+                    char ch = dataarray[i - 1];
+                    if (XMLChar.isHighSurrogate(ch) && i < datalength) {
+                        char ch2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(ch2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(ch, ch2))) {
+                            continue;
+                        }
+                    }
+                    // Reference to invalid character which is returned
+                    refInvalidChar = new Character(ch);
+                    return refInvalidChar;
+                }
+            }
+        } // end-else fDocument.isXMLVersion()
+
+        return null;
+    } // isXMLCharWF
+
+    /**
+     * Checks if a comment node is well-formed
+     *
+     * @param data The contents of the comment node
+     * @return a boolean indiacating if the comment is well-formed or not.
+     */
+    protected void isCommentWellFormed(String data) {
+        if (data == null || (data.length() == 0)) {
+            return;
+        }
+
+        char[] dataarray = data.toCharArray();
+        int datalength = dataarray.length;
+
+        // version of the document is XML 1.1
+        if (fIsXMLVersion11) {
+            // we need to check all chracters as per production rules of XML11
+            int i = 0;
+            while (i < datalength) {
+                char c = dataarray[i++];
+                if (XML11Char.isXML11Invalid(c)) {
+                    // check if this is a supplemental character
+                    if (XMLChar.isHighSurrogate(c) && i < datalength) {
+                        char c2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(c2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(c, c2))) {
+                            continue;
+                        }
+                    }
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                            new Object[] { new Character(c)});
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                } else if (c == '-' && i < datalength && dataarray[i] == '-') {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_DASH_IN_COMMENT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                }
+            }
+        } // version of the document is XML 1.0
+        else {
+            // we need to check all chracters as per production rules of XML 1.0
+            int i = 0;
+            while (i < datalength) {
+                char c = dataarray[i++];
+                if (XMLChar.isInvalid(c)) {
+                    // check if this is a supplemental character
+                    if (XMLChar.isHighSurrogate(c) && i < datalength) {
+                        char c2 = dataarray[i++];
+                        if (XMLChar.isLowSurrogate(c2)
+                            && XMLChar.isSupplemental(
+                                XMLChar.supplemental(c, c2))) {
+                            continue;
+                        }
+                    }
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                            new Object[] { new Character(c)});
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                } else if (c == '-' && i < datalength && dataarray[i] == '-') {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_WF_DASH_IN_COMMENT,
+                            null);
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_WF_INVALID_CHARACTER,
+                                null,
+                                null,
+                                null));
+                    }
+                }
+            }
+        }
+        return;
+    }
+
+    /**
+     * Checks if an element node is well-formed, by checking its Name for well-formedness.
+     *
+     * @param data The contents of the comment node
+     * @return a boolean indiacating if the comment is well-formed or not.
+     */
+    protected void isElementWellFormed(Node node) {
+        boolean isNameWF = false;
+        if ((fFeatures & NAMESPACES) != 0) {
+            isNameWF =
+                isValidQName(
+                    node.getPrefix(),
+                    node.getLocalName(),
+                    fIsXMLVersion11);
+        } else {
+            isNameWF = isXMLName(node.getNodeName(), fIsXMLVersion11);
+        }
+
+        if (!isNameWF) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "Element", node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an attr node is well-formed, by checking it's Name and value
+     * for well-formedness.
+     *
+     * @param data The contents of the comment node
+     * @return a boolean indiacating if the comment is well-formed or not.
+     */
+    protected void isAttributeWellFormed(Node node) {
+        boolean isNameWF = false;
+        if ((fFeatures & NAMESPACES) != 0) {
+            isNameWF =
+                isValidQName(
+                    node.getPrefix(),
+                    node.getLocalName(),
+                    fIsXMLVersion11);
+        } else {
+            isNameWF = isXMLName(node.getNodeName(), fIsXMLVersion11);
+        }
+
+        if (!isNameWF) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "Attr", node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // Check the Attr's node value
+        // WFC: No < in Attribute Values
+        String value = node.getNodeValue();
+        if (value.indexOf('<') >= 0) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_LT_IN_ATTVAL,
+                    new Object[] {
+                        ((Attr) node).getOwnerElement().getNodeName(),
+                        node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_LT_IN_ATTVAL,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // we need to loop through the children of attr nodes and check their values for
+        // well-formedness
+        NodeList children = node.getChildNodes();
+        for (int i = 0; i < children.getLength(); i++) {
+            Node child = children.item(i);
+            // An attribute node with no text or entity ref child for example
+            // doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:ns");
+            // followes by
+            // element.setAttributeNodeNS(attribute);
+            // can potentially lead to this situation.  If the attribute
+            // was a prefix Namespace attribute declaration then then DOM Core
+            // should have some exception defined for this.
+            if (child == null) {
+                // we should probably report an error
+                continue;
+            }
+            switch (child.getNodeType()) {
+                case Node.TEXT_NODE :
+                    isTextWellFormed((Text) child);
+                    break;
+                case Node.ENTITY_REFERENCE_NODE :
+                    isEntityReferneceWellFormed((EntityReference) child);
+                    break;
+                default :
+            }
+        }
+
+        // TODO:
+        // WFC: Check if the attribute prefix is bound to
+        // http://www.w3.org/2000/xmlns/
+
+        // WFC: Unique Att Spec
+        // Perhaps pass a seen boolean value to this method.  serializeAttList will determine
+        // if the attr was seen before.
+    }
+
+    /**
+     * Checks if a PI node is well-formed, by checking it's Name and data
+     * for well-formedness.
+     *
+     * @param data The contents of the comment node
+     */
+    protected void isPIWellFormed(ProcessingInstruction node) {
+        // Is the PI Target a valid XML name
+        if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "ProcessingInstruction", node.getTarget()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // Does the PI Data carry valid XML characters
+
+        // REVISIT: Should we check if the PI DATA contains a ?> ???
+        Character invalidChar = isWFXMLChar(node.getData());
+        if (invalidChar != null) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                    new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an CDATASection node is well-formed, by checking it's data
+     * for well-formedness.  Note that the presence of a CDATA termination mark
+     * in the contents of a CDATASection is handled by the parameter
+     * spli-cdata-sections
+     *
+     * @param data The contents of the comment node
+     */
+    protected void isCDATASectionWellFormed(CDATASection node) {
+        // Does the data valid XML character data
+        Character invalidChar = isWFXMLChar(node.getData());
+        //if (!isWFXMLChar(node.getData(), invalidChar)) {
+        if (invalidChar != null) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                    new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an Text node is well-formed, by checking if it contains invalid
+     * XML characters.
+     *
+     * @param data The contents of the comment node
+     */
+    protected void isTextWellFormed(Text node) {
+        // Does the data valid XML character data
+        Character invalidChar = isWFXMLChar(node.getData());
+        if (invalidChar != null) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                    new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER,
+                        null,
+                        null,
+                        null));
+            }
+        }
+    }
+
+    /**
+     * Checks if an EntityRefernece node is well-formed, by checking it's node name.  Then depending
+     * on whether it is referenced in Element content or in an Attr Node, checks if the EntityReference
+     * references an unparsed entity or a external entity and if so throws raises the
+     * appropriate well-formedness error.
+     *
+     * @param data The contents of the comment node
+     * @parent The parent of the EntityReference Node
+     */
+    protected void isEntityReferneceWellFormed(EntityReference node) {
+        // Is the EntityReference name a valid XML name
+        if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
+            String msg =
+                Utils.messages.createMessage(
+                    MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                    new Object[] { "EntityReference", node.getNodeName()});
+
+            if (fErrorHandler != null) {
+                fErrorHandler.handleError(
+                    new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR,
+                        msg,
+                        MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                        null,
+                        null,
+                        null));
+            }
+        }
+
+        // determine the parent node
+        Node parent = node.getParentNode();
+
+        // Traverse the declared entities and check if the nodeName and namespaceURI
+        // of the EntityReference matches an Entity.  If so, check the if the notationName
+        // is not null, if so, report an error.
+        DocumentType docType = node.getOwnerDocument().getDoctype();
+        if (docType != null) {
+            NamedNodeMap entities = docType.getEntities();
+            for (int i = 0; i < entities.getLength(); i++) {
+                Entity ent = (Entity) entities.item(i);
+
+                String nodeName =
+                    node.getNodeName() == null ? "" : node.getNodeName();
+                String nodeNamespaceURI =
+                    node.getNamespaceURI() == null
+                        ? ""
+                        : node.getNamespaceURI();
+                String entName =
+                    ent.getNodeName() == null ? "" : ent.getNodeName();
+                String entNamespaceURI =
+                    ent.getNamespaceURI() == null ? "" : ent.getNamespaceURI();
+                // If referenced in Element content
+                // WFC: Parsed Entity
+                if (parent.getNodeType() == Node.ELEMENT_NODE) {
+                    if (entNamespaceURI.equals(nodeNamespaceURI)
+                        && entName.equals(nodeName)) {
+
+                        if (ent.getNotationName() != null) {
+                            String msg =
+                                Utils.messages.createMessage(
+                                    MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                                    new Object[] { node.getNodeName()});
+
+                            if (fErrorHandler != null) {
+                                fErrorHandler.handleError(
+                                    new DOMErrorImpl(
+                                        DOMError.SEVERITY_FATAL_ERROR,
+                                        msg,
+                                        MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                                        null,
+                                        null,
+                                        null));
+                            }
+                        }
+                    }
+                } // end if WFC: Parsed Entity
+
+                // If referenced in an Attr value
+                // WFC: No External Entity References
+                if (parent.getNodeType() == Node.ATTRIBUTE_NODE) {
+                    if (entNamespaceURI.equals(nodeNamespaceURI)
+                        && entName.equals(nodeName)) {
+
+                        if (ent.getPublicId() != null
+                            || ent.getSystemId() != null
+                            || ent.getNotationName() != null) {
+                            String msg =
+                                Utils.messages.createMessage(
+                                    MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                                    new Object[] { node.getNodeName()});
+
+                            if (fErrorHandler != null) {
+                                fErrorHandler.handleError(
+                                    new DOMErrorImpl(
+                                        DOMError.SEVERITY_FATAL_ERROR,
+                                        msg,
+                                        MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                                        null,
+                                        null,
+                                        null));
+                            }
+                        }
+                    }
+                } //end if WFC: No External Entity References
+            }
+        }
+    } // isEntityReferneceWellFormed
+
+    /**
+     * If the configuration parameter "namespaces" is set to true, this methods
+     * checks if an entity whose replacement text contains unbound namespace
+     * prefixes is referenced in a location where there are no bindings for
+     * the namespace prefixes and if so raises a LSException with the error-type
+     * "unbound-prefix-in-entity-reference"
+     *
+     * @param Node, The EntityReference nodes whose children are to be checked
+     */
+    protected void checkUnboundPrefixInEntRef(Node node) {
+        Node child, next;
+        for (child = node.getFirstChild(); child != null; child = next) {
+            next = child.getNextSibling();
+
+            if (child.getNodeType() == Node.ELEMENT_NODE) {
+
+                //If a NamespaceURI is not declared for the current
+                //node's prefix, raise a fatal error.
+                String prefix = child.getPrefix();
+                if (prefix != null
+                                && fNSBinder.getURI(prefix) == null) {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                            new Object[] {
+                                node.getNodeName(),
+                                child.getNodeName(),
+                                prefix });
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_FATAL_ERROR,
+                                msg,
+                                MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                                null,
+                                null,
+                                null));
+                    }
+                }
+
+                NamedNodeMap attrs = child.getAttributes();
+
+                for (int i = 0; i < attrs.getLength(); i++) {
+                    String attrPrefix = attrs.item(i).getPrefix();
+                    if (attrPrefix != null
+                                && fNSBinder.getURI(attrPrefix) == null) {
+                        String msg =
+                            Utils.messages.createMessage(
+                                MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                                new Object[] {
+                                    node.getNodeName(),
+                                    child.getNodeName(),
+                                    attrs.item(i)});
+
+                        if (fErrorHandler != null) {
+                            fErrorHandler.handleError(
+                                new DOMErrorImpl(
+                                    DOMError.SEVERITY_FATAL_ERROR,
+                                    msg,
+                                    MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                                    null,
+                                    null,
+                                    null));
+                        }
+                    }
+                }
+            }
+
+            if (child.hasChildNodes()) {
+                checkUnboundPrefixInEntRef(child);
+            }
+        }
+    }
+
+    // ***********************************************************************
+    // Namespace normalization
+    // ***********************************************************************
+    /**
+     * Records local namespace declarations, to be used for normalization later
+     *
+     * @param Node, The element node, whose namespace declarations are to be recorded
+     */
+    protected void recordLocalNSDecl(Node node) {
+        NamedNodeMap atts = ((Element) node).getAttributes();
+        int length = atts.getLength();
+
+        for (int i = 0; i < length; i++) {
+            Node attr = atts.item(i);
+
+            String localName = attr.getLocalName();
+            String attrPrefix = attr.getPrefix();
+            String attrValue = attr.getNodeValue();
+            String attrNS = attr.getNamespaceURI();
+
+            localName =
+                localName == null
+                    || XMLNS_PREFIX.equals(localName) ? "" : localName;
+            attrPrefix = attrPrefix == null ? "" : attrPrefix;
+            attrValue = attrValue == null ? "" : attrValue;
+            attrNS = attrNS == null ? "" : attrNS;
+
+            // check if attribute is a namespace decl
+            if (XMLNS_URI.equals(attrNS)) {
+
+                // No prefix may be bound to http://www.w3.org/2000/xmlns/.
+                if (XMLNS_URI.equals(attrValue)) {
+                    String msg =
+                        Utils.messages.createMessage(
+                            MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                            new Object[] { attrPrefix, XMLNS_URI });
+
+                    if (fErrorHandler != null) {
+                        fErrorHandler.handleError(
+                            new DOMErrorImpl(
+                                DOMError.SEVERITY_ERROR,
+                                msg,
+                                MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                                null,
+                                null,
+                                null));
+                    }
+                } else {
+                    // store the namespace-declaration
+                        if (XMLNS_PREFIX.equals(attrPrefix) ) {
+                        // record valid decl
+                        if (attrValue.length() != 0) {
+                            fNSBinder.declarePrefix(localName, attrValue);
+                        } else {
+                            // Error; xmlns:prefix=""
+                        }
+                    } else { // xmlns
+                        // empty prefix is always bound ("" or some string)
+                        fNSBinder.declarePrefix("", attrValue);
+                    }
+                }
+
+            }
+        }
+    }
+
+    /**
+     * Fixes an element's namespace
+     *
+     * @param Node, The element node, whose namespace is to be fixed
+     */
+    protected void fixupElementNS(Node node) throws SAXException {
+        String namespaceURI = ((Element) node).getNamespaceURI();
+        String prefix = ((Element) node).getPrefix();
+        String localName = ((Element) node).getLocalName();
+
+        if (namespaceURI != null) {
+            //if ( Element's prefix/namespace pair (or default namespace,
+            // if no prefix) are within the scope of a binding )
+            prefix = prefix == null ? "" : prefix;
+            String inScopeNamespaceURI = fNSBinder.getURI(prefix);
+
+            if ((inScopeNamespaceURI != null
+                && inScopeNamespaceURI.equals(namespaceURI))) {
+                // do nothing, declaration in scope is inherited
+
+            } else {
+                // Create a local namespace declaration attr for this namespace,
+                // with Element's current prefix (or a default namespace, if
+                // no prefix). If there's a conflicting local declaration
+                // already present, change its value to use this namespace.
+
+                // Add the xmlns declaration attribute
+                //fNSBinder.pushNamespace(prefix, namespaceURI, fElementDepth);
+                if ((fFeatures & NAMESPACEDECLS) != 0) {
+                    if ("".equals(prefix) || "".equals(namespaceURI)) {
+                        ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX, namespaceURI);
+                    } else {
+                        ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX + ":" + prefix, namespaceURI);
+                    }
+                }
+                fLocalNSBinder.declarePrefix(prefix, namespaceURI);
+                fNSBinder.declarePrefix(prefix, namespaceURI);
+
+            }
+        } else {
+            // Element has no namespace
+            // DOM Level 1
+            if (localName == null || "".equals(localName)) {
+                //  DOM Level 1 node!
+                String msg =
+                    Utils.messages.createMessage(
+                        MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                        new Object[] { node.getNodeName()});
+
+                if (fErrorHandler != null) {
+                    fErrorHandler.handleError(
+                        new DOMErrorImpl(
+                            DOMError.SEVERITY_ERROR,
+                            msg,
+                            MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                            null,
+                            null,
+                            null));
+                }
+            } else {
+                namespaceURI = fNSBinder.getURI("");
+                if (namespaceURI !=null && namespaceURI.length() > 0) {
+                    ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX, "");
+                        fLocalNSBinder.declarePrefix("", "");
+                    fNSBinder.declarePrefix("", "");
+                }
+            }
+        }
+    }
+    /**
+     * This table is a quick lookup of a property key (String) to the integer that
+     * is the bit to flip in the fFeatures field, so the integers should have
+     * values 1,2,4,8,16...
+     *
+     */
+    private static final Hashtable s_propKeys = new Hashtable();
+    static {
+
+        // Initialize the mappings of property keys to bit values (Integer objects)
+        // or mappings to a String object "", which indicates we are interested
+        // in the property, but it does not have a simple bit value to flip
+
+        // cdata-sections
+        int i = CDATA;
+        Integer val = new Integer(i);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_CDATA_SECTIONS,
+            val);
+
+        // comments
+        int i1 = COMMENTS;
+        val = new Integer(i1);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_COMMENTS,
+            val);
+
+        // element-content-whitespace
+        int i2 = ELEM_CONTENT_WHITESPACE;
+        val = new Integer(i2);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+            val);
+        int i3 = ENTITIES;
+
+        // entities
+        val = new Integer(i3);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_ENTITIES,
+            val);
+
+        // namespaces
+        int i4 = NAMESPACES;
+        val = new Integer(i4);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_NAMESPACES,
+            val);
+
+        // namespace-declarations
+        int i5 = NAMESPACEDECLS;
+        val = new Integer(i5);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+            val);
+
+        // split-cdata-sections
+        int i6 = SPLITCDATA;
+        val = new Integer(i6);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_SPLIT_CDATA,
+            val);
+
+        // discard-default-content
+        int i7 = WELLFORMED;
+        val = new Integer(i7);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_WELLFORMED,
+            val);
+
+        // discard-default-content
+        int i8 = DISCARDDEFAULT;
+        val = new Integer(i8);
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT,
+            val);
+
+        // We are interested in these properties, but they don't have a simple
+        // bit value to deal with.
+        s_propKeys.put(
+            DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_FORMAT_PRETTY_PRINT,
+            "");
+        s_propKeys.put(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "");
+        s_propKeys.put(
+            DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION,
+            "");
+        s_propKeys.put(DOMConstants.S_XSL_OUTPUT_ENCODING, "");
+        s_propKeys.put(OutputPropertiesFactory.S_KEY_ENTITIES, "");
+    }
+
+    /**
+     * Initializes fFeatures based on the DOMConfiguration Parameters set.
+     *
+     * @param properties DOMConfiguraiton properties that were set and which are
+     * to be used while serializing the DOM.
+     */
+    protected void initProperties(Properties properties) {
+
+        for (Enumeration keys = properties.keys(); keys.hasMoreElements();) {
+
+            final String key = (String) keys.nextElement();
+
+            // caonical-form
+            // Other features will be enabled or disabled when this is set to true or false.
+
+            // error-handler; set via the constructor
+
+            // infoset
+            // Other features will be enabled or disabled when this is set to true
+
+            // A quick lookup for the given set of properties (cdata-sections ...)
+            final Object iobj = s_propKeys.get(key);
+            if (iobj != null) {
+                if (iobj instanceof Integer) {
+                    // Dealing with a property that has a simple bit value that
+                    // we need to set
+
+                    // cdata-sections
+                    // comments
+                    // element-content-whitespace
+                    // entities
+                    // namespaces
+                    // namespace-declarations
+                    // split-cdata-sections
+                    // well-formed
+                    // discard-default-content
+                    final int BITFLAG = ((Integer) iobj).intValue();
+                    if ((properties.getProperty(key).endsWith("yes"))) {
+                        fFeatures = fFeatures | BITFLAG;
+                    } else {
+                        fFeatures = fFeatures & ~BITFLAG;
+                    }
+                } else {
+                    // We are interested in the property, but it is not
+                    // a simple bit that we need to set.
+
+                    if ((DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_FORMAT_PRETTY_PRINT)
+                        .equals(key)) {
+                        // format-pretty-print; set internally on the serializers via xsl:output properties in LSSerializer
+                        if ((properties.getProperty(key).endsWith("yes"))) {
+                            fSerializer.setIndent(true);
+                            fSerializer.setIndentAmount(4);
+                        } else {
+                            fSerializer.setIndent(false);
+                        }
+                    } else if (
+                        (DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL).equals(
+                            key)) {
+                        // omit-xml-declaration; set internally on the serializers via xsl:output properties in LSSerializer
+                        if ((properties.getProperty(key).endsWith("yes"))) {
+                            fSerializer.setOmitXMLDeclaration(true);
+                        } else {
+                            fSerializer.setOmitXMLDeclaration(false);
+                        }
+                    } else if (
+                        (
+                            DOMConstants.S_XERCES_PROPERTIES_NS
+                                + DOMConstants.S_XML_VERSION).equals(
+                            key)) {
+                        // Retreive the value of the XML Version attribute via the xml-version
+                        String version = properties.getProperty(key);
+                        if ("1.1".equals(version)) {
+                            fIsXMLVersion11 = true;
+                            fSerializer.setVersion(version);
+                        } else {
+                            fSerializer.setVersion("1.0");
+                        }
+                    } else if (
+                        (DOMConstants.S_XSL_OUTPUT_ENCODING).equals(key)) {
+                        // Retreive the value of the XML Encoding attribute
+                        String encoding = properties.getProperty(key);
+                        if (encoding != null) {
+                            fSerializer.setEncoding(encoding);
+                        }
+                    } else if ((OutputPropertiesFactory.S_KEY_ENTITIES).equals(key)) {
+                        // Retreive the value of the XML Encoding attribute
+                        String entities = properties.getProperty(key);
+                        if (DOMConstants.S_XSL_VALUE_ENTITIES.equals(entities)) {
+                            fSerializer.setDTDEntityExpansion(false);
+                        }
+                    } else {
+                        // We shouldn't get here, ever, now what?
+                    }
+                }
+            }
+        }
+        // Set the newLine character to use
+        if (fNewLine != null) {
+            fSerializer.setOutputProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR, fNewLine);
+        }
+    }
+
+} //TreeWalker
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMConstants.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+/**
+ * DOM Constants used by the DOM Level 3 LSSerializer implementation.
+ *
+ * @xsl.usage internal
+ */
+final class DOMConstants {
+    //
+    // Constants: DOM Level 3 feature ids
+    //
+    public static final String DOM3_REC_URL = "http://www.w3.org/TR/DOM-Level-3-LS";
+
+    public static final String XERCES_URL = "http://xml.apache.org/xerces-2j";
+
+    // The namespace used to qualified DOM Level 3 DOMConfiguration parameters
+    public static final String S_DOM3_PROPERTIES_NS = "{"
+            + DOMConstants.DOM3_REC_URL + "}";
+
+    public static final String S_XERCES_PROPERTIES_NS = "{"
+            + DOMConstants.XERCES_URL + "}";
+
+    // xmlns namespaces
+    private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+
+    // namespace prefix
+    private static final String XMLNS_PREFIX = "xmlns";
+
+    // ************************************************************************
+    // DOM Level 3 DOM Configuration parameter names
+    // ************************************************************************
+    // DOM Level 3 parameters defined in Core
+    public static final String DOM_CANONICAL_FORM = "canonical-form"; // Unsupported, we only appear to support this
+
+    public static final String DOM_CDATA_SECTIONS = "cdata-sections";
+
+    public static final String DOM_CHECK_CHAR_NORMALIZATION = "check-character-normalization"; // Unsupported
+
+    public static final String DOM_COMMENTS = "comments";
+
+    public static final String DOM_DATATYPE_NORMALIZATION = "datatype-normalization"; // Unsupported
+
+    public static final String DOM_ELEMENT_CONTENT_WHITESPACE = "element-content-whitespace";
+
+    public static final String DOM_ENTITIES = "entities";
+
+    public static final String DOM_INFOSET = "infoset";
+
+    public static final String DOM_NAMESPACES = "namespaces";
+
+    public static final String DOM_NAMESPACE_DECLARATIONS = "namespace-declarations";
+
+    public static final String DOM_NORMALIZE_CHARACTERS = "normalize-characters"; // Unsupported
+
+    public static final String DOM_SPLIT_CDATA = "split-cdata-sections";
+
+    public static final String DOM_VALIDATE_IF_SCHEMA = "validate-if-schema"; // Unsopported
+
+    public static final String DOM_VALIDATE = "validate"; // Unsopported
+
+    public static final String DOM_WELLFORMED = "well-formed";
+
+    // DOM Level 3 Save
+    public static final String DOM_DISCARD_DEFAULT_CONTENT = "discard-default-content";
+
+    public static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print";
+
+    public static final String DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS = "ignore-unknown-character-denormalizations"; // Unsupported
+
+    public static final String DOM_XMLDECL = "xml-declaration";
+
+    // DOM Properties
+    public static final String DOM_ERROR_HANDLER = "error-handler";
+
+    public static final String DOM_SCHEMA_TYPE = "schema-type"; // Unsupported
+
+    public static final String DOM_SCHEMA_LOCATION = "schema-location"; // Unsupported
+
+    // ************************************************************************
+
+    // XSL Output properties
+    // The xsl:output 'indent' property used in LSSerializer
+    public static final String S_XSL_OUTPUT_INDENT = "indent";
+
+    // The xsl:output 'indent' property used in LSSerializer
+    public static final String S_XSL_OUTPUT_ENCODING = "encoding";
+
+    // The xsl:output 'omit-xml-declaration' property used in LSSerializer
+    public static final String S_XSL_OUTPUT_OMIT_XML_DECL = "omit-xml-declaration";
+
+    // The xerces serializer specific 'omit-xml-declaration' property used in LSSerializer
+    public static final String S_XML_VERSION = "xml-version";
+
+    //
+    public static final String S_XSL_VALUE_ENTITIES = "com/sun/org/apache/xml/internal/serializer/XMLEntities";
+
+    // Parameter values
+    public static final String DOM3_EXPLICIT_TRUE = "explicit:yes";
+
+    public static final String DOM3_DEFAULT_TRUE = "default:yes";
+
+    public static final String DOM3_EXPLICIT_FALSE = "explicit:no";
+
+    public static final String DOM3_DEFAULT_FALSE = "default:no";
+
+    // DOM Exceptions
+    public static final String DOM_EXCEPTION_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND";
+
+    public static final String DOM_EXCEPTION_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED";
+
+    public static final String DOM_LSEXCEPTION_SERIALIZER_ERR = "SERIALIZER_ERROR";
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorHandlerImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMErrorHandler;
+
+/**
+ * This is the default implementation of the ErrorHandler interface and is
+ * used if one is not provided.  The default implementation simply reports
+ * DOMErrors to System.err.
+ *
+ * @xsl.usage internal
+ */
+final class DOMErrorHandlerImpl implements DOMErrorHandler {
+
+    /**
+     * Default Constructor
+     */
+    DOMErrorHandlerImpl() {
+    }
+
+    /**
+     * Implementation of DOMErrorHandler.handleError that
+     * adds copy of error to list for later retrieval.
+     *
+     */
+    public boolean handleError(DOMError error) {
+        boolean fail = true;
+        String severity = null;
+        if (error.getSeverity() == DOMError.SEVERITY_WARNING) {
+            fail = false;
+            severity = "[Warning]";
+        } else if (error.getSeverity() == DOMError.SEVERITY_ERROR) {
+            severity = "[Error]";
+        } else if (error.getSeverity() == DOMError.SEVERITY_FATAL_ERROR) {
+            severity = "[Fatal Error]";
+        }
+
+        System.err.println(severity + ": " + error.getMessage() + "\t");
+        System.err.println("Type : " + error.getType() + "\t" + "Related Data: "
+                + error.getRelatedData() + "\t" + "Related Exception: "
+                + error.getRelatedException() );
+
+        return fail;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMLocator;
+
+/**
+ * Implementation of the DOM Level 3 DOMError interface.
+ *
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ERROR-Interfaces-DOMError'>DOMError Interface definition from Document Object Model (DOM) Level 3 Core Specification</a>.
+ *
+ * @xsl.usage internal
+ */
+
+final class DOMErrorImpl implements DOMError {
+
+    /** private data members */
+
+    // The DOMError Severity
+    private short fSeverity = DOMError.SEVERITY_WARNING;
+
+    // The Error message
+    private String fMessage = null;
+
+    //  A String indicating which related data is expected in relatedData.
+    private String fType;
+
+    // The platform related exception
+    private Exception fException = null;
+
+    //
+    private Object fRelatedData;
+
+    // The location of the exception
+    private DOMLocatorImpl fLocation = new DOMLocatorImpl();
+
+
+    //
+    // Constructors
+    //
+
+    /**
+     * Default constructor.
+     */
+    DOMErrorImpl () {
+    }
+
+    /**
+     * @param severity
+     * @param message
+     * @param type
+     */
+    DOMErrorImpl(short severity, String message, String type) {
+        fSeverity = severity;
+        fMessage = message;
+        fType = type;
+    }
+
+    /**
+     * @param severity
+     * @param message
+     * @param type
+     * @param exception
+     */
+    DOMErrorImpl(short severity, String message, String type,
+            Exception exception) {
+        fSeverity = severity;
+        fMessage = message;
+        fType = type;
+        fException = exception;
+    }
+
+    /**
+     * @param severity
+     * @param message
+     * @param type
+     * @param exception
+     * @param relatedData
+     * @param location
+     */
+    DOMErrorImpl(short severity, String message, String type,
+            Exception exception, Object relatedData, DOMLocatorImpl location) {
+        fSeverity = severity;
+        fMessage = message;
+        fType = type;
+        fException = exception;
+        fRelatedData = relatedData;
+        fLocation = location;
+    }
+
+
+    /**
+     * The severity of the error, either <code>SEVERITY_WARNING</code>,
+     * <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
+     *
+     * @return A short containing the DOMError severity
+     */
+    public short getSeverity() {
+        return fSeverity;
+    }
+
+    /**
+     * The DOMError message string.
+     *
+     * @return String
+     */
+    public String getMessage() {
+        return fMessage;
+    }
+
+    /**
+     * The location of the DOMError.
+     *
+     * @return A DOMLocator object containing the DOMError location.
+     */
+    public DOMLocator getLocation() {
+        return fLocation;
+    }
+
+    /**
+     * The related platform dependent exception if any.
+     *
+     * @return A java.lang.Exception
+     */
+    public Object getRelatedException(){
+        return fException;
+    }
+
+    /**
+     * Returns a String indicating which related data is expected in relatedData.
+     *
+     * @return A String
+     */
+    public String getType(){
+        return fType;
+    }
+
+    /**
+     * The related DOMError.type dependent data if any.
+     *
+     * @return java.lang.Object
+     */
+    public Object getRelatedData(){
+        return fRelatedData;
+    }
+
+    public void reset(){
+        fSeverity = DOMError.SEVERITY_WARNING;
+        fException = null;
+        fMessage = null;
+        fType = null;
+        fRelatedData = null;
+        fLocation = null;
+    }
+
+}// class DOMErrorImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMLocatorImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.DOMLocator;
+import org.w3c.dom.Node;
+
+
+/**
+ * <code>DOMLocatorImpl</code> is an implementaion that describes a location (e.g.
+ * where an error occured).
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * This class is a copy of the Xerces-2J class org.apache.xerces.dom.DOMLocatorImpl.java v 1.10
+ *
+ * @author Gopal Sharma, SUN Microsystems Inc.
+ * @version $Id:
+ *
+ * @xsl.usage internal
+ */
+final class DOMLocatorImpl implements DOMLocator {
+
+    //
+    // Data
+    //
+
+    /**
+     * The column number where the error occured,
+     * or -1 if there is no column number available.
+     */
+    private final int fColumnNumber;
+
+    /**
+     * The line number where the error occured,
+     * or -1 if there is no line number available.
+     */
+    private final int fLineNumber;
+
+    /** related data node*/
+    private final Node fRelatedNode;
+
+    /**
+     * The URI where the error occured,
+     * or null if there is no URI available.
+     */
+    private final String fUri;
+
+    /**
+     * The byte offset into the input source this locator is pointing to or -1
+     * if there is no byte offset available
+     */
+    private final int fByteOffset;
+
+    /**
+     * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646],
+     * offset into the input source this locator is pointing to or -1 if there
+     * is no UTF-16 offset available.
+     */
+    private final int fUtf16Offset;
+
+    //
+    // Constructors
+    //
+
+    DOMLocatorImpl(){
+        fColumnNumber = -1;
+        fLineNumber = -1;
+        fRelatedNode = null;
+        fUri = null;
+        fByteOffset = -1;
+        fUtf16Offset = -1;
+    }
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, String uri ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fUri = uri;
+
+        fRelatedNode = null;
+        fByteOffset = -1;
+        fUtf16Offset = -1;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, String uri )
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fUri = uri;
+        fUtf16Offset = utf16Offset;
+
+
+        fRelatedNode = null;
+        fByteOffset = -1;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri )
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fByteOffset = byteoffset ;
+        fRelatedNode = relatedData ;
+        fUri = uri;
+
+        fUtf16Offset = -1;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
+
+    DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri, int utf16Offset ){
+        fLineNumber = lineNumber ;
+        fColumnNumber = columnNumber ;
+        fByteOffset = byteoffset ;
+        fRelatedNode = relatedData ;
+        fUri = uri;
+        fUtf16Offset = utf16Offset;
+    } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
+
+
+    /**
+     * The line number where the error occured, or -1 if there is no line
+     * number available.
+     */
+    public int getLineNumber(){
+        return fLineNumber;
+    }
+
+    /**
+     * The column number where the error occured, or -1 if there is no column
+     * number available.
+     */
+    public int getColumnNumber(){
+        return fColumnNumber;
+    }
+
+
+    /**
+     * The URI where the error occured, or null if there is no URI available.
+     */
+    public String getUri(){
+        return fUri;
+    }
+
+
+    public Node getRelatedNode(){
+        return fRelatedNode;
+    }
+
+
+    /**
+     * The byte offset into the input source this locator is pointing to or -1
+     * if there is no byte offset available
+     */
+    public int getByteOffset(){
+        return fByteOffset;
+    }
+
+    /**
+     * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646],
+     * offset into the input source this locator is pointing to or -1 if there
+     * is no UTF-16 offset available.
+     */
+    public int getUtf16Offset(){
+        return fUtf16Offset;
+    }
+
+}// class DOMLocatorImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMOutputImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import org.w3c.dom.ls.LSOutput;
+
+import java.io.Writer;
+import java.io.OutputStream;
+
+/**
+ * This is a copy of the Xerces-2J class org.apache.xerces.dom.DOMOutputImpl.java
+ *
+ * This class represents an output destination for data.
+ * This interface allows an application to encapsulate information about an
+ * output destination in a single object, which may include a URI, a byte stream
+ * (possibly with a specifiedencoding), a base URI, and/or a character stream.
+ * The exact definitions of a byte stream and a character stream are binding
+ * dependent.
+ * The application is expected to provide objects that implement this interface
+ * whenever such objects are needed. The application can either provide its
+ * own objects that implement this interface, or it can use the generic factory
+ * method DOMImplementationLS.createLSOutput() to create objects that
+ * implement this interface.
+ * The DOMSerializer will use the LSOutput object to determine where to
+ * serialize the output to. The DOMSerializer will look at the different
+ * outputs specified in the LSOutput in the following order to know which one
+ * to output to, the first one that data can be output to will be used:
+ * 1.LSOutput.characterStream
+ * 2.LSOutput.byteStream
+ * 3.LSOutput.systemId
+ * LSOutput objects belong to the application. The DOM implementation will
+ * never modify them (though it may make copies and modify the copies,
+ * if necessary).
+ *
+ *
+ * @author Arun Yadav, Sun Microsytems
+ * @author Gopal Sharma, Sun Microsystems
+ * @version $Id :
+ * @xsl.usage internal
+ */
+
+final class DOMOutputImpl implements LSOutput {
+
+    private Writer fCharStream = null;
+    private OutputStream fByteStream = null;
+    private String fSystemId = null;
+    private String fEncoding = null;
+
+    /**
+     * Default Constructor
+     */
+    DOMOutputImpl() {}
+
+    /**
+     * An attribute of a language and binding dependent type that represents a
+     * writable stream of bytes. If the application knows the character encoding
+     * of the byte stream, it should set the encoding attribute. Setting the
+     * encoding in this way will override any encoding specified in an XML
+     * declaration in the data.
+     */
+
+    public Writer getCharacterStream(){
+        return fCharStream;
+    };
+
+    /**
+     * An attribute of a language and binding dependent type that represents a
+     * writable stream of bytes. If the application knows the character encoding
+     * of the byte stream, it should set the encoding attribute. Setting the
+     * encoding in this way will override any encoding specified in an XML
+     * declaration in the data.
+     */
+
+    public void setCharacterStream(Writer characterStream){
+        fCharStream = characterStream;
+    };
+
+    /**
+     * Depending on the language binding in use, this attribute may not be
+     * available. An attribute of a language and binding dependent type that
+     * represents a writable stream to which 16-bit units can be output. The
+     * application must encode the stream using UTF-16 (defined in [Unicode] and
+     *  Amendment 1 of [ISO/IEC 10646]).
+     */
+
+    public OutputStream getByteStream(){
+        return fByteStream;
+    };
+
+    /**
+     * Depending on the language binding in use, this attribute may not be
+     * available. An attribute of a language and binding dependent type that
+     * represents a writable stream to which 16-bit units can be output. The
+     * application must encode the stream using UTF-16 (defined in [Unicode] and
+     *  Amendment 1 of [ISO/IEC 10646]).
+     */
+
+    public void setByteStream(OutputStream byteStream){
+        fByteStream = byteStream;
+    };
+
+    /**
+     * The system identifier, a URI reference [IETF RFC 2396], for this output
+     *  destination. If the application knows the character encoding of the
+     *  object pointed to by the system identifier, it can set the encoding
+     *  using the encoding attribute. If the system ID is a relative URI
+     *  reference (see section 5 in [IETF RFC 2396]), the behavior is
+     *  implementation dependent.
+     */
+
+    public String getSystemId(){
+        return fSystemId;
+    };
+
+    /**
+     * The system identifier, a URI reference [IETF RFC 2396], for this output
+     *  destination. If the application knows the character encoding of the
+     *  object pointed to by the system identifier, it can set the encoding
+     *  using the encoding attribute. If the system ID is a relative URI
+     *  reference (see section 5 in [IETF RFC 2396]), the behavior is
+     *  implementation dependent.
+     */
+
+    public void setSystemId(String systemId){
+        fSystemId = systemId;
+    };
+
+    /**
+     * The character encoding, if known. The encoding must be a string
+     * acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3
+     * "Character Encoding in Entities"). This attribute has no effect when the
+     * application provides a character stream or string data. For other sources
+     * of input, an encoding specified by means of this attribute will override
+     * any encoding specified in the XML declaration or the Text declaration, or
+     * an encoding obtained from a higher level protocol, such as HTTP
+     * [IETF RFC 2616].
+     */
+
+    public String getEncoding(){
+        return fEncoding;
+    };
+
+    /**
+     * The character encoding, if known. The encoding must be a string
+     * acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3
+     * "Character Encoding in Entities"). This attribute has no effect when the
+     * application provides a character stream or string data. For other sources
+     * of input, an encoding specified by means of this attribute will override
+     * any encoding specified in the XML declaration or the Text declaration, or
+     * an encoding obtained from a higher level protocol, such as HTTP
+     * [IETF RFC 2616].
+     */
+
+    public void setEncoding(String encoding){
+        fEncoding = encoding;
+    };
+
+}//DOMOutputImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.util.Vector;
+
+//import org.apache.xerces.dom3.DOMStringList;
+import org.w3c.dom.DOMStringList;
+
+/**
+ * This class implemets the DOM Level 3 Core interface DOMStringList.
+ *
+ * @xsl.usage internal
+ */
+final class DOMStringListImpl implements DOMStringList {
+
+    //A collection of DOMString values
+    private Vector fStrings;
+
+    /**
+     * Construct an empty list of DOMStringListImpl
+     */
+    DOMStringListImpl() {
+        fStrings = new Vector();
+    }
+
+    /**
+     * Construct an empty list of DOMStringListImpl
+     */
+    DOMStringListImpl(Vector params) {
+        fStrings = params;
+    }
+
+    /**
+     * Construct an empty list of DOMStringListImpl
+     */
+    DOMStringListImpl(String[] params ) {
+        fStrings = new Vector();
+        if (params != null) {
+            for (int i=0; i < params.length; i++) {
+                fStrings.add(params[i]);
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.xerces.dom3.DOMStringList#item(int)
+     */
+    public String item(int index) {
+        try {
+            return (String) fStrings.elementAt(index);
+        } catch (ArrayIndexOutOfBoundsException e) {
+            return null;
+        }
+    }
+
+    /**
+     * @see org.apache.xerces.dom3.DOMStringList#getLength()
+     */
+    public int getLength() {
+        return fStrings.size();
+    }
+
+    /**
+     * @see org.apache.xerces.dom3.DOMStringList#contains(String)
+     */
+    public boolean contains(String param) {
+        return fStrings.contains(param) ;
+    }
+
+    /**
+     * DOM Internal:
+     * Add a <code>DOMString</code> to the list.
+     *
+     * @param domString A string to add to the list
+     */
+    public void add(String param) {
+        fStrings.add(param);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/LSSerializerImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,1405 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Properties;
+
+import com.sun.org.apache.xml.internal.serializer.DOM3Serializer;
+import com.sun.org.apache.xml.internal.serializer.Encodings;
+import com.sun.org.apache.xml.internal.serializer.Serializer;
+import com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory;
+import com.sun.org.apache.xml.internal.serializer.SerializerFactory;
+import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
+import com.sun.org.apache.xml.internal.serializer.utils.Utils;
+import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMError;
+import org.w3c.dom.DOMErrorHandler;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMStringList;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.ls.LSException;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSSerializer;
+import org.w3c.dom.ls.LSSerializerFilter;
+
+
+/**
+ * Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer and
+ * org.w3c.dom.ls.DOMConfiguration.  Serialization is achieved by delegating
+ * serialization calls to <CODE>org.apache.xml.serializer.ToStream</CODE> or
+ * one of its derived classes depending on the serialization method, while walking
+ * the DOM in DOM3TreeWalker.
+ * @see <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS-LSSerializer">org.w3c.dom.ls.LSSerializer</a>
+ * @see <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#DOMConfiguration">org.w3c.dom.DOMConfiguration</a>
+ *
+ * @version $Id:
+ *
+ * @xsl.usage internal
+ */
+final public class LSSerializerImpl implements DOMConfiguration, LSSerializer {
+
+    /** private data members */
+    private Serializer fXMLSerializer = null;
+
+    // Tracks DOMConfiguration features.
+    protected int fFeatures = 0;
+
+    // Common DOM serializer
+    private  DOM3Serializer fDOMSerializer = null;
+
+    // A filter set on the LSSerializer
+    private LSSerializerFilter fSerializerFilter = null;
+
+    // Stores the nodeArg parameter to speed up multiple writes of the same node.
+    private Node fVisitedNode = null;
+
+    // The end-of-line character sequence used in serialization.  "\n" is whats used on the web.
+    private String fEndOfLine = "\n";
+
+    // The DOMErrorhandler.
+    private DOMErrorHandler fDOMErrorHandler = null;
+
+    // The Configuration parameter to pass to the Underlying serilaizer.
+    private Properties fDOMConfigProperties = null;
+
+    // The encoding to use during serialization.
+    private String fEncoding;
+
+    // ************************************************************************
+    // DOM Level 3 DOM Configuration parameter names
+    // ************************************************************************
+    // Parameter canonical-form, true [optional] - NOT SUPPORTED
+    private final static int CANONICAL = 0x1 << 0;
+
+    // Parameter cdata-sections, true [required] (default)
+    private final static int CDATA = 0x1 << 1;
+
+    // Parameter check-character-normalization, true [optional] - NOT SUPPORTED
+    private final static int CHARNORMALIZE = 0x1 << 2;
+
+    // Parameter comments, true [required] (default)
+    private final static int COMMENTS = 0x1 << 3;
+
+    // Parameter datatype-normalization, true [optional] - NOT SUPPORTED
+    private final static int DTNORMALIZE = 0x1 << 4;
+
+    // Parameter element-content-whitespace, true [required] (default) - value - false [optional] NOT SUPPORTED
+    private final static int ELEM_CONTENT_WHITESPACE = 0x1 << 5;
+
+    // Parameter entities, true [required] (default)
+    private final static int ENTITIES = 0x1 << 6;
+
+    // Parameter infoset, true [required] (default), false has no effect --> True has no effect for the serializer
+    private final static int INFOSET = 0x1 << 7;
+
+    // Parameter namespaces, true [required] (default)
+    private final static int NAMESPACES = 0x1 << 8;
+
+    // Parameter namespace-declarations, true [required] (default)
+    private final static int NAMESPACEDECLS = 0x1 << 9;
+
+    // Parameter normalize-characters, true [optional] - NOT SUPPORTED
+    private final static int NORMALIZECHARS = 0x1 << 10;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int SPLITCDATA = 0x1 << 11;
+
+    // Parameter validate, true [optional] - NOT SUPPORTED
+    private final static int VALIDATE = 0x1 << 12;
+
+    // Parameter validate-if-schema, true [optional] - NOT SUPPORTED
+    private final static int SCHEMAVALIDATE = 0x1 << 13;
+
+    // Parameter split-cdata-sections, true [required] (default)
+    private final static int WELLFORMED = 0x1 << 14;
+
+    // Parameter discard-default-content, true [required] (default)
+    // Not sure how this will be used in level 2 Documents
+    private final static int DISCARDDEFAULT = 0x1 << 15;
+
+    // Parameter format-pretty-print, true [optional]
+    private final static int PRETTY_PRINT = 0x1 << 16;
+
+    // Parameter ignore-unknown-character-denormalizations, true [required] (default)
+    // We currently do not support XML 1.1 character normalization
+    private final static int IGNORE_CHAR_DENORMALIZE = 0x1 << 17;
+
+    // Parameter discard-default-content, true [required] (default)
+    private final static int XMLDECL = 0x1 << 18;
+    // ************************************************************************
+
+    // Recognized parameters for which atleast one value can be set
+    private String fRecognizedParameters [] = {
+            DOMConstants.DOM_CANONICAL_FORM,
+            DOMConstants.DOM_CDATA_SECTIONS,
+            DOMConstants.DOM_CHECK_CHAR_NORMALIZATION,
+            DOMConstants.DOM_COMMENTS,
+            DOMConstants.DOM_DATATYPE_NORMALIZATION,
+            DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+            DOMConstants.DOM_ENTITIES,
+            DOMConstants.DOM_INFOSET,
+            DOMConstants.DOM_NAMESPACES,
+            DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+            //DOMConstants.DOM_NORMALIZE_CHARACTERS,
+            DOMConstants.DOM_SPLIT_CDATA,
+            DOMConstants.DOM_VALIDATE,
+            DOMConstants.DOM_VALIDATE_IF_SCHEMA,
+            DOMConstants.DOM_WELLFORMED,
+            DOMConstants.DOM_DISCARD_DEFAULT_CONTENT,
+            DOMConstants.DOM_FORMAT_PRETTY_PRINT,
+            DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS,
+            DOMConstants.DOM_XMLDECL,
+            DOMConstants.DOM_ERROR_HANDLER
+    };
+
+
+    /**
+     * Constructor:  Creates a LSSerializerImpl object.  The underlying
+     * XML 1.0 or XML 1.1 org.apache.xml.serializer.Serializer object is
+     * created and initialized the first time any of the write methods are
+     * invoked to serialize the Node.  Subsequent write methods on the same
+     * LSSerializerImpl object will use the previously created Serializer object.
+     */
+    public LSSerializerImpl () {
+        // set default parameters
+        fFeatures |= CDATA;
+        fFeatures |= COMMENTS;
+        fFeatures |= ELEM_CONTENT_WHITESPACE;
+        fFeatures |= ENTITIES;
+        fFeatures |= NAMESPACES;
+        fFeatures |= NAMESPACEDECLS;
+        fFeatures |= SPLITCDATA;
+        fFeatures |= WELLFORMED;
+        fFeatures |= DISCARDDEFAULT;
+        fFeatures |= XMLDECL;
+
+        // New OutputFormat properties
+        fDOMConfigProperties = new Properties();
+
+        // Initialize properties to be passed on the underlying serializer
+        initializeSerializerProps();
+
+        // Read output_xml.properties and System Properties to initialize properties
+        Properties  configProps = OutputPropertiesFactory.getDefaultMethodProperties("xml");
+
+        // change xml version from 1.0 to 1.1
+        //configProps.setProperty("version", "1.1");
+
+        // Get a serializer that seriailizes according to the properties,
+        // which in this case is to xml
+        fXMLSerializer = SerializerFactory.getSerializer(configProps);
+
+        // Initialize Serializer
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+    }
+
+    /**
+     * Initializes the underlying serializer's configuration depending on the
+     * default DOMConfiguration parameters. This method must be called before a
+     * node is to be serialized.
+     *
+     * @xsl.usage internal
+     */
+    public void initializeSerializerProps () {
+        // canonical-form
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // cdata-sections
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // "check-character-normalization"
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_CHECK_CHAR_NORMALIZATION,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // comments
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // datatype-normalization
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_DATATYPE_NORMALIZATION,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // element-content-whitespace
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+                DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // entities
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_TRUE);
+        // preserve entities
+        fDOMConfigProperties.setProperty(
+                OutputPropertiesFactory.S_KEY_ENTITIES, DOMConstants.S_XSL_VALUE_ENTITIES);
+
+        // error-handler
+        // Should we set our default ErrorHandler
+        /*
+         * if (fDOMConfig.getParameter(Constants.DOM_ERROR_HANDLER) != null) {
+         * fDOMErrorHandler =
+         * (DOMErrorHandler)fDOMConfig.getParameter(Constants.DOM_ERROR_HANDLER); }
+         */
+
+        // infoset
+        if ((fFeatures & INFOSET) != 0) {
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+                    DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE,
+                    DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_DEFAULT_TRUE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_FALSE);
+            // preserve entities
+            fDOMConfigProperties.setProperty(
+                    OutputPropertiesFactory.S_KEY_ENTITIES, "");
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_CDATA_SECTIONS,
+                    DOMConstants.DOM3_DEFAULT_FALSE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_VALIDATE_IF_SCHEMA,
+                    DOMConstants.DOM3_DEFAULT_FALSE);
+            fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                    + DOMConstants.DOM_DATATYPE_NORMALIZATION,
+                    DOMConstants.DOM3_DEFAULT_FALSE);
+        }
+
+        // namespaces
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // namespace-declarations
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NAMESPACE_DECLARATIONS,
+                DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // normalize-characters
+        /*
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_NORMALIZE_CHARACTERS,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+        */
+
+        // split-cdata-sections
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // validate
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_VALIDATE, DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // validate-if-schema
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_VALIDATE_IF_SCHEMA,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+
+        // well-formed
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // pretty-print
+        fDOMConfigProperties.setProperty(
+                DOMConstants.S_XSL_OUTPUT_INDENT,
+                DOMConstants.DOM3_DEFAULT_FALSE);
+        fDOMConfigProperties.setProperty(
+                OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, Integer.toString(4));
+
+        //
+
+        // discard-default-content
+        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT,
+                DOMConstants.DOM3_DEFAULT_TRUE);
+
+        // xml-declaration
+        fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "no");
+
+    }
+
+    // ************************************************************************
+    // DOMConfiguraiton implementation
+    // ************************************************************************
+
+    /**
+     * Checks if setting a parameter to a specific value is supported.
+     *
+     * @see org.w3c.dom.DOMConfiguration#canSetParameter(java.lang.String, java.lang.Object)
+     * @since DOM Level 3
+     * @param name A String containing the DOMConfiguration parameter name.
+     * @param value An Object specifying the value of the corresponding parameter.
+     */
+    public boolean canSetParameter(String name, Object value) {
+        if (value instanceof Boolean){
+            if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)){
+                // both values supported
+                return true;
+            }
+            else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)
+                    // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                    ) {
+                // true is not supported
+                return !((Boolean)value).booleanValue();
+            }
+            else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
+                // false is not supported
+                return ((Boolean)value).booleanValue();
+            }
+        }
+        else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER) &&
+                value == null || value instanceof DOMErrorHandler){
+            return true;
+        }
+        return false;
+    }
+    /**
+     * This method returns the value of a parameter if known.
+     *
+     * @see org.w3c.dom.DOMConfiguration#getParameter(java.lang.String)
+     *
+     * @param name A String containing the DOMConfiguration parameter name
+     *             whose value is to be returned.
+     * @return Object The value of the parameter if known.
+     */
+    public Object getParameter(String name) throws DOMException {
+
+        if(name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)){
+                      return null;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) {
+            return ((fFeatures & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) {
+            return ((fFeatures & CDATA) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)) {
+            return ((fFeatures & ENTITIES) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)) {
+            return ((fFeatures & NAMESPACES) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)) {
+            return ((fFeatures & NAMESPACEDECLS) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)) {
+            return ((fFeatures & SPLITCDATA) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)) {
+            return ((fFeatures & WELLFORMED) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        }  else if (name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)) {
+            return ((fFeatures & DISCARDDEFAULT) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) {
+            return ((fFeatures & PRETTY_PRINT) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)) {
+            return ((fFeatures & XMLDECL) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
+            return ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
+            return Boolean.TRUE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)
+                || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION)
+                || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)
+                // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)
+                || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) {
+            return Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)){
+            if ((fFeatures & ENTITIES) == 0 &&
+                    (fFeatures & CDATA) == 0 &&
+                    (fFeatures & ELEM_CONTENT_WHITESPACE) != 0 &&
+                    (fFeatures & NAMESPACES) != 0 &&
+                    (fFeatures & NAMESPACEDECLS) != 0 &&
+                    (fFeatures & WELLFORMED) != 0 &&
+                    (fFeatures & COMMENTS) != 0) {
+                return Boolean.TRUE;
+            }
+            return Boolean.FALSE;
+        } else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER)) {
+            return fDOMErrorHandler;
+        } else if (
+                name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION)
+                || name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)) {
+            return null;
+        } else {
+            // Here we have to add the Xalan specific DOM Message Formatter
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_FOUND,
+                    new Object[] { name });
+            throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+        }
+    }
+
+    /**
+     * This method returns a of the parameters supported by this DOMConfiguration object
+     * and for which at least one value can be set by the application
+     *
+     * @see org.w3c.dom.DOMConfiguration#getParameterNames()
+     *
+     * @return DOMStringList A list of DOMConfiguration parameters recognized
+     *                       by the serializer
+     */
+    public DOMStringList getParameterNames() {
+        return new DOMStringListImpl(fRecognizedParameters);
+    }
+
+    /**
+     * This method sets the value of the named parameter.
+     *
+     * @see org.w3c.dom.DOMConfiguration#setParameter(java.lang.String, java.lang.Object)
+     *
+     * @param name A String containing the DOMConfiguration parameter name.
+     * @param value An Object contaiing the parameters value to set.
+     */
+    public void setParameter(String name, Object value) throws DOMException {
+        // If the value is a boolean
+        if (value instanceof Boolean) {
+            boolean state = ((Boolean) value).booleanValue();
+
+            if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) {
+                fFeatures = state ? fFeatures | COMMENTS : fFeatures
+                        & ~COMMENTS;
+                // comments
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) {
+                fFeatures =  state ? fFeatures | CDATA : fFeatures
+                        & ~CDATA;
+                // cdata-sections
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)) {
+                fFeatures = state ? fFeatures | ENTITIES : fFeatures
+                        & ~ENTITIES;
+                // entities
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_TRUE);
+                    fDOMConfigProperties.setProperty(
+                            OutputPropertiesFactory.S_KEY_ENTITIES, DOMConstants.S_XSL_VALUE_ENTITIES);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)) {
+                fFeatures = state ? fFeatures | NAMESPACES : fFeatures
+                        & ~NAMESPACES;
+                // namespaces
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name
+                    .equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)) {
+                fFeatures = state ? fFeatures | NAMESPACEDECLS
+                        : fFeatures & ~NAMESPACEDECLS;
+                // namespace-declarations
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)) {
+                fFeatures = state ? fFeatures | SPLITCDATA : fFeatures
+                        & ~SPLITCDATA;
+                // split-cdata-sections
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)) {
+                fFeatures = state ? fFeatures | WELLFORMED : fFeatures
+                        & ~WELLFORMED;
+                // well-formed
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name
+                    .equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)) {
+                fFeatures = state ? fFeatures | DISCARDDEFAULT
+                        : fFeatures & ~DISCARDDEFAULT;
+                // discard-default-content
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) {
+                fFeatures = state ? fFeatures | PRETTY_PRINT : fFeatures
+                        & ~PRETTY_PRINT;
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_INDENT,DOMConstants.DOM3_EXPLICIT_TRUE);
+                    fDOMConfigProperties.setProperty(OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, Integer.toString(4));
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_INDENT,DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)) {
+                fFeatures = state ? fFeatures | XMLDECL : fFeatures
+                        & ~XMLDECL;
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "no");
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "yes");
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
+                fFeatures = state ? fFeatures | ELEM_CONTENT_WHITESPACE : fFeatures
+                        & ~ELEM_CONTENT_WHITESPACE;
+                // element-content-whitespace
+                if (state) {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_TRUE);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_FALSE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
+                // false is not supported
+                if (!state) {
+                    // Here we have to add the Xalan specific DOM Message Formatter
+                    String msg = Utils.messages.createMessage(
+                            MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                            new Object[] { name });
+                    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+                } else {
+                    fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                            + DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION)
+                    || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)
+                    // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                    ) {
+                // true is not supported
+                if (state) {
+                    String msg = Utils.messages.createMessage(
+                            MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                            new Object[] { name });
+                    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+                } else {
+                    if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_VALIDATE_IF_SCHEMA, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_VALIDATE, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION
+                                + DOMConstants.DOM_CHECK_CHAR_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } else if (name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_DATATYPE_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } /* else if (name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)) {
+                        fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                                + DOMConstants.DOM_NORMALIZE_CHARACTERS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                    } */
+                }
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)) {
+                if (state) {
+                    fFeatures &= ~ENTITIES;
+                    fFeatures &= ~CDATA;
+                    fFeatures &= ~SCHEMAVALIDATE;
+                    fFeatures &= ~DTNORMALIZE;
+                    fFeatures |= NAMESPACES;
+                    fFeatures |= NAMESPACEDECLS;
+                    fFeatures |= WELLFORMED;
+                    fFeatures |= ELEM_CONTENT_WHITESPACE;
+                    fFeatures |= COMMENTS;
+                }
+
+                // infoset
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_TRUE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_TRUE);
+
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE);
+                fDOMConfigProperties.setProperty(
+                        OutputPropertiesFactory.S_KEY_ENTITIES, "");
+
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_FALSE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_VALIDATE_IF_SCHEMA, DOMConstants.DOM3_EXPLICIT_FALSE);
+                fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+                        + DOMConstants.DOM_DATATYPE_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE);
+            } else if (name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)) {
+                String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                    new Object[] { name });
+                throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+            } else {
+                // Setting this to false has no effect
+            }
+        } // If the parameter value is not a boolean
+        else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER)) {
+            if (value == null || value instanceof DOMErrorHandler) {
+                fDOMErrorHandler = (DOMErrorHandler)value;
+            } else {
+                String msg = Utils.messages.createMessage(
+                        MsgKey.ER_TYPE_MISMATCH_ERR,
+                        new Object[] { name });
+                throw new DOMException(DOMException.TYPE_MISMATCH_ERR, msg);
+            }
+        } else if (
+                name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION)
+                || name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)
+                || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)
+                && value != null) {
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_SUPPORTED,
+                    new Object[] { name });
+            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+        } else {
+            String msg = Utils.messages.createMessage(
+                    MsgKey.ER_FEATURE_NOT_FOUND,
+                    new Object[] { name });
+            throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+        }
+    }
+    // ************************************************************************
+
+
+    // ************************************************************************
+    // DOMConfiguraiton implementation
+    // ************************************************************************
+
+    /**
+     * Returns the DOMConfiguration of the LSSerializer.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#getDomConfig()
+     * @since DOM Level 3
+     * @return A DOMConfiguration object.
+     */
+    public DOMConfiguration getDomConfig() {
+        return (DOMConfiguration)this;
+    }
+
+    /**
+     * Returns the DOMConfiguration of the LSSerializer.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#getFilter()
+     * @since DOM Level 3
+     * @return A LSSerializerFilter object.
+     */
+    public LSSerializerFilter getFilter() {
+        return fSerializerFilter;
+    }
+
+    /**
+     * Returns the End-Of-Line sequence of characters to be used in the XML
+     * being serialized.  If none is set a default "\n" is returned.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#getNewLine()
+     * @since DOM Level 3
+     * @return A String containing the end-of-line character sequence  used in
+     * serialization.
+     */
+    public String getNewLine() {
+        return fEndOfLine;
+    }
+
+    /**
+     * Set a LSSerilizerFilter on the LSSerializer.  When set, the filter is
+     * called before each node is serialized which depending on its implemention
+     * determines if the node is to be serialized or not.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#setFilter
+     * @since DOM Level 3
+     * @param filter A LSSerializerFilter to be applied to the stream to serialize.
+     */
+    public void setFilter(LSSerializerFilter filter) {
+        fSerializerFilter = filter;
+    }
+
+    /**
+     * Sets the End-Of-Line sequence of characters to be used in the XML
+     * being serialized.  Setting this attribute to null will reset its
+     * value to the default value i.e. "\n".
+     *
+     * @see org.w3c.dom.ls.LSSerializer#setNewLine
+     * @since DOM Level 3
+     * @param newLine a String that is the end-of-line character sequence to be used in
+     * serialization.
+     */
+    public void setNewLine(String newLine) {
+        fEndOfLine = newLine !=null? newLine: fEndOfLine;
+    }
+
+    /**
+     * Serializes the specified node to the specified LSOutput and returns true if the Node
+     * was successfully serialized.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput)
+     * @since DOM Level 3
+     * @param nodeArg The Node to serialize.
+     * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
+     * LSSerializer was unable to serialize the node.
+     *
+     */
+    public boolean write(Node nodeArg, LSOutput destination) throws LSException {
+        // If the destination is null
+        if (destination == null) {
+            String msg = Utils.messages
+            .createMessage(
+                    MsgKey.ER_NO_OUTPUT_SPECIFIED,
+                    null);
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, msg,
+                        MsgKey.ER_NO_OUTPUT_SPECIFIED));
+            }
+            throw new LSException(LSException.SERIALIZE_ERR, msg);
+        }
+
+        // If nodeArg is null, return false.  Should we throw and LSException instead?
+        if (nodeArg == null ) {
+            return false;
+        }
+
+        // Obtain a reference to the serializer to use
+        // Serializer serializer = getXMLSerializer(xmlVersion);
+        Serializer serializer = fXMLSerializer;
+        serializer.reset();
+
+        // If the node has not been seen
+        if ( nodeArg != fVisitedNode) {
+            // Determine the XML Document version of the Node
+            String xmlVersion = getXMLVersion(nodeArg);
+
+            // Determine the encoding: 1.LSOutput.encoding, 2.Document.inputEncoding, 3.Document.xmlEncoding.
+            fEncoding = destination.getEncoding();
+            if (fEncoding == null ) {
+                fEncoding = getInputEncoding(nodeArg);
+                fEncoding = fEncoding != null ? fEncoding : getXMLEncoding(nodeArg) == null? "UTF-8": getXMLEncoding(nodeArg);
+            }
+
+            // If the encoding is not recognized throw an exception.
+            // Note: The serializer defaults to UTF-8 when created
+            if (!Encodings.isRecognizedEncoding(fEncoding)) {
+                String msg = Utils.messages
+                .createMessage(
+                        MsgKey.ER_UNSUPPORTED_ENCODING,
+                        null);
+                if (fDOMErrorHandler != null) {
+                    fDOMErrorHandler.handleError(new DOMErrorImpl(
+                            DOMError.SEVERITY_FATAL_ERROR, msg,
+                            MsgKey.ER_UNSUPPORTED_ENCODING));
+                }
+                throw new LSException(LSException.SERIALIZE_ERR, msg);
+            }
+
+            serializer.getOutputFormat().setProperty("version", xmlVersion);
+
+            // Set the output encoding and xml version properties
+            fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion);
+            fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, fEncoding);
+
+            // If the node to be serialized is not a Document, Element, or Entity
+            // node
+            // then the XML declaration, or text declaration, should be never be
+            // serialized.
+            if ( (nodeArg.getNodeType() != Node.DOCUMENT_NODE
+                    || nodeArg.getNodeType() != Node.ELEMENT_NODE
+                    || nodeArg.getNodeType() != Node.ENTITY_NODE)
+                    && ((fFeatures & XMLDECL) != 0)) {
+                fDOMConfigProperties.setProperty(
+                        DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL,
+                        DOMConstants.DOM3_DEFAULT_FALSE);
+            }
+
+            fVisitedNode = nodeArg;
+        }
+
+        // Update the serializer properties
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+
+        //
+        try {
+
+            // The LSSerializer will use the LSOutput object to determine
+            // where to serialize the output to in the following order the
+            // first one that is not null and not an empty string will be
+            // used: 1.LSOutput.characterStream, 2.LSOutput.byteStream,
+            // 3. LSOutput.systemId
+            // 1.LSOutput.characterStream
+            Writer writer = destination.getCharacterStream();
+            if (writer == null ) {
+
+                // 2.LSOutput.byteStream
+                OutputStream outputStream = destination.getByteStream();
+                if ( outputStream == null) {
+
+                    // 3. LSOutput.systemId
+                    String uri = destination.getSystemId();
+                    if (uri == null) {
+                        String msg = Utils.messages
+                        .createMessage(
+                                MsgKey.ER_NO_OUTPUT_SPECIFIED,
+                                null);
+                        if (fDOMErrorHandler != null) {
+                            fDOMErrorHandler.handleError(new DOMErrorImpl(
+                                    DOMError.SEVERITY_FATAL_ERROR, msg,
+                                    MsgKey.ER_NO_OUTPUT_SPECIFIED));
+                        }
+                        throw new LSException(LSException.SERIALIZE_ERR, msg);
+
+                    } else {
+                        // Expand the System Id and obtain an absolute URI for it.
+                        String absoluteURI = SystemIDResolver.getAbsoluteURI(uri);
+
+                        URL url = new URL(absoluteURI);
+                        OutputStream urlOutStream = null;
+                        String protocol = url.getProtocol();
+                        String host = url.getHost();
+
+                        // For file protocols, there is no need to use a URL to get its
+                        // corresponding OutputStream
+
+                        // Scheme names consist of a sequence of characters. The lower case
+                        // letters "a"--"z", digits, and the characters plus ("+"), period
+                        // ("."), and hyphen ("-") are allowed. For resiliency, programs
+                        // interpreting URLs should treat upper case letters as equivalent to
+                        // lower case in scheme names (e.g., allow "HTTP" as well as "http").
+                        if (protocol.equalsIgnoreCase("file")
+                                && (host == null || host.length() == 0 || host.equals("localhost"))) {
+                            // do we also need to check for host.equals(hostname)
+                            urlOutStream = new FileOutputStream(new File(url.getPath()));
+
+                        } else {
+                            // This should support URL's whose schemes are mentioned in
+                            // RFC1738 other than file
+
+                            URLConnection urlCon = url.openConnection();
+                            urlCon.setDoInput(false);
+                            urlCon.setDoOutput(true);
+                            urlCon.setUseCaches(false);
+                            urlCon.setAllowUserInteraction(false);
+
+                            // When writing to a HTTP URI, a HTTP PUT is performed.
+                            if (urlCon instanceof HttpURLConnection) {
+                                HttpURLConnection httpCon = (HttpURLConnection) urlCon;
+                                httpCon.setRequestMethod("PUT");
+                            }
+                            urlOutStream = urlCon.getOutputStream();
+                        }
+                        // set the OutputStream to that obtained from the systemId
+                        serializer.setWriter(new OutputStreamWriter(urlOutStream));
+                    }
+                } else {
+                    // 2.LSOutput.byteStream
+                    serializer.setWriter(new OutputStreamWriter(outputStream, fEncoding));
+                }
+            } else {
+                // 1.LSOutput.characterStream
+                serializer.setWriter(writer);
+            }
+
+            // The associated media type by default is set to text/xml on
+            // org.apache.xml.serializer.SerializerBase.
+
+            // Get a reference to the serializer then lets you serilize a DOM
+            // Use this hack till Xalan support JAXP1.3
+            if (fDOMSerializer == null) {
+               fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer();
+            }
+
+            // Set the error handler on the DOM3Serializer interface implementation
+            if (fDOMErrorHandler != null) {
+                fDOMSerializer.setErrorHandler(fDOMErrorHandler);
+            }
+
+            // Set the filter on the DOM3Serializer interface implementation
+            if (fSerializerFilter != null) {
+                fDOMSerializer.setNodeFilter(fSerializerFilter);
+            }
+
+            // Set the NewLine character to be used
+            fDOMSerializer.setNewLine(fEndOfLine);
+
+            // Serializer your DOM, where node is an org.w3c.dom.Node
+            // Assuming that Xalan's serializer can serialize any type of DOM node
+            fDOMSerializer.serializeDOM3(nodeArg);
+
+        } catch( UnsupportedEncodingException ue) {
+
+            String msg = Utils.messages
+            .createMessage(
+                    MsgKey.ER_UNSUPPORTED_ENCODING,
+                    null);
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, msg,
+                        MsgKey.ER_UNSUPPORTED_ENCODING, ue));
+            }
+            throw new LSException(LSException.SERIALIZE_ERR, ue.getMessage());
+        } catch (LSException lse) {
+            // Rethrow LSException.
+            throw lse;
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e!=null?e.getMessage():"NULL Exception") ;
+        }  catch (Exception e) {
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, e.getMessage(),
+                        null, e));
+            }
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }
+        return true;
+    }
+
+    /**
+     * Serializes the specified node and returns a String with the serialized
+     * data to the caller.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#writeToString(org.w3c.dom.Node)
+     * @since DOM Level 3
+     * @param nodeArg The Node to serialize.
+     * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
+     * LSSerializer was unable to serialize the node.
+     *
+     */
+    public String writeToString(Node nodeArg) throws DOMException, LSException {
+        // return null is nodeArg is null.  Should an Exception be thrown instead?
+        if (nodeArg == null) {
+            return null;
+        }
+
+        // Should we reset the serializer configuration before each write operation?
+        // Obtain a reference to the serializer to use
+        Serializer serializer = fXMLSerializer;
+        serializer.reset();
+
+        if (nodeArg != fVisitedNode){
+            // Determine the XML Document version of the Node
+            String xmlVersion = getXMLVersion(nodeArg);
+
+            serializer.getOutputFormat().setProperty("version", xmlVersion);
+
+            // Set the output encoding and xml version properties
+            fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion);
+            fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, "UTF-16");
+
+            // If the node to be serialized is not a Document, Element, or Entity
+            // node
+            // then the XML declaration, or text declaration, should be never be
+            // serialized.
+            if  ((nodeArg.getNodeType() != Node.DOCUMENT_NODE
+                    || nodeArg.getNodeType() != Node.ELEMENT_NODE
+                    || nodeArg.getNodeType() != Node.ENTITY_NODE)
+                    && ((fFeatures & XMLDECL) != 0)) {
+                fDOMConfigProperties.setProperty(
+                        DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL,
+                        DOMConstants.DOM3_DEFAULT_FALSE);
+            }
+
+            fVisitedNode = nodeArg;
+        }
+        // Update the serializer properties
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+
+        // StringWriter to Output to
+        StringWriter output = new StringWriter();
+
+        //
+        try {
+
+            // Set the Serializer's Writer to a StringWriter
+            serializer.setWriter(output);
+
+            // Get a reference to the serializer then lets you serilize a DOM
+            // Use this hack till Xalan support JAXP1.3
+            if (fDOMSerializer == null) {
+                fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer();
+            }
+
+            // Set the error handler on the DOM3Serializer interface implementation
+            if (fDOMErrorHandler != null) {
+                fDOMSerializer.setErrorHandler(fDOMErrorHandler);
+            }
+
+            // Set the filter on the DOM3Serializer interface implementation
+            if (fSerializerFilter != null) {
+                fDOMSerializer.setNodeFilter(fSerializerFilter);
+            }
+
+            // Set the NewLine character to be used
+            fDOMSerializer.setNewLine(fEndOfLine);
+
+            // Serializer your DOM, where node is an org.w3c.dom.Node
+            fDOMSerializer.serializeDOM3(nodeArg);
+        } catch (LSException lse) {
+            // Rethrow LSException.
+            throw lse;
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }  catch (Exception e) {
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, e.getMessage(),
+                        null, e));
+            }
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }
+
+        // return the serialized string
+        return output.toString();
+    }
+
+    /**
+     * Serializes the specified node to the specified URI and returns true if the Node
+     * was successfully serialized.
+     *
+     * @see org.w3c.dom.ls.LSSerializer#writeToURI(org.w3c.dom.Node, String)
+     * @since DOM Level 3
+     * @param nodeArg The Node to serialize.
+     * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
+     * LSSerializer was unable to serialize the node.
+     *
+     */
+    public boolean writeToURI(Node nodeArg, String uri) throws LSException {
+        // If nodeArg is null, return false.  Should we throw and LSException instead?
+        if (nodeArg == null ) {
+            return false;
+        }
+
+        // Obtain a reference to the serializer to use
+        Serializer serializer = fXMLSerializer;
+        serializer.reset();
+
+        if (nodeArg != fVisitedNode) {
+            // Determine the XML Document version of the Node
+            String xmlVersion = getXMLVersion(nodeArg);
+
+            // Determine the encoding: 1.LSOutput.encoding,
+            // 2.Document.inputEncoding, 3.Document.xmlEncoding.
+            fEncoding = getInputEncoding(nodeArg);
+            if (fEncoding == null ) {
+                fEncoding = fEncoding != null ? fEncoding : getXMLEncoding(nodeArg) == null? "UTF-8": getXMLEncoding(nodeArg);
+            }
+
+            serializer.getOutputFormat().setProperty("version", xmlVersion);
+
+            // Set the output encoding and xml version properties
+            fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion);
+            fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, fEncoding);
+
+            // If the node to be serialized is not a Document, Element, or Entity
+            // node
+            // then the XML declaration, or text declaration, should be never be
+            // serialized.
+            if ( (nodeArg.getNodeType() != Node.DOCUMENT_NODE
+                    || nodeArg.getNodeType() != Node.ELEMENT_NODE
+                    || nodeArg.getNodeType() != Node.ENTITY_NODE)
+                    && ((fFeatures & XMLDECL) != 0))  {
+                fDOMConfigProperties.setProperty(
+                        DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL,
+                        DOMConstants.DOM3_DEFAULT_FALSE);
+            }
+
+            fVisitedNode = nodeArg;
+        }
+
+        // Update the serializer properties
+        fXMLSerializer.setOutputFormat(fDOMConfigProperties);
+
+        //
+        try {
+            // If the specified encoding is not supported an
+            // "unsupported-encoding" fatal error is raised. ??
+            if (uri == null) {
+                String msg = Utils.messages.createMessage(
+                        MsgKey.ER_NO_OUTPUT_SPECIFIED, null);
+                if (fDOMErrorHandler != null) {
+                    fDOMErrorHandler.handleError(new DOMErrorImpl(
+                            DOMError.SEVERITY_FATAL_ERROR, msg,
+                            MsgKey.ER_NO_OUTPUT_SPECIFIED));
+                }
+                throw new LSException(LSException.SERIALIZE_ERR, msg);
+
+            } else {
+                // REVISIT: Can this be used to get an absolute expanded URI
+                String absoluteURI = SystemIDResolver.getAbsoluteURI(uri);
+
+                URL url = new URL(absoluteURI);
+                OutputStream urlOutStream = null;
+                String protocol = url.getProtocol();
+                String host = url.getHost();
+
+                // For file protocols, there is no need to use a URL to get its
+                // corresponding OutputStream
+
+                // Scheme names consist of a sequence of characters. The lower
+                // case letters "a"--"z", digits, and the characters plus ("+"),
+                // period ("."), and hyphen ("-") are allowed. For resiliency,
+                // programs interpreting URLs should treat upper case letters as
+                // equivalent to lower case in scheme names
+                // (e.g., allow "HTTP" as well as "http").
+                if (protocol.equalsIgnoreCase("file")
+                        && (host == null || host.length() == 0 || host
+                                .equals("localhost"))) {
+                    // do we also need to check for host.equals(hostname)
+                    urlOutStream = new FileOutputStream(new File(url.getPath()));
+
+                } else {
+                    // This should support URL's whose schemes are mentioned in
+                    // RFC1738 other than file
+
+                    URLConnection urlCon = url.openConnection();
+                    urlCon.setDoInput(false);
+                    urlCon.setDoOutput(true);
+                    urlCon.setUseCaches(false);
+                    urlCon.setAllowUserInteraction(false);
+
+                    // When writing to a HTTP URI, a HTTP PUT is performed.
+                    if (urlCon instanceof HttpURLConnection) {
+                        HttpURLConnection httpCon = (HttpURLConnection) urlCon;
+                        httpCon.setRequestMethod("PUT");
+                    }
+                    urlOutStream = urlCon.getOutputStream();
+                }
+                // set the OutputStream to that obtained from the systemId
+                serializer.setWriter(new OutputStreamWriter(urlOutStream, fEncoding));
+            }
+
+            // Get a reference to the serializer then lets you serilize a DOM
+            // Use this hack till Xalan support JAXP1.3
+            if (fDOMSerializer == null) {
+                fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer();
+            }
+
+            // Set the error handler on the DOM3Serializer interface implementation
+            if (fDOMErrorHandler != null) {
+                fDOMSerializer.setErrorHandler(fDOMErrorHandler);
+            }
+
+            // Set the filter on the DOM3Serializer interface implementation
+            if (fSerializerFilter != null) {
+                fDOMSerializer.setNodeFilter(fSerializerFilter);
+            }
+
+            // Set the NewLine character to be used
+            fDOMSerializer.setNewLine(fEndOfLine);
+
+            // Serializer your DOM, where node is an org.w3c.dom.Node
+            // Assuming that Xalan's serializer can serialize any type of DOM
+            // node
+            fDOMSerializer.serializeDOM3(nodeArg);
+
+        } catch (LSException lse) {
+            // Rethrow LSException.
+            throw lse;
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }  catch (Exception e) {
+            if (fDOMErrorHandler != null) {
+                fDOMErrorHandler.handleError(new DOMErrorImpl(
+                        DOMError.SEVERITY_FATAL_ERROR, e.getMessage(),
+                        null, e));
+            }
+            e.printStackTrace();
+            throw new LSException(LSException.SERIALIZE_ERR, e.toString());
+        }
+
+        return true;
+    }
+    // ************************************************************************
+
+
+    // ************************************************************************
+    // Implementaion methods
+    // ************************************************************************
+
+    /**
+     * Determines the XML Version of the Document Node to serialize.  If the Document Node
+     * is not a DOM Level 3 Node, then the default version returned is 1.0.
+     *
+     * @param  nodeArg The Node to serialize
+     * @return A String containing the version pseudo-attribute of the XMLDecl.
+     * @throws Throwable if the DOM implementation does not implement Document.getXmlVersion()
+     */
+    //protected String getXMLVersion(Node nodeArg) throws Throwable {
+    protected String getXMLVersion(Node nodeArg) {
+        Document doc = null;
+
+        // Determine the XML Version of the document
+        if (nodeArg != null) {
+            if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
+                // The Document node is the Node argument
+                doc = (Document)nodeArg;
+            } else {
+                // The Document node is the Node argument's ownerDocument
+                doc = nodeArg.getOwnerDocument();
+            }
+
+            // Determine the DOM Version.
+            if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) {
+                try {
+                    return doc.getXmlVersion();
+                } catch (AbstractMethodError e) {
+                    //ignore, impl does not support the method
+                }
+            }
+        }
+        // The version will be treated as "1.0" which may result in
+        // an ill-formed document being serialized.
+        // If nodeArg does not have an ownerDocument, treat this as XML 1.0
+        return "1.0";
+    }
+
+    /**
+     * Determines the XML Encoding of the Document Node to serialize.  If the Document Node
+     * is not a DOM Level 3 Node, then the default encoding "UTF-8" is returned.
+     *
+     * @param  nodeArg The Node to serialize
+     * @return A String containing the encoding pseudo-attribute of the XMLDecl.
+     * @throws Throwable if the DOM implementation does not implement Document.getXmlEncoding()
+     */
+    protected String getXMLEncoding(Node nodeArg) {
+        Document doc = null;
+
+        // Determine the XML Encoding of the document
+        if (nodeArg != null) {
+            if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
+                // The Document node is the Node argument
+                doc = (Document)nodeArg;
+            } else {
+                // The Document node is the Node argument's ownerDocument
+                doc = nodeArg.getOwnerDocument();
+            }
+
+            // Determine the XML Version.
+            if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) {
+                return doc.getXmlEncoding();
+            }
+        }
+        // The default encoding is UTF-8 except for the writeToString method
+        return "UTF-8";
+    }
+
+    /**
+     * Determines the Input Encoding of the Document Node to serialize.  If the Document Node
+     * is not a DOM Level 3 Node, then null is returned.
+     *
+     * @param  nodeArg The Node to serialize
+     * @return A String containing the input encoding.
+     */
+    protected String getInputEncoding(Node nodeArg)  {
+        Document doc = null;
+
+        // Determine the Input Encoding of the document
+        if (nodeArg != null) {
+            if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
+                // The Document node is the Node argument
+                doc = (Document)nodeArg;
+            } else {
+                // The Document node is the Node argument's ownerDocument
+                doc = nodeArg.getOwnerDocument();
+            }
+
+            // Determine the DOM Version.
+            if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) {
+                return doc.getInputEncoding();
+            }
+        }
+        // The default encoding returned is null
+        return null;
+    }
+
+    /**
+     * This method returns the LSSerializer's error handler.
+     *
+     * @return Returns the fDOMErrorHandler.
+     */
+    public DOMErrorHandler getErrorHandler() {
+        return fDOMErrorHandler;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,315 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id:  $
+ */
+
+package com.sun.org.apache.xml.internal.serializer.dom3;
+
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+/**
+ * Namespace support for XML document handlers. This class doesn't
+ * perform any error checking and assumes that all strings passed
+ * as arguments to methods are unique symbols. The SymbolTable class
+ * can be used for this purpose.
+ *
+ * Derived from org.apache.xerces.util.NamespaceSupport
+ *
+ * @author Andy Clark, IBM
+ *
+ * @version $Id: Exp $
+ */
+public class NamespaceSupport {
+
+        static final String PREFIX_XML = "xml".intern();
+
+        static final String PREFIX_XMLNS = "xmlns".intern();
+
+    /**
+     * The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is
+     * the Namespace URI that is automatically mapped to the "xml" prefix.
+     */
+    public final static String XML_URI = "http://www.w3.org/XML/1998/namespace".intern();
+
+    /**
+     * XML Information Set REC
+     * all namespace attributes (including those named xmlns,
+     * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
+     */
+    public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern();
+
+        //
+    // Data
+    //
+
+    /**
+     * Namespace binding information. This array is composed of a
+     * series of tuples containing the namespace binding information:
+     * &lt;prefix, uri&gt;. The default size can be set to anything
+     * as long as it is a power of 2 greater than 1.
+     *
+     * @see #fNamespaceSize
+     * @see #fContext
+     */
+    protected String[] fNamespace = new String[16 * 2];
+
+    /** The top of the namespace information array. */
+    protected int fNamespaceSize;
+
+    // NOTE: The constructor depends on the initial context size
+    //       being at least 1. -Ac
+
+    /**
+     * Context indexes. This array contains indexes into the namespace
+     * information array. The index at the current context is the start
+     * index of declared namespace bindings and runs to the size of the
+     * namespace information array.
+     *
+     * @see #fNamespaceSize
+     */
+    protected int[] fContext = new int[8];
+
+    /** The current context. */
+    protected int fCurrentContext;
+
+    protected String[] fPrefixes = new String[16];
+
+    //
+    // Constructors
+    //
+
+    /** Default constructor. */
+    public NamespaceSupport() {
+    } // <init>()
+
+    //
+    // Public methods
+    //
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#reset()
+         */
+    public void reset() {
+
+        // reset namespace and context info
+        fNamespaceSize = 0;
+        fCurrentContext = 0;
+        fContext[fCurrentContext] = fNamespaceSize;
+
+        // bind "xml" prefix to the XML uri
+        fNamespace[fNamespaceSize++] = PREFIX_XML;
+        fNamespace[fNamespaceSize++] = XML_URI;
+        // bind "xmlns" prefix to the XMLNS uri
+        fNamespace[fNamespaceSize++] = PREFIX_XMLNS;
+        fNamespace[fNamespaceSize++] = XMLNS_URI;
+        ++fCurrentContext;
+
+    } // reset(SymbolTable)
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#pushContext()
+         */
+    public void pushContext() {
+
+        // extend the array, if necessary
+        if (fCurrentContext + 1 == fContext.length) {
+            int[] contextarray = new int[fContext.length * 2];
+            System.arraycopy(fContext, 0, contextarray, 0, fContext.length);
+            fContext = contextarray;
+        }
+
+        // push context
+        fContext[++fCurrentContext] = fNamespaceSize;
+
+    } // pushContext()
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#popContext()
+         */
+    public void popContext() {
+        fNamespaceSize = fContext[fCurrentContext--];
+    } // popContext()
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#declarePrefix(String, String)
+         */
+    public boolean declarePrefix(String prefix, String uri) {
+        // ignore "xml" and "xmlns" prefixes
+        if (prefix == PREFIX_XML || prefix == PREFIX_XMLNS) {
+            return false;
+        }
+
+        // see if prefix already exists in current context
+        for (int i = fNamespaceSize; i > fContext[fCurrentContext]; i -= 2) {
+            //if (fNamespace[i - 2] == prefix) {
+                if (fNamespace[i - 2].equals(prefix) )  {
+                // REVISIT: [Q] Should the new binding override the
+                //          previously declared binding or should it
+                //          it be ignored? -Ac
+                // NOTE:    The SAX2 "NamespaceSupport" helper allows
+                //          re-bindings with the new binding overwriting
+                //          the previous binding. -Ac
+                fNamespace[i - 1] = uri;
+                return true;
+            }
+        }
+
+        // resize array, if needed
+        if (fNamespaceSize == fNamespace.length) {
+            String[] namespacearray = new String[fNamespaceSize * 2];
+            System.arraycopy(fNamespace, 0, namespacearray, 0, fNamespaceSize);
+            fNamespace = namespacearray;
+        }
+
+        // bind prefix to uri in current context
+        fNamespace[fNamespaceSize++] = prefix;
+        fNamespace[fNamespaceSize++] = uri;
+
+        return true;
+
+    } // declarePrefix(String,String):boolean
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getURI(String)
+         */
+    public String getURI(String prefix) {
+
+        // find prefix in current context
+        for (int i = fNamespaceSize; i > 0; i -= 2) {
+            //if (fNamespace[i - 2] == prefix) {
+                if (fNamespace[i - 2].equals(prefix) ) {
+                return fNamespace[i - 1];
+            }
+        }
+
+        // prefix not found
+        return null;
+
+    } // getURI(String):String
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getPrefix(String)
+         */
+    public String getPrefix(String uri) {
+
+        // find uri in current context
+        for (int i = fNamespaceSize; i > 0; i -= 2) {
+            //if (fNamespace[i - 1] == uri) {
+                if (fNamespace[i - 1].equals(uri) ) {
+                //if (getURI(fNamespace[i - 2]) == uri)
+                        if (getURI(fNamespace[i - 2]).equals(uri) )
+                    return fNamespace[i - 2];
+            }
+        }
+
+        // uri not found
+        return null;
+
+    } // getPrefix(String):String
+
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount()
+         */
+    public int getDeclaredPrefixCount() {
+        return (fNamespaceSize - fContext[fCurrentContext]) / 2;
+    } // getDeclaredPrefixCount():int
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixAt(int)
+         */
+    public String getDeclaredPrefixAt(int index) {
+        return fNamespace[fContext[fCurrentContext] + index * 2];
+    } // getDeclaredPrefixAt(int):String
+
+        /**
+         * @see org.apache.xerces.xni.NamespaceContext#getAllPrefixes()
+         */
+        public Enumeration getAllPrefixes() {
+        int count = 0;
+        if (fPrefixes.length < (fNamespace.length/2)) {
+            // resize prefix array
+            String[] prefixes = new String[fNamespaceSize];
+            fPrefixes = prefixes;
+        }
+        String prefix = null;
+        boolean unique = true;
+        for (int i = 2; i < (fNamespaceSize-2); i += 2) {
+            prefix = fNamespace[i + 2];
+            for (int k=0;k<count;k++){
+                if (fPrefixes[k]==prefix){
+                    unique = false;
+                    break;
+                }
+            }
+            if (unique){
+                fPrefixes[count++] = prefix;
+            }
+            unique = true;
+        }
+                return new Prefixes(fPrefixes, count);
+        }
+
+    protected final class Prefixes implements Enumeration {
+        private String[] prefixes;
+        private int counter = 0;
+        private int size = 0;
+
+                /**
+                 * Constructor for Prefixes.
+                 */
+                public Prefixes(String [] prefixes, int size) {
+                        this.prefixes = prefixes;
+            this.size = size;
+                }
+
+       /**
+                 * @see java.util.Enumeration#hasMoreElements()
+                 */
+                public boolean hasMoreElements() {
+                        return (counter< size);
+                }
+
+                /**
+                 * @see java.util.Enumeration#nextElement()
+                 */
+                public Object nextElement() {
+            if (counter< size){
+                return fPrefixes[counter++];
+            }
+                        throw new NoSuchElementException("Illegal access to Namespace prefixes enumeration.");
+                }
+
+        public String toString(){
+            StringBuffer buf = new StringBuffer();
+            for (int i=0;i<size;i++){
+                buf.append(prefixes[i]);
+                buf.append(" ");
+            }
+
+            return buf.toString();
+        }
+
+}
+
+} // class NamespaceSupport
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/MsgKey.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/MsgKey.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -99,4 +101,36 @@
     public static final String ER_FACTORY_PROPERTY_MISSING = "ER_FACTORY_PROPERTY_MISSING";
     public static final String ER_ENCODING_NOT_SUPPORTED = "ER_ENCODING_NOT_SUPPORTED";
 
+    // DOM Exceptions
+    public static final String ER_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND";
+    public static final String ER_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED";
+    public static final String ER_STRING_TOO_LONG = "DOMSTRING_SIZE_ERR";
+    public static final String ER_TYPE_MISMATCH_ERR = "TYPE_MISMATCH_ERR";
+
+    // DOM Level 3 load and save messages
+    public static final String ER_NO_OUTPUT_SPECIFIED = "no-output-specified";
+    public static final String ER_UNSUPPORTED_ENCODING = "unsupported-encoding";
+    public static final String ER_ELEM_UNBOUND_PREFIX_IN_ENTREF = "unbound-prefix-in-entity-reference";
+    public static final String ER_ATTR_UNBOUND_PREFIX_IN_ENTREF = "unbound-prefix-in-entity-reference";
+    public static final String ER_CDATA_SECTIONS_SPLIT = "cdata-sections-splitted";
+    public static final String ER_WF_INVALID_CHARACTER = "wf-invalid-character";
+    public static final String ER_WF_INVALID_CHARACTER_IN_NODE_NAME = "wf-invalid-character-in-node-name";
+
+    // DOM Level 3 Implementation specific Exceptions
+    public static final String ER_UNABLE_TO_SERIALIZE_NODE = "ER_UNABLE_TO_SERIALIZE_NODE";
+    public static final String ER_WARNING_WF_NOT_CHECKED = "ER_WARNING_WF_NOT_CHECKED";
+
+    public static final String ER_WF_INVALID_CHARACTER_IN_COMMENT = "ER_WF_INVALID_CHARACTER_IN_COMMENT";
+    public static final String ER_WF_INVALID_CHARACTER_IN_PI = "ER_WF_INVALID_CHARACTER_IN_PI";
+    public static final String ER_WF_INVALID_CHARACTER_IN_CDATA = "ER_WF_INVALID_CHARACTER_IN_CDATA";
+    public static final String ER_WF_INVALID_CHARACTER_IN_TEXT = "ER_WF_INVALID_CHARACTER_IN_TEXT";
+    public static final String ER_WF_DASH_IN_COMMENT = "ER_WF_DASH_IN_COMMENT";
+    public static final String ER_WF_LT_IN_ATTVAL = "ER_WF_LT_IN_ATTVAL";
+    public static final String ER_WF_REF_TO_UNPARSED_ENT = "ER_WF_REF_TO_UNPARSED_ENT";
+    public static final String ER_WF_REF_TO_EXTERNAL_ENT =  "ER_WF_REF_TO_EXTERNAL_ENT";
+    public static final String ER_NS_PREFIX_CANNOT_BE_BOUND =  "ER_NS_PREFIX_CANNOT_BE_BOUND";
+    public static final String ER_NULL_LOCAL_ELEMENT_NAME = "ER_NULL_LOCAL_ELEMENT_NAME";
+    public static final String ER_NULL_LOCAL_ATTR_NAME = "ER_NULL_LOCAL_ATTR_NAME";
+    public static final String ER_WRITING_INTERNAL_SUBSET = "ER_WRITING_INTERNAL_SUBSET";
+
 }
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,97 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Warning:  The encoding ''{0}'' is not supported by the Java runtime." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "The parameter ''{0}'' is not recognized."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "The parameter ''{0}'' is recognized but the requested value cannot be set."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "The resulting string is too long to fit in a DOMString: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "The value type for this parameter name is incompatible with the expected value type."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "The output destination for data to be written to was null."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "An unsupported encoding is encountered."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "The node could not be serialized."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "The CDATA Section contains one or more termination markers ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "An instance of the Well-Formedness checker could not be created.  The well-formed parameter was set to true but well-formedness checking can not be performed."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "The node ''{0}'' contains invalid XML characters."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the comment."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the processing instructiondata."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the contents of the CDATASection."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "An invalid XML character (Unicode: 0x{0}) was found in the node''s character data content."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "An invalid XML character(s) was found in the {0} node named ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "The string \"--\" is not permitted within comments."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "The value of attribute \"{1}\" associated with an element type \"{0}\" must not contain the ''<'' character."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "The unparsed entity reference \"&{0};\" is not permitted."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "The external entity reference \"&{0};\" is not permitted in an attribute value."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "The prefix \"{0}\" can not be bound to namespace \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "The local name of element \"{0}\" is null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "The local name of attr \"{0}\" is null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "The replacement text of the entity node \"{0}\" contains an element node \"{1}\" with an unbound prefix \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "The replacement text of the entity node \"{0}\" contains an attribute node \"{1}\" with an unbound prefix \"{2}\"."
+             },
+
+             { MsgKey.ER_WRITING_INTERNAL_SUBSET,
+                 "An error occured while writing the internal subset."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -122,7 +124,106 @@
         "Userinfo may not be specified if host is not specified"},
 
       { MsgKey.ER_SCHEME_REQUIRED,
-        "Scheme is required!"}
+        "Scheme is required!"},
+
+      /*
+       * Note to translators:  The words 'Properties' and
+       * 'SerializerFactory' in this message are Java class names
+       * and should not be translated.
+       */
+      {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+          "L''objecte de propietats passat a SerializerFactory no t\u00e9 cap propietat ''{0}''." },
+
+      {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+          "Av\u00eds: el temps d''execuci\u00f3 de Java no d\u00f3na suport a la codificaci\u00f3 ''{0}''." },
+
+       {MsgKey.ER_FEATURE_NOT_FOUND,
+       "El par\u00e0metre ''{0}'' no es reconeix."},
+
+       {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+       "El par\u00e0metre ''{0}'' es reconeix per\u00f2 el valor sol\u00b7licitat no es pot establir."},
+
+       {MsgKey.ER_STRING_TOO_LONG,
+       "La cadena resultant \u00e9s massa llarga per cabre en una DOMString: ''{0}''."},
+
+       {MsgKey.ER_TYPE_MISMATCH_ERR,
+       "El tipus de valor per a aquest nom de par\u00e0metre \u00e9s incompatible amb el tipus de valor esperat."},
+
+       {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+       "La destinaci\u00f3 de sortida per a les dades que s'ha d'escriure era nul\u00b7la."},
+
+       {MsgKey.ER_UNSUPPORTED_ENCODING,
+       "S'ha trobat una codificaci\u00f3 no suportada."},
+
+       {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+       "El node no s'ha pogut serialitzat."},
+
+       {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+       "La secci\u00f3 CDATA cont\u00e9 un o m\u00e9s marcadors d'acabament ']]>'."},
+
+       {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+           "No s'ha pogut crear cap inst\u00e0ncia per comprovar si t\u00e9 un format correcte o no. El par\u00e0metre del tipus ben format es va establir en cert, per\u00f2 la comprovaci\u00f3 de format no s'ha pogut realitzar."
+       },
+
+       {MsgKey.ER_WF_INVALID_CHARACTER,
+           "El node ''{0}'' cont\u00e9 car\u00e0cters XML no v\u00e0lids."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en el comentari."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en les dades d''instrucci\u00f3 de proc\u00e9s."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en els continguts de la CDATASection."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+           "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en el contingut de dades de car\u00e0cter del node."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+           "S''han trobat car\u00e0cters XML no v\u00e0lids al node {0} anomenat ''{1}''."
+       },
+
+       { MsgKey.ER_WF_DASH_IN_COMMENT,
+           "La cadena \"--\" no est\u00e0 permesa dins dels comentaris."
+       },
+
+       {MsgKey.ER_WF_LT_IN_ATTVAL,
+           "El valor d''atribut \"{1}\" associat amb un tipus d''element \"{0}\" no pot contenir el car\u00e0cter ''<''."
+       },
+
+       {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+           "La refer\u00e8ncia de l''entitat no analitzada \"&{0};\" no est\u00e0 permesa."
+       },
+
+       {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+           "La refer\u00e8ncia externa de l''entitat \"&{0};\" no est\u00e0 permesa en un valor d''atribut."
+       },
+
+       {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+           "El prefix \"{0}\" no es pot vincular a l''espai de noms \"{1}\"."
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+           "El nom local de l''element \"{0}\" \u00e9s nul."
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+           "El nom local d''atr \"{0}\" \u00e9s nul."
+       },
+
+       { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+           "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''element \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"."
+       },
+
+       { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+           "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''atribut \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"."
+       },
 
     };
     return contents;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -114,7 +116,106 @@
         "Nen\u00ed-li ur\u010den hostitel, nelze zadat \u00fadaje o u\u017eivateli."},
 
       { MsgKey.ER_SCHEME_REQUIRED,
-        "Je vy\u017eadov\u00e1no sch\u00e9ma!"}
+        "Je vy\u017eadov\u00e1no sch\u00e9ma!"},
+
+      /*
+       * Note to translators:  The words 'Properties' and
+       * 'SerializerFactory' in this message are Java class names
+       * and should not be translated.
+       */
+      {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+          "Objekt vlastnost\u00ed p\u0159edan\u00fd faktorii SerializerFactory neobsahuje vlastnost ''{0}''. " },
+
+      {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+          "Varov\u00e1n\u00ed: K\u00f3dov\u00e1n\u00ed ''{0}'' nen\u00ed v b\u011bhov\u00e9m prost\u0159ed\u00ed Java podporov\u00e1no." },
+
+       {MsgKey.ER_FEATURE_NOT_FOUND,
+       "Parametr ''{0}'' nebyl rozpozn\u00e1n."},
+
+       {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+       "Parametr ''{0}'' byl rozpozn\u00e1n, ale nelze nastavit po\u017eadovanou hodnotu."},
+
+       {MsgKey.ER_STRING_TOO_LONG,
+       "V\u00fdsledn\u00fd \u0159et\u011bzec je p\u0159\u00edli\u0161 dlouh\u00fd pro \u0159et\u011bzec DOMString: ''{0}''."},
+
+       {MsgKey.ER_TYPE_MISMATCH_ERR,
+       "Typ hodnoty pro tento n\u00e1zev parametru nen\u00ed kompatibiln\u00ed s o\u010dek\u00e1van\u00fdm typem hodnoty."},
+
+       {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+       "C\u00edlov\u00e9 um\u00edst\u011bn\u00ed v\u00fdstupu pro data ur\u010den\u00e1 k z\u00e1pisu je rovno hodnot\u011b Null. "},
+
+       {MsgKey.ER_UNSUPPORTED_ENCODING,
+       "Bylo nalezeno nepodporovan\u00e9 k\u00f3dov\u00e1n\u00ed."},
+
+       {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+       "Nelze prov\u00e9st serializaci uzlu. "},
+
+       {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+       "Sekce CDATA obsahuje jednu nebo v\u00edce ukon\u010dovac\u00edch zna\u010dek ']]>'."},
+
+       {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+           "Nelze vytvo\u0159it instanci modulu pro kontrolu spr\u00e1vn\u00e9ho utvo\u0159en\u00ed. Parametr spr\u00e1vn\u00e9ho utvo\u0159en\u00ed byl nastaven na hodnotu true, nepoda\u0159ilo se v\u0161ak zkontrolovat spr\u00e1vnost utvo\u0159en\u00ed. "
+       },
+
+       {MsgKey.ER_WF_INVALID_CHARACTER,
+           "Uzel ''{0}'' obsahuje neplatn\u00e9 znaky XML. "
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+           "V pozn\u00e1mce byl zji\u0161t\u011bn neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+           "V datech instrukce zpracov\u00e1n\u00ed byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+           "V odd\u00edlu CDATASection byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+           "V obsahu znakov\u00fdch dat uzlu byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})."
+       },
+
+       { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+           "V objektu {0} s n\u00e1zvem ''{1}'' byl nalezen neplatn\u00fd znak XML. "
+       },
+
+       { MsgKey.ER_WF_DASH_IN_COMMENT,
+           "V pozn\u00e1mk\u00e1ch nen\u00ed povolen \u0159et\u011bzec \"--\"."
+       },
+
+       {MsgKey.ER_WF_LT_IN_ATTVAL,
+           "Hodnota atributu \"{1}\" souvisej\u00edc\u00edho s typem prvku \"{0}\" nesm\u00ed obsahovat znak ''<''."
+       },
+
+       {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+           "Odkaz na neanalyzovanou entitu \"&{0};\" nen\u00ed povolen."
+       },
+
+       {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+           "Extern\u00ed odkaz na entitu \"&{0};\" nen\u00ed v hodnot\u011b atributu povolen."
+       },
+
+       {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+           "P\u0159edpona \"{0}\" nesm\u00ed b\u00fdt v\u00e1zan\u00e1 k oboru n\u00e1zv\u016f \"{1}\"."
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+           "Lok\u00e1ln\u00ed n\u00e1zev prvku \"{0}\" m\u00e1 hodnotu Null. "
+       },
+
+       {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+           "Lok\u00e1ln\u00ed n\u00e1zev atributu \"{0}\" m\u00e1 hodnotu Null. "
+       },
+
+       { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+           "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel prvku \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\"."
+       },
+
+       { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+           "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel atributu \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\". "
+       },
 
     };
     return contents;
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Warnung: Die Codierung \"{0}\" wird nicht von der Java-Laufzeit unterst\u00FCtzt." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "Der Parameter ''{0}'' wird nicht erkannt."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Der Parameter ''{0}'' wird erkannt, der angeforderte Wert kann jedoch nicht festgelegt werden."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "Die Ergebniszeichenfolge ist zu lang f\u00fcr eine DOM-Zeichenfolge: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "Der Werttyp f\u00fcr diesen Parameternamen ist nicht kompatibel mit dem erwarteten Werttyp."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "Das Ausgabeziel f\u00fcr die zu schreibenden Daten war leer."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Eine nicht unterst\u00fctzte Codierung wurde festgestellt."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "Der Knoten konnte nicht serialisiert werden."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "Der Abschnitt CDATA enth\u00e4lt mindestens eine Beendigungsmarkierung ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Eine Instanz des Pr\u00fcfprogramms f\u00fcr korrekte Formatierung konnte nicht erstellt werden.  F\u00fcr den korrekt formatierten Parameter wurde der Wert 'True' festgelegt, die Pr\u00fcfung auf korrekte Formatierung kann jedoch nicht durchgef\u00fchrt werden."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "Der Knoten ''{0}'' enth\u00e4lt ung\u00fcltige XML-Zeichen."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Im Kommentar wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "In der Verarbeitungsanweisung wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Im Inhalt von CDATASection wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Ein ung\u00fcltiges XML-Zeichen  (Unicode: 0x{0}) wurde im Inhalt der Zeichendaten des Knotens gefunden."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Ung\u00fcltige XML-Zeichen wurden gefunden in {0} im Knoten ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "Die Zeichenfolge \"--\" ist innerhalb von Kommentaren nicht zul\u00e4ssig."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "Der Wert des Attributs \"{1}\" mit einem Elementtyp \"{0}\" darf nicht das Zeichen ''<'' enthalten."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "Der syntaktisch nicht analysierte Entit\u00e4tenverweis \"&{0};\" ist nicht zul\u00e4ssig."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "Der externe Entit\u00e4tenverweis \"&{0};\" ist in einem Attributwert nicht zul\u00e4ssig."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "Das Pr\u00e4fix \"{0}\" kann nicht an den Namensbereich \"{1}\" gebunden werden."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "Der lokale Name von Element \"{0}\" ist nicht angegeben."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "Der lokale Name des Attributs \"{0}\" ist nicht angegeben."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "Der Ersatztext des Entit\u00e4tenknotens \"{0}\" enth\u00e4lt einen Elementknoten \"{1}\" mit einem nicht gebundenen Pr\u00e4fix \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "Der Ersatztext des Entit\u00e4tenknotens \"{0}\" enth\u00e4lt einen Attributknoten \"{1}\" mit einem nicht gebundenen Pr\u00e4fix \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -198,8 +200,95 @@
                 "El objeto de propiedades transferido a SerializerFactory no tiene una propiedad ''{0}''." },
 
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
-                "Advertencia: el tiempo de ejecuci\u00F3n de Java no soporta la codificaci\u00F3n ''{0}''." },
+                "Aviso: La codificaci\u00f3n ''{0}'' no est\u00e1 soportada por Java Runtime." },
+
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "El par\u00e1metro ''{0}'' no se reconoce."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Se reconoce el par\u00e1metro ''{0}'' pero no puede establecerse el valor solicitado."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "La serie producida es demasiado larga para ajustarse a DOMString: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "El tipo de valor para este nombre de par\u00e1metro es incompatible con el tipo de valor esperado."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "El destino de salida de escritura de los datos es nulo."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Se ha encontrado una codificaci\u00f3n no soportada."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "No se ha podido serializar el nodo."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "La secci\u00f3n CDATA contiene uno o m\u00e1s marcadores ']]>' de terminaci\u00f3n."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "No se ha podido crear una instancia del comprobador de gram\u00e1tica correcta.  El par\u00e1metro well-formed se ha establecido en true pero no se puede realizar la comprobaci\u00f3n de gram\u00e1tica correcta."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "El nodo ''{0}'' contiene caracteres XML no v\u00e1lidos."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el comentario."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en los datos de la instrucci\u00f3n de proceso."
+             },
 
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el contenido de CDATASection."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el contenido de datos de caracteres del nodo."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Se ha encontrado un car\u00e1cter o caracteres XML no v\u00e1lidos en el nodo {0} denominado ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "No se permite la serie \"--\" dentro de los comentarios."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "El valor del atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no debe contener el car\u00e1cter ''''<''''."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "No se permite la referencia de entidad no analizada \"&{0};\"."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "La referencia de entidad externa \"&{0};\" no est\u00e1 permitida en un valor de atributo."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "No se puede encontrar el prefijo \"{0}\" en el espacio de nombres \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "El nombre local del elemento \"{0}\" es null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "El nombre local del atributo \"{0}\" es null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "El texto de sustituci\u00f3n del nodo de entidad \"{0}\" contiene un nodo de elemento \"{1}\" con un prefijo no enlazado \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "El texto de sustituci\u00f3n del nodo de entidad \"{0}\" contiene un nodo de atributo \"{1}\" con un prefijo no enlazado \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Avertissement : l''encodage ''{0}'' n''est pas pris en charge par l''ex\u00E9cution Java." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "Le param\u00e8tre ''{0}'' n''est pas reconnu."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Le param\u00e8tre ''{0}'' est reconnu mas la valeur demand\u00e9e ne peut pas \u00eatre d\u00e9finie."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "La cha\u00eene obtenue est trop longue pour un DOMString : ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "Le type de valeur de ce param\u00e8tre est incompatible avec le type de valeur attendu."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "La sortie de destination des donn\u00e9es \u00e0 \u00e9crire \u00e9tait vide."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Codage non pris en charge."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "Le noeud ne peut pas \u00eatre s\u00e9rialis\u00e9."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "La section CDATA contient un ou plusieurs marqueurs de fin ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Aucune instance du programme de v\u00e9rification de la formation n'a pu \u00eatre cr\u00e9\u00e9e.  La valeur true a \u00e9t\u00e9 attribu\u00e9e au param\u00e8tre well-formed mais la v\u00e9rification de la formation n'a pas pu \u00eatre effectu\u00e9e."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "Le noeud ''{0}'' contient des caract\u00e8res XML non valides."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le commentaire."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans les donn\u00e9es de l''instruction de traitement."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Un caract\u00e8re XML non valide (Unicode: 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le contenu de la CDATASection"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le contenu des donn\u00e9es de type caract\u00e8res du noeud."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Un ou plusieurs caract\u00e8res non valides ont \u00e9t\u00e9 trouv\u00e9s dans le noeud {0} nomm\u00e9 ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "La cha\u00eene \"--\" est interdite dans des commentaires."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "La valeur de l''attribut \"{1}\" associ\u00e9 \u00e0 un type d''\u00e9l\u00e9ment \"{0}\" ne doit pas contenir le caract\u00e8re ''<''."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "La r\u00e9f\u00e9rence d''entit\u00e9 non analys\u00e9e \"&{0};\" n''est pas admise."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "La r\u00e9f\u00e9rence d''entit\u00e9 externe \"&{0};\" n''est pas admise dans une valeur d''attribut."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "Le pr\u00e9fixe \"{0}\" ne peut pas \u00eatre li\u00e9 \u00e0 l''espace de noms \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "Le nom local de l''\u00e9l\u00e9ment \"{0}\" a une valeur null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "Le nom local de l''attribut \"{0}\" a une valeur null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "le texte de remplacement du noeud de l''entit\u00e9 \"{0}\" contaient un noeud d''\u00e9l\u00e9ment \"{1}\" avec un pr\u00e9fixe non li\u00e9 \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "Le texte de remplacement du noeud de l''entit\u00e9 \"{0}\" contient un noeud d''attribut \"{1}\" avec un pr\u00e9fixe non li\u00e9 \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Avvertenza: la codifica ''{0}'' non \u00E8 supportata da Java Runtime." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "Il parametro ''{0}'' non \u00e8 riconosciuto."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "Il parametro ''{0}'' \u00e8 riconosciuto ma non \u00e8 possibile impostare il valore richiesto."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "La stringa risultante \u00e8 troppo lunga per essere inserita in DOMString: ''{0}''."},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "Il tipo di valore per questo nome di parametro non \u00e8 compatibile con il tipo di valore previsto."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "La destinazione di output in cui scrivere i dati era nulla."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\u00c8 stata rilevata una codifica non supportata."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "Impossibile serializzare il nodo."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "La Sezione CDATA contiene uno o pi\u00f9 markers di termine ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Impossibile creare un'istanza del controllore Well-Formedness.  Il parametro well-formed \u00e8 stato impostato su true ma non \u00e8 possibile eseguire i controlli well-formedness."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "Il nodo ''{0}'' contiene caratteri XML non validi."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Trovato un carattere XML non valido (Unicode: 0x{0}) nel commento."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Carattere XML non valido (Unicode: 0x{0}) rilevato nell''elaborazione di instructiondata."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Carattere XML non valido (Unicode: 0x{0}) rilevato nel contenuto di CDATASection."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Carattere XML non valido (Unicode: 0x{0}) rilevato nel contenuto dati di caratteri del nodo. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Carattere XML non valido rilevato nel nodo {0} denominato ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "La stringa \"--\" non \u00e8 consentita nei commenti."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "Il valore dell''''attributo \"{1}\" associato con un tipo di elemento \"{0}\" non deve contenere il carattere ''<''."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "Il riferimento entit\u00e0 non analizzata \"&{0};\" non \u00e8 permesso."
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "Il riferimento all''''entit\u00e0 esterna \"&{0};\" non \u00e8 permesso in un valore attributo."
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "Il prefisso \"{0}\" non pu\u00f2 essere associato allo spazio nome \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "Il nome locale dell''''elemento \"{0}\" \u00e8 null."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "Il nome locale dell''''attributo \"{0}\" \u00e8  null."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "Il testo di sostituzione del nodo di entit\u00e0 \"{0}\" contiene un nodo di elemento \"{1}\" con un prefisso non associato \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "Il testo di sostituzione del nodo di entit\u00e0 \"{0}\" contiene un nodo di attributo \"{1}\" con un prefisso non associato \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "\u8B66\u544A:  \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0''{0}''\u306F\u3001Java\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002" },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc ''{0}'' \u306f\u8a8d\u8b58\u3055\u308c\u307e\u305b\u3093\u3002"},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc ''{0}'' \u306f\u8a8d\u8b58\u3055\u308c\u307e\u3059\u304c\u3001\u8981\u6c42\u3055\u308c\u305f\u5024\u306f\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002"},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "\u7d50\u679c\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u304c\u9577\u3059\u304e\u308b\u305f\u3081\u3001DOMString \u5185\u306b\u53ce\u307e\u308a\u307e\u305b\u3093: ''{0}''\u3002"},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u540d\u306e\u5024\u306e\u578b\u306f\u3001\u671f\u5f85\u3055\u308c\u308b\u5024\u306e\u578b\u3068\u4e0d\u9069\u5408\u3067\u3059\u3002"},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "\u66f8\u304d\u8fbc\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306e\u51fa\u529b\u5b9b\u5148\u304c\u30cc\u30eb\u3067\u3059\u3002"},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c9\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002"},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "\u30ce\u30fc\u30c9\u3092\u76f4\u5217\u5316\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002"},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "CDATA \u30bb\u30af\u30b7\u30e7\u30f3\u306b 1 \u3064\u4ee5\u4e0a\u306e\u7d42\u4e86\u30de\u30fc\u30ab\u30fc ']]>' \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "\u6574\u5f62\u5f0f\u6027\u30c1\u30a7\u30c3\u30ab\u30fc\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002  well-formed \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u306f true \u3067\u3057\u305f\u304c\u3001\u6574\u5f62\u5f0f\u6027\u306e\u691c\u67fb\u306f\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "\u30ce\u30fc\u30c9 ''{0}'' \u306b\u7121\u52b9\u306a XML \u6587\u5b57\u304c\u3042\u308a\u307e\u3059\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "\u30b3\u30e1\u30f3\u30c8\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "\u51e6\u7406\u547d\u4ee4\u30c7\u30fc\u30bf\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "CDATA \u30bb\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "\u30ce\u30fc\u30c9\u306e\u6587\u5b57\u30c7\u30fc\u30bf\u306e\u5185\u5bb9\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e {0} \u30ce\u30fc\u30c9\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002"
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "\u30b9\u30c8\u30ea\u30f3\u30b0 \"--\" \u306f\u30b3\u30e1\u30f3\u30c8\u5185\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "\u8981\u7d20\u578b \"{0}\" \u306b\u95a2\u9023\u3057\u305f\u5c5e\u6027 \"{1}\" \u306e\u5024\u306b\u306f ''<'' \u6587\u5b57\u3092\u542b\u3081\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "\u89e3\u6790\u5bfe\u8c61\u5916\u5b9f\u4f53\u53c2\u7167 \"&{0};\" \u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "\u5c5e\u6027\u5024\u3067\u306e\u5916\u90e8\u5b9f\u4f53\u53c2\u7167 \"&{0};\" \u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "\u63a5\u982d\u90e8 \"{0}\" \u306f\u540d\u524d\u7a7a\u9593 \"{1}\" \u306b\u7d50\u5408\u3067\u304d\u307e\u305b\u3093\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "\u8981\u7d20 \"{0}\" \u306e\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u30cc\u30eb\u3067\u3059\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "\u5c5e\u6027 \"{0}\" \u306e\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u30cc\u30eb\u3067\u3059\u3002"
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5b9f\u4f53\u30ce\u30fc\u30c9 \"{0}\" \u306e\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\u306b\u3001\u672a\u7d50\u5408\u306e\u63a5\u982d\u90e8 \"{2}\" \u3092\u6301\u3064\u8981\u7d20\u30ce\u30fc\u30c9 \"{1}\" \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5b9f\u4f53\u30ce\u30fc\u30c9 \"{0}\" \u306e\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\u306b\u3001\u672a\u7d50\u5408\u306e\u63a5\u982d\u90e8 \"{2}\" \u3092\u6301\u3064\u5c5e\u6027\u30ce\u30fc\u30c9 \"{1}\" \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "\uACBD\uACE0: \uC778\uCF54\uB529 ''{0}''\uC740(\uB294) Java \uB7F0\uD0C0\uC784\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "''{0}'' \ub9e4\uac1c\ubcc0\uc218\ub97c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "''{0}'' \ub9e4\uac1c\ubcc0\uc218\ub294 \uc778\uc2dd\ud560 \uc218 \uc788\uc73c\ub098 \uc694\uccad\ub41c \uac12\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "\uacb0\uacfc \ubb38\uc790\uc5f4\uc774 \ub108\ubb34 \uae38\uc5b4 DOMString\uc5d0 \ub9de\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4: ''{0}'' "},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "\uc774 \ub9e4\uac1c\ubcc0\uc218 \uc774\ub984\uc5d0 \ub300\ud55c \uac12 \uc720\ud615\uc774 \uc608\uc0c1 \uac12 \uc720\ud615\uacfc \ud638\ud658\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "\ub370\uc774\ud130\ub97c \uae30\ub85d\ud560 \ucd9c\ub825 \ub300\uc0c1\uc774 \ub110(null)\uc785\ub2c8\ub2e4."},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529\uc774 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "\ub178\ub4dc\ub97c \uc9c1\ub82c\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "CDATA \uc139\uc158\uc5d0 \uc885\ub8cc \ud45c\uc2dc \ubb38\uc790\uc778 ']]>'\uac00 \ud558\ub098 \uc774\uc0c1 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Well-Formedness \uac80\uc0ac\uae30\uc758 \uc778\uc2a4\ud134\uc2a4\ub97c \uc791\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. Well-Formed \ub9e4\uac1c\ubcc0\uc218\uac00 true\ub85c \uc124\uc815\ub418\uc5c8\uc9c0\ub9cc Well-Formedness \uac80\uc0ac\ub97c \uc218\ud589\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "''{0}'' \ub178\ub4dc\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "\uc124\uba85\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "\ucc98\ub9ac \uba85\ub839\uc5b4 \ub370\uc774\ud130\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4 "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "CDATASection\uc758 \ub0b4\uc6a9\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "\ub178\ub4dc\uc758 \ubb38\uc790 \ub370\uc774\ud130 \ub0b4\uc6a9\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "\uc774\ub984\uc774 ''{1}''\uc778 {0} \ub178\ub4dc\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4. "
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "\uc124\uba85 \ub0b4\uc5d0\uc11c\ub294 \"--\" \ubb38\uc790\uc5f4\uc774 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "\"{0}\" \uc694\uc18c \uc720\ud615\uacfc \uc5f0\uad00\ub41c \"{1}\" \uc18d\uc131\uac12\uc5d0 ''<'' \ubb38\uc790\uac00 \ud3ec\ud568\ub418\uba74 \uc548\ub429\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "\"&{0};\"\uc758 \uad6c\ubd84 \ubd84\uc11d\ub418\uc9c0 \uc54a\uc740 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub294 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. "
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "\uc18d\uc131\uac12\uc5d0\ub294 \"&{0};\" \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\uac00 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. "
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "\"{0}\" \uc811\ub450\ubd80\ub97c \"{1}\" \uc774\ub984 \uacf5\uac04\uc5d0 \ubc14\uc778\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "\"{0}\" \uc694\uc18c\uc758 \ub85c\uceec \uc774\ub984\uc774 \ub110(null)\uc785\ub2c8\ub2e4."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "\"{0}\" \uc18d\uc131\uc758 \ub85c\uceec \uc774\ub984\uc774 \ub110(null)\uc785\ub2c8\ub2e4."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "\"{0}\" \uc5d4\ud2f0\ud2f0 \ub178\ub4dc\uc758 \ub300\uccb4 \ud14d\uc2a4\ud2b8\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\ubd80 \"{2}\"\uc744(\ub97c) \uac16\ub294 \"{1}\" \uc694\uc18c \ub178\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "\"{0}\" \uc5d4\ud2f0\ud2f0 \ub178\ub4dc\uc758 \ub300\uccb4 \ud14d\uc2a4\ud2b8\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\ubd80 \"{2}\"\uc744(\ub97c) \uac16\ub294 \"{1}\" \uc18d\uc131 \ub178\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "Advert\u00EAncia: a codifica\u00E7\u00E3o ''{0}'' n\u00E3o \u00E9 suportada pelo Java runtime." },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "O par\u00e2metro ''{0}'' n\u00e3o \u00e9 reconhecido."},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "O par\u00e2metro ''{0}'' \u00e9 reconhecido, mas o valor pedido n\u00e3o pode ser definido. "},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "A cadeia resultante \u00e9 muito longa para caber em uma DOMString: ''{0}''. "},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "O tipo de valor para este nome de par\u00e2metro \u00e9 incompat\u00edvel com o tipo de valor esperado. "},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "O destino de sa\u00edda para os dados a serem gravados era nulo. "},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "Uma codifica\u00e7\u00e3o n\u00e3o suportada foi encontrada. "},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "O n\u00f3 n\u00e3o p\u00f4de ser serializado."},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "A Se\u00e7\u00e3o CDATA cont\u00e9m um ou mais marcadores de t\u00e9rmino ']]>'."},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "Uma inst\u00e2ncia do verificador Well-Formedness n\u00e3o p\u00f4de ser criada. O par\u00e2metro well-formed foi definido como true, mas a verifica\u00e7\u00e3o well-formedness n\u00e3o pode ser executada."
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "O n\u00f3 ''{0}'' cont\u00e9m caracteres XML inv\u00e1lidos. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no coment\u00e1rio. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no processo instructiondata."
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado nos conte\u00fados do CDATASection. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no conte\u00fado dos dados de caractere dos n\u00f3s. "
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "Um caractere inv\u00e1lido foi encontrado no {0} do n\u00f3 denominado ''{1}''."
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "A cadeia \"--\" n\u00e3o \u00e9 permitida dentro dos coment\u00e1rios. "
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "O valor do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00e3o deve conter o caractere ''<''. "
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "A refer\u00eancia de entidade n\u00e3o analisada \"&{0};\" n\u00e3o \u00e9 permitida. "
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "A refer\u00eancia de entidade externa \"&{0};\" n\u00e3o \u00e9 permitida em um valor de atributo. "
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "O prefixo \"{0}\" n\u00e3o pode ser vinculado ao espa\u00e7o de nomes \"{1}\"."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "O nome local do elemento \"{0}\" \u00e9 nulo."
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "O nome local do atributo \"{0}\" \u00e9 nulo."
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "O texto de substitui\u00e7\u00e3o do n\u00f3 de entidade \"{0}\" cont\u00e9m um n\u00f3 de elemento \"{1}\" com um prefixo n\u00e3o vinculado \"{2}\"."
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "O texto de substitui\u00e7\u00e3o do n\u00f3 de entidade \"{0}\" cont\u00e9m um n\u00f3 de atributo \"{1}\" com um prefixo n\u00e3o vinculado \"{2}\"."
+             },
 
         };
 
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3,9 +3,11 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -200,6 +202,93 @@
             {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
                 "\u8B66\u544A:  Java Runtime \u4E0D\u652F\u63F4\u7DE8\u78BC ''{0}''\u3002" },
 
+             {MsgKey.ER_FEATURE_NOT_FOUND,
+             "\u7121\u6cd5\u8fa8\u8b58\u53c3\u6578 ''{0}''\u3002"},
+
+             {MsgKey.ER_FEATURE_NOT_SUPPORTED,
+             "\u53ef\u8fa8\u8b58 ''{0}'' \u53c3\u6578\uff0c\u4f46\u6240\u8981\u6c42\u7684\u503c\u7121\u6cd5\u8a2d\u5b9a\u3002"},
+
+             {MsgKey.ER_STRING_TOO_LONG,
+             "\u7d50\u679c\u5b57\u4e32\u904e\u9577\uff0c\u7121\u6cd5\u7f6e\u5165 DOMString: ''{0}'' \u4e2d\u3002"},
+
+             {MsgKey.ER_TYPE_MISMATCH_ERR,
+             "\u9019\u500b\u53c3\u6578\u540d\u7a31\u7684\u503c\u985e\u578b\u8207\u671f\u671b\u503c\u985e\u578b\u4e0d\u76f8\u5bb9\u3002"},
+
+             {MsgKey.ER_NO_OUTPUT_SPECIFIED,
+             "\u8cc7\u6599\u8981\u5beb\u5165\u7684\u8f38\u51fa\u76ee\u7684\u5730\u70ba\u7a7a\u503c\u3002"},
+
+             {MsgKey.ER_UNSUPPORTED_ENCODING,
+             "\u767c\u73fe\u4e0d\u652f\u63f4\u7684\u7de8\u78bc\u3002"},
+
+             {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE,
+             "\u7bc0\u9ede\u7121\u6cd5\u5e8f\u5217\u5316\u3002"},
+
+             {MsgKey.ER_CDATA_SECTIONS_SPLIT,
+             "CDATA \u5340\u6bb5\u5305\u542b\u4e00\u6216\u591a\u500b\u7d42\u6b62\u6a19\u8a18 ']]>'\u3002"},
+
+             {MsgKey.ER_WARNING_WF_NOT_CHECKED,
+                 "\u7121\u6cd5\u5efa\u7acb\u300c\u5f62\u5f0f\u5b8c\u6574\u300d\u6aa2\u67e5\u7a0b\u5f0f\u7684\u5be6\u4f8b\u3002Well-formed \u53c3\u6578\u96d6\u8a2d\u70ba true\uff0c\u4f46\u7121\u6cd5\u57f7\u884c\u5f62\u5f0f\u5b8c\u6574\u6aa2\u67e5\u3002"
+             },
+
+             {MsgKey.ER_WF_INVALID_CHARACTER,
+                 "\u7bc0\u9ede ''{0}'' \u5305\u542b\u7121\u6548\u7684 XML \u5b57\u5143\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
+                 "\u5728\u8a3b\u89e3\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI,
+                 "\u5728\u8655\u7406\u7a0b\u5e8f instructiondata \u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA,
+                 "\u5728 CDATASection \u7684\u5167\u5bb9\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
+                 "\u5728\u7bc0\u9ede\u7684\u5b57\u5143\u8cc7\u6599\u5167\u5bb9\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002"
+             },
+
+             { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
+                 "\u5728\u540d\u70ba ''{1}'' \u7684 ''{0}'' \u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143\u3002"
+             },
+
+             { MsgKey.ER_WF_DASH_IN_COMMENT,
+                 "\u8a3b\u89e3\u4e2d\u4e0d\u5141\u8a31\u4f7f\u7528\u5b57\u4e32 \"--\"\u3002"
+             },
+
+             {MsgKey.ER_WF_LT_IN_ATTVAL,
+                 "\u8207\u5143\u7d20\u985e\u578b \"{0}\" \u76f8\u95dc\u806f\u7684\u5c6c\u6027 \"{1}\" \u503c\u4e0d\u53ef\u5305\u542b ''<'' \u5b57\u5143\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_UNPARSED_ENT,
+                 "\u4e0d\u5141\u8a31\u4f7f\u7528\u672a\u5256\u6790\u7684\u5be6\u9ad4\u53c3\u7167 \"&{0};\"\u3002"
+             },
+
+             {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT,
+                 "\u5c6c\u6027\u503c\u4e2d\u4e0d\u5141\u8a31\u4f7f\u7528\u5916\u90e8\u5be6\u9ad4\u53c3\u7167 \"&{0};\"\u3002"
+             },
+
+             {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
+                 "\u5b57\u9996 \"{0}\" \u7121\u6cd5\u9023\u7d50\u5230\u540d\u7a31\u7a7a\u9593 \"{1}\"\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME,
+                 "\u5143\u7d20 \"{0}\" \u7684\u672c\u7aef\u540d\u7a31\u662f\u7a7a\u503c\u3002"
+             },
+
+             {MsgKey.ER_NULL_LOCAL_ATTR_NAME,
+                 "\u5c6c\u6027 \"{0}\" \u7684\u672c\u7aef\u540d\u7a31\u662f\u7a7a\u503c\u3002"
+             },
+
+             { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5be6\u9ad4\u7bc0\u9ede \"{0}\" \u7684\u53d6\u4ee3\u6587\u5b57\u5305\u542b\u9644\u6709\u5df2\u5207\u65b7\u9023\u7d50\u5b57\u9996 \"{2}\" \u7684\u5143\u7d20\u7bc0\u9ede \"{1}\"\u3002"
+             },
+
+             { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF,
+                 "\u5be6\u9ad4\u7bc0\u9ede \"{0}\" \u7684\u53d6\u4ee3\u6587\u5b57\u5305\u542b\u9644\u6709\u5df2\u5207\u65b7\u9023\u7d50\u5b57\u9996 \"{2}\" \u7684\u5c6c\u6027\u7bc0\u9ede \"{1}\"\u3002"
+             },
 
         };
 
--- a/jaxp/src/org/w3c/dom/ranges/DocumentRange.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/ranges/DocumentRange.java	Fri Aug 08 12:54:39 2014 -0700
@@ -43,7 +43,7 @@
 
 /**
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface DocumentRange {
     /**
--- a/jaxp/src/org/w3c/dom/ranges/Range.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/ranges/Range.java	Fri Aug 08 12:54:39 2014 -0700
@@ -47,7 +47,7 @@
 
 /**
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface Range {
     /**
--- a/jaxp/src/org/w3c/dom/ranges/RangeException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/ranges/RangeException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -45,7 +45,7 @@
  * Range operations may throw a <code>RangeException</code> as specified in
  * their method descriptions.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public class RangeException extends RuntimeException {
     public RangeException(short code, String message) {
--- a/jaxp/src/org/w3c/dom/traversal/DocumentTraversal.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/traversal/DocumentTraversal.java	Fri Aug 08 12:54:39 2014 -0700
@@ -53,7 +53,7 @@
  * Traversal feature, <code>DocumentTraversal</code> will be implemented by
  * the same objects that implement the Document interface.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface DocumentTraversal {
     /**
--- a/jaxp/src/org/w3c/dom/traversal/NodeFilter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/traversal/NodeFilter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -59,7 +59,7 @@
  * filter may be used with a number of different kinds of traversals,
  * encouraging code reuse.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface NodeFilter {
     // Constants returned by acceptNode
--- a/jaxp/src/org/w3c/dom/traversal/NodeIterator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/traversal/NodeIterator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -55,7 +55,7 @@
  * <code>NodeIterators</code> are created by calling
  * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface NodeIterator {
     /**
--- a/jaxp/src/org/w3c/dom/traversal/TreeWalker.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxp/src/org/w3c/dom/traversal/TreeWalker.java	Fri Aug 08 12:54:39 2014 -0700
@@ -60,7 +60,7 @@
  * nodes will be siblings and appear as direct children of the root node, no
  * matter how deeply nested the structure of the original document.
  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
- * @since DOM Level 2
+ * @since 1.9, DOM Level 2
  */
 public interface TreeWalker {
     /**
--- a/jaxws/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -270,3 +270,4 @@
 7f5e5902cde75fd9335c52f469491f061fe0239e jdk9-b22
 ce19e0403ec8a80223cc47320c905b2a4d45881d jdk9-b23
 0b35542d6bf32af23a9fc59a37c52aa091fee388 jdk9-b24
+ab8726a0fcde897e4cfd1ea581ed90b0d8a7cbb7 jdk9-b25
--- a/jaxws/src/share/jaf_classes/javax/activation/CommandMap.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaf_classes/javax/activation/CommandMap.java	Fri Aug 08 12:54:39 2014 -0700
@@ -127,7 +127,7 @@
      * @param mimeType  the MIME type
      * @param ds        a DataSource for the data
      * @return the CommandInfo classes that represent the command Beans.
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public CommandInfo[] getPreferredCommands(String mimeType, DataSource ds) {
         return getPreferredCommands(mimeType);
@@ -155,7 +155,7 @@
      * @param mimeType  the MIME type
      * @param ds        a DataSource for the data
      * @return the CommandInfo objects representing all the commands.
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public CommandInfo[] getAllCommands(String mimeType, DataSource ds) {
         return getAllCommands(mimeType);
@@ -183,7 +183,7 @@
      * @param cmdName   the command name
      * @param ds        a DataSource for the data
      * @return the CommandInfo corresponding to the command.
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public CommandInfo getCommand(String mimeType, String cmdName,
                                 DataSource ds) {
@@ -215,7 +215,7 @@
      * @param mimeType  the MIME type
      * @param ds        a DataSource for the data
      * @return          the DataContentHandler for the MIME type
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public DataContentHandler createDataContentHandler(String mimeType,
                                 DataSource ds) {
@@ -228,7 +228,7 @@
      * null is returned.
      *
      * @return          array of MIME types as strings, or null if not supported
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public String[] getMimeTypes() {
         return null;
--- a/jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java	Fri Aug 08 12:54:39 2014 -0700
@@ -603,7 +603,7 @@
      * Get all the MIME types known to this command map.
      *
      * @return          array of MIME types as strings
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public synchronized String[] getMimeTypes() {
         List mtList = new ArrayList();
@@ -639,7 +639,7 @@
      * MIME type are returned.
      *
      * @return          array of native command entries
-     * @since   JAF 1.1
+     * @since   1.6, JAF 1.1
      */
     public synchronized String[] getNativeCommands(String mimeType) {
         List cmdList = new ArrayList();
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -58,7 +58,7 @@
  * This class is responsible for whitespace normalization.
  *
  * @author <ul><li>Ryan Shoemaker, Martin Grebac</li></ul>
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @deprecated in JAXB 2.2.4 - use javax.xml.bind.DatatypeConverterImpl instead
  * or let us know why you can't
  */
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,7 +31,7 @@
 /**
  * Formats error messages.
  *
- * @since JAXB2.1.10
+ * @since JAXB 2.1.10
  */
 
 enum Messages {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,7 +31,7 @@
 /**
  * Formats error messages.
  *
- * @since JAXB1.0
+ * @since JAXB 1.0
  */
 public class Messages
 {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -249,7 +249,7 @@
  *
  * @author David Megginson, david@megginson.com
  * @version 0.2
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @see org.xml.sax.XMLFilter
  * @see org.xml.sax.ContentHandler
  */
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java	Fri Aug 08 12:54:39 2014 -0700
@@ -55,7 +55,7 @@
  * classes like this.
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
- * @since JAXB1.0
+ * @since JAXB 1.0
  */
 public class DOMScanner implements LocatorEx,InfosetScanner/*<Node> --- but can't do this to protect 1.0 clients, or can I? */
 {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,7 +31,7 @@
 /**
  * Formats error messages.
  *
- * @since JAXB1.0
+ * @since JAXB 1.0
  */
 public class Messages
 {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -62,7 +62,7 @@
  * AttributeList} interface, it also includes a much more efficient
  * implementation using a single array rather than a set of Vectors.</p>
  *
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @since SAX 2.0
  * @author David Megginson
  * @version 2.0.1 (sax2r2)
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -262,7 +262,7 @@
  *
  * @author David Megginson, david@megginson.com
  * @version 0.2
- * @since JAXB1.0
+ * @since JAXB 1.0
  * @see org.xml.sax.XMLFilter
  * @see org.xml.sax.ContentHandler
  */
--- a/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java	Fri Aug 08 12:54:39 2014 -0700
@@ -43,7 +43,7 @@
  * <p>The comment element is a place holder for any comments that the code
  * generator may want to include in the generated code.</p>
  *
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java	Fri Aug 08 12:54:39 2014 -0700
@@ -70,9 +70,10 @@
  * <li>If the method throws an unchecked exception the class MUST NOT be put into
  * service except in the case of EJBs where the EJB can handle exceptions and
  * even recover from them.</li></ul>
- * @since Common Annotations 1.0
+ *
  * @see javax.annotation.PreDestroy
  * @see javax.annotation.Resource
+ * @since 1.6, Common Annotations 1.0
  */
 @Documented
 @Retention (RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java	Fri Aug 08 12:54:39 2014 -0700
@@ -72,7 +72,7 @@
  *
  * @see javax.annotation.PostConstruct
  * @see javax.annotation.Resource
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/annotation/Resource.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/Resource.java	Fri Aug 08 12:54:39 2014 -0700
@@ -48,7 +48,7 @@
  * appear on private fields and methods of superclasses; the container
  * is required to perform injection in these cases as well.
  *
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 @Target({TYPE, FIELD, METHOD})
 @Retention(RUNTIME)
@@ -66,7 +66,7 @@
      * The name of the resource that the reference points to. It can
      * link to any compatible resource using the global JNDI names.
      *
-     * @since Common Annotations 1.1
+     * @since 1.7, Common Annotations 1.1
      */
 
     String lookup() default "";
--- a/jaxws/src/share/jaxws_classes/javax/annotation/Resources.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/Resources.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,7 +32,7 @@
  * This class is used to allow multiple resources declarations.
  *
  * @see javax.annotation.Resource
- * @since Common Annotations 1.0
+ * @since 1.6, Common Annotations 1.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/jws/HandlerChain.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/HandlerChain.java	Fri Aug 08 12:54:39 2014 -0700
@@ -28,6 +28,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE, METHOD, FIELD})
 public @interface HandlerChain {
--- a/jaxws/src/share/jaxws_classes/javax/jws/Oneway.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/Oneway.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({METHOD})
 public @interface Oneway {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebMethod.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebMethod.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({METHOD})
 public @interface WebMethod {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebParam.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebParam.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({PARAMETER})
 public @interface WebParam {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebResult.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebResult.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({METHOD})
 public @interface WebResult {
--- a/jaxws/src/share/jaxws_classes/javax/jws/WebService.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/WebService.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE})
 public @interface WebService {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/InitParam.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/InitParam.java	Fri Aug 08 12:54:39 2014 -0700
@@ -25,7 +25,8 @@
 
 package javax.jws.soap;
 
-/*
+/**
+ * @since 1.6
  * @Deprecated
  */
 @Deprecated public @interface InitParam {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,9 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
+/**
+ * @since 1.6
+ */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE,METHOD})
 public @interface SOAPBinding {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -25,7 +25,8 @@
 
 package javax.jws.soap;
 
-/*
+/**
+ * @since 1.6
  * @Deprecated
  */
 @Deprecated public @interface SOAPMessageHandler {
--- a/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,7 +27,8 @@
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 
-/*
+/**
+ * @since 1.6
  * @Deprecated
  */
 @Retention(value=RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Binder.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Binder.java	Fri Aug 08 12:54:39 2014 -0700
@@ -76,7 +76,7 @@
  *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
  *     Joseph Fialli
  *
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public abstract class Binder<XmlNode> {
     /**
@@ -153,7 +153,7 @@
      *     binding.
      * @throws IllegalArgumentException
      *      If any of the input parameters are null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public abstract <T> JAXBElement<T>
         unmarshal( XmlNode xmlNode, Class<T> declaredType )
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,7 +34,7 @@
  * is a checked exception.
  *
  * @see JAXB
- * @since JAXB2.1
+ * @since 1.6, JAXB 2.1
  */
 public class DataBindingException extends RuntimeException {
     public DataBindingException(String message, Throwable cause) {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -88,7 +88,7 @@
  * @see DatatypeConverterInterface
  * @see ParseConversionEvent
  * @see PrintConversionEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 final public class DatatypeConverter {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -49,7 +49,7 @@
  * This class is responsible for whitespace normalization.
  *
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @since JAXB2.1
+ * @since JAXB 2.1
  */
 final class DatatypeConverterImpl implements DatatypeConverterInterface {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java	Fri Aug 08 12:54:39 2014 -0700
@@ -78,7 +78,7 @@
  * @see DatatypeConverter
  * @see ParseConversionEvent
  * @see PrintConversionEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 public interface DatatypeConverterInterface {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Element.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Element.java	Fri Aug 08 12:54:39 2014 -0700
@@ -35,7 +35,7 @@
  * and 5.7.1 "Bind to Java Element Interface" of the specification.
  *
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 public interface Element {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXB.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXB.java	Fri Aug 08 12:54:39 2014 -0700
@@ -92,7 +92,7 @@
  * a non-null value.
  *
  * @author Kohsuke Kawaguchi
- * @since 2.1
+ * @since 1.6, JAXB 2.1
  */
 public final class JAXB {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -257,7 +257,7 @@
  * @see Marshaller
  * @see Unmarshaller
  * @see S 7.4.1 "Named Packages" in Java Language Specification</a>
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public abstract class JAXBContext {
 
@@ -423,7 +423,7 @@
      *   <li>failure to locate a value for the context factory provider property</li>
      *   <li>mixing schema derived packages from different providers on the same contextPath</li>
      * </ol>
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static JAXBContext newInstance( String contextPath, ClassLoader classLoader, Map<String,?>  properties  )
         throws JAXBException {
@@ -497,7 +497,7 @@
 //     * @throws IllegalArgumentException
 //     *      if the parameter contains {@code null} (i.e., {@code newInstance(null);})
 //     *
-//     * @since JAXB2.0
+//     * @since JAXB 2.0
 //     */
 //    public static JAXBContext newInstance( Source[] externalBindings, Class... classesToBeBound )
 //        throws JAXBException {
@@ -576,7 +576,7 @@
      * @throws IllegalArgumentException
      *      if the parameter contains {@code null} (i.e., {@code newInstance(null);})
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static JAXBContext newInstance( Class... classesToBeBound )
         throws JAXBException {
@@ -622,7 +622,7 @@
      * @throws IllegalArgumentException
      *      if the parameter contains {@code null} (i.e., {@code newInstance(null,someMap);})
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static JAXBContext newInstance( Class[] classesToBeBound, Map<String,?> properties )
         throws JAXBException {
@@ -692,7 +692,7 @@
      *      if DOM API corresponding to <tt>domType</tt> is not supported by
      *      the implementation.
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> Binder<T> createBinder(Class<T> domType) {
         // to make JAXB 1.0 implementations work, this method must not be
@@ -705,7 +705,7 @@
      *
      * @return always a new valid <tt>Binder</tt> object.
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Binder<Node> createBinder() {
         return createBinder(Node.class);
@@ -722,7 +722,7 @@
      *      Calling this method on JAXB 1.0 implementations will throw
      *      an UnsupportedOperationException.
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public JAXBIntrospector createJAXBIntrospector() {
         // to make JAXB 1.0 implementations work, this method must not be
@@ -744,7 +744,7 @@
      *      Calling this method on JAXB 1.0 implementations will throw
      *      an UnsupportedOperationException.
      *
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void generateSchema(SchemaOutputResolver outputResolver) throws IOException  {
         // to make JAXB 1.0 implementations work, this method must not be
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -58,7 +58,7 @@
  * </p>
  *
  * @author Kohsuke Kawaguchi, Joe Fialli
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 
 public class JAXBElement<T> implements Serializable {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,7 +34,7 @@
  * @see JAXBContext
  * @see Marshaller
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class JAXBException extends Exception {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java	Fri Aug 08 12:54:39 2014 -0700
@@ -41,7 +41,7 @@
  * {@link JAXBContext#createJAXBIntrospector()}.
  *
  * @see JAXBContext#createJAXBIntrospector()
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public abstract class JAXBIntrospector {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java	Fri Aug 08 12:54:39 2014 -0700
@@ -73,7 +73,7 @@
  * @see java.lang.SecurityManager
  *
  * @author Joe Fialli
- * @since JAXB 2.2
+ * @since 1.7, JAXB 2.2
  */
 
 /* code was borrowed originally from java.lang.RuntimePermission. */
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/MarshalException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/MarshalException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -38,7 +38,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
  * @see JAXBException
  * @see Marshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class MarshalException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java	Fri Aug 08 12:54:39 2014 -0700
@@ -311,7 +311,7 @@
  * @see JAXBContext
  * @see Validator
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface Marshaller {
 
@@ -421,7 +421,7 @@
      *      Marshalling a JAXB element</a>.
      * @throws IllegalArgumentException
      *      If any of the method parameters are null
-     * @since JAXB2.1
+     * @since 1.6, JAXB 2.1
      */
     public void marshal( Object jaxbElement, File output )
         throws JAXBException;
@@ -515,7 +515,7 @@
      *      Marshalling a JAXB element</a>.
      * @throws IllegalArgumentException
      *      If any of the method parameters are null
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void marshal( Object jaxbElement, javax.xml.stream.XMLStreamWriter writer )
         throws JAXBException;
@@ -539,7 +539,7 @@
      *      Marshalling a JAXB element</a>.
      * @throws IllegalArgumentException
      *      If any of the method parameters are null
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void marshal( Object jaxbElement, javax.xml.stream.XMLEventWriter writer )
         throws JAXBException;
@@ -655,7 +655,7 @@
      *      if the adapter parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setAdapter( XmlAdapter adapter );
 
@@ -684,7 +684,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
 
@@ -697,7 +697,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB 2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> A getAdapter( Class<A> type );
 
@@ -730,7 +730,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Marshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setSchema( Schema schema );
 
@@ -745,7 +745,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Marshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Schema getSchema();
 
@@ -766,7 +766,7 @@
      *
      * @see Marshaller#setListener(Listener)
      * @see Marshaller#getListener()
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static abstract class Listener {
         /**
@@ -807,7 +807,7 @@
      * One can unregister current Listener by setting listener to <tt>null</tt>.
      *
      * @param listener an instance of a class that implements {@link Listener}
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setListener(Listener listener);
 
@@ -815,7 +815,7 @@
      * <p>Return {@link Listener} registered with this {@link Marshaller}.
      *
      * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Marshaller.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Listener getListener();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,7 +32,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see Validator
  * @see ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface NotIdentifiableEvent extends ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,7 +33,7 @@
  * @see ValidationEvent
  * @see ValidationEventHandler
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ParseConversionEvent extends ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,7 +33,7 @@
  * @see ValidationEvent
  * @see ValidationEventHandler
  * @see Marshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface PrintConversionEvent extends ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -35,7 +35,7 @@
  * @see JAXBContext
  * @see Validator
  * @see Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class PropertyException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,6 +42,7 @@
  *
  * @author
  *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @since 1.6
  */
 public abstract class SchemaOutputResolver {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,7 +42,7 @@
  *
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see ValidationEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 
 public class TypeConstraintException extends java.lang.RuntimeException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,7 +40,7 @@
  * @see JAXBException
  * @see Unmarshaller
  * @see ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class UnmarshalException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java	Fri Aug 08 12:54:39 2014 -0700
@@ -404,7 +404,7 @@
  * @see JAXBContext
  * @see Marshaller
  * @see Validator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface Unmarshaller {
 
@@ -474,7 +474,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If the InputStream parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Object unmarshal( Reader reader ) throws JAXBException;
 
@@ -571,7 +571,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( org.w3c.dom.Node node, Class<T> declaredType ) throws JAXBException;
 
@@ -660,7 +660,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( javax.xml.transform.Source source, Class<T> declaredType )
         throws JAXBException;
@@ -696,7 +696,7 @@
      * @throws IllegalStateException
      *      If <tt>reader</tt> is not pointing to a START_DOCUMENT or
      *      START_ELEMENT  event.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      * @see #unmarshal(javax.xml.stream.XMLStreamReader, Class)
      */
     public Object unmarshal( javax.xml.stream.XMLStreamReader reader )
@@ -731,7 +731,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLStreamReader reader, Class<T> declaredType ) throws JAXBException;
 
@@ -766,7 +766,7 @@
      * @throws IllegalStateException
      *      If <tt>reader</tt> is not pointing to a START_DOCUMENT or
      *      START_ELEMENT event.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      * @see #unmarshal(javax.xml.stream.XMLEventReader, Class)
      */
     public Object unmarshal( javax.xml.stream.XMLEventReader reader )
@@ -802,7 +802,7 @@
      *     binding.  See <a href="#unmarshalEx">Unmarshalling XML Data</a>
      * @throws IllegalArgumentException
      *      If any parameter is null
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLEventReader reader, Class<T> declaredType ) throws JAXBException;
 
@@ -962,7 +962,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Unmarshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setSchema( javax.xml.validation.Schema schema );
 
@@ -986,7 +986,7 @@
      * @throws UnsupportedOperationException could be thrown if this method is
      *         invoked on an Unmarshaller created from a JAXBContext referencing
      *         JAXB 1.0 mapped classes
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public javax.xml.validation.Schema getSchema();
 
@@ -1001,7 +1001,7 @@
      *      if the adapter parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void setAdapter( XmlAdapter adapter );
 
@@ -1030,7 +1030,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
 
@@ -1043,7 +1043,7 @@
      *      if the type parameter is null.
      * @throws UnsupportedOperationException
      *      if invoked agains a JAXB 1.0 implementation.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public <A extends XmlAdapter> A getAdapter( Class<A> type );
 
@@ -1081,7 +1081,7 @@
      * (@link #setListener(Listener)}
      * (@link #getListener()}
      *
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public static abstract class Listener {
         /**
@@ -1128,7 +1128,7 @@
      * One can unregister current Listener by setting listener to <tt>null</tt>.
      *
      * @param listener  provides unmarshal event callbacks for this {@link Unmarshaller}
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public void     setListener(Listener listener);
 
@@ -1136,7 +1136,7 @@
      * <p>Return {@link Listener} registered with this {@link Unmarshaller}.
      *
      * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Unmarshaller.
-     * @since JAXB2.0
+     * @since 1.6, JAXB 2.0
      */
     public Listener getListener();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -57,7 +57,7 @@
  *
  * @author <ul><li>Kohsuke KAWAGUCHI, Sun Microsystems, Inc.</li></ul>
  * @see Unmarshaller#getUnmarshallerHandler()
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface UnmarshallerHandler extends ContentHandler
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,7 +34,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see Validator
  * @see ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ValidationEvent {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -65,7 +65,7 @@
  * @see Marshaller
  * @see ValidationEvent
  * @see javax.xml.bind.util.ValidationEventCollector
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ValidationEventHandler {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,7 +40,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
  * @see Validator
  * @see ValidationEvent
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public interface ValidationEventLocator {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -38,7 +38,7 @@
  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
  * @see JAXBException
  * @see Validator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationException extends JAXBException {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Validator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Validator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -154,7 +154,7 @@
  * @see ValidationEventHandler
  * @see ValidationEvent
  * @see javax.xml.bind.util.ValidationEventCollector
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  * @deprecated since JAXB 2.0
  */
 public interface Validator {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -49,7 +49,7 @@
  * be called from applications.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public interface DomHandler<ElementT,ResultT extends Result> {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,7 +40,7 @@
  * {@link DomHandler} implementation for W3C DOM (<code>org.w3c.dom</code> package.)
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public class W3CDomHandler implements DomHandler<Element,DOMResult> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,7 +30,7 @@
  * fields in a JAXB bound class.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessorOrder
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,7 +32,7 @@
  * properties.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessorType
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java	Fri Aug 08 12:54:39 2014 -0700
@@ -70,7 +70,7 @@
  *    following annotations at the package level: {@link XmlJavaTypeAdapter}.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessOrder
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java	Fri Aug 08 12:54:39 2014 -0700
@@ -84,7 +84,7 @@
  *    following annotations at the package level: {@link XmlJavaTypeAdapter}.
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAccessType
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java	Fri Aug 08 12:54:39 2014 -0700
@@ -66,7 +66,7 @@
  * map's key. The key's value is the String value of the attribute.
  *
  * @author Kohsuke Kawaguchi, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -243,7 +243,7 @@
  * </pre>
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java	Fri Aug 08 12:54:39 2014 -0700
@@ -66,7 +66,7 @@
  * The above binding supports WS-I AP 1.0 <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html#Referencing_Attachments_from_the_SOAP_Envelope">WS-I Attachments Profile Version 1.0.</a>
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD,PARAMETER})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java	Fri Aug 08 12:54:39 2014 -0700
@@ -122,7 +122,7 @@
  * </pre>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlType
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -134,7 +134,7 @@
  *
  * <p>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD, PARAMETER})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -130,7 +130,7 @@
  * name "foo".
  *
  * @see XmlRegistry
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java	Fri Aug 08 12:54:39 2014 -0700
@@ -216,7 +216,7 @@
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems,Inc. </li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
  * @see XmlElementRefs
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
@@ -284,7 +284,7 @@
      * For compatibility with JAXB 2.1, this property defaults to <tt>true</tt>,
      * despite the fact that {@link XmlElement#required()} defaults to false.
      *
-     * @since 2.2
+     * @since 1.7, JAXB 2.2
      */
     boolean required() default true;
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java	Fri Aug 08 12:54:39 2014 -0700
@@ -50,7 +50,7 @@
  *
  * @see XmlElementWrapper
  * @see XmlElementRef
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java	Fri Aug 08 12:54:39 2014 -0700
@@ -87,7 +87,7 @@
  * @see XmlElements
  * @see XmlElementRef
  * @see XmlElementRefs
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  *
  */
 
@@ -139,7 +139,7 @@
      * simply a mechanism to let users express their application constraints
      * better.
      *
-     * @since JAXB 2.1
+     * @since 1.6, JAXB 2.1
      */
     boolean required() default false;
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java	Fri Aug 08 12:54:39 2014 -0700
@@ -166,7 +166,7 @@
  * @see XmlElementRef
  * @see XmlElementRefs
  * @see XmlJavaTypeAdapter
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({FIELD,METHOD})
 public @interface XmlElements {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java	Fri Aug 08 12:54:39 2014 -0700
@@ -62,7 +62,7 @@
  *
  * <p><b>Examples:</b> See examples in {@link XmlEnumValue}
  *
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java	Fri Aug 08 12:54:39 2014 -0700
@@ -114,7 +114,7 @@
  *     &lt;/xs:simpleType>
  * </pre>
  *
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java	Fri Aug 08 12:54:39 2014 -0700
@@ -87,7 +87,7 @@
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlIDREF
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java	Fri Aug 08 12:54:39 2014 -0700
@@ -243,7 +243,7 @@
  * </pre>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlID
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java	Fri Aug 08 12:54:39 2014 -0700
@@ -51,7 +51,7 @@
  * ever called for the property. The binary data will always be inlined.
  *
  * @author Joseph Fialli
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD,TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java	Fri Aug 08 12:54:39 2014 -0700
@@ -104,7 +104,7 @@
  *  </ul>
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({FIELD,METHOD,PARAMETER})
 public @interface XmlList {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java	Fri Aug 08 12:54:39 2014 -0700
@@ -47,7 +47,7 @@
  * the value of the attribute takes precedence and that will control the marshalling.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD,PARAMETER})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java	Fri Aug 08 12:54:39 2014 -0700
@@ -124,7 +124,7 @@
  * <p>See "Package Specification" in javax.xml.bind.package javadoc for
  * additional common information.</p>
  * @author Kohsuke Kawaguchi
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({FIELD,METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,7 +42,7 @@
  *
  * <p><b>Example:</b>See <tt>XmlSchema</tt> annotation type for an example.
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java	Fri Aug 08 12:54:39 2014 -0700
@@ -61,6 +61,6 @@
  * </table>
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 public enum XmlNsForm {UNQUALIFIED, QUALIFIED, UNSET}
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,7 +34,7 @@
  * Marks a class that has {@link XmlElementDecl}s.
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlElementDecl
  */
 @Retention(RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -155,7 +155,7 @@
  * </pre>
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME)
 @Target({TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java	Fri Aug 08 12:54:39 2014 -0700
@@ -114,7 +114,7 @@
  * </pre>
 
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target(PACKAGE)
@@ -191,7 +191,7 @@
      * such attribute), for example so that the user can specify a local
      * copy of the resource through the command line interface.
      *
-     * @since JAXB2.1
+     * @since 1.6, JAXB 2.1
      */
     String location() default NO_LOCATION;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java	Fri Aug 08 12:54:39 2014 -0700
@@ -83,7 +83,7 @@
  *     }
  * </pre>
  *
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD,METHOD,PACKAGE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java	Fri Aug 08 12:54:39 2014 -0700
@@ -50,7 +50,7 @@
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
  * @see XmlSchemaType
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({PACKAGE})
 public @interface XmlSchemaTypes {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java	Fri Aug 08 12:54:39 2014 -0700
@@ -70,7 +70,7 @@
  * correctly bind <tt>Dog</tt> and <tt>Cat</tt>.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB2.1
+ * @since 1.6, JAXB 2.1
  */
 @Target({ElementType.TYPE})
 @Retention(RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java	Fri Aug 08 12:54:39 2014 -0700
@@ -88,7 +88,7 @@
  * </pre>
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD, TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java	Fri Aug 08 12:54:39 2014 -0700
@@ -379,7 +379,7 @@
  * @see XmlAttribute
  * @see XmlValue
  * @see XmlSchema
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({TYPE})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java	Fri Aug 08 12:54:39 2014 -0700
@@ -124,7 +124,7 @@
  *
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @see XmlType
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 
 @Retention(RUNTIME) @Target({FIELD, METHOD})
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -35,7 +35,7 @@
  * sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public class CollapsedStringAdapter extends XmlAdapter<String,String> {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,7 +34,7 @@
  * This {@link XmlAdapter} binds <tt>byte[]</tt> to the hexBinary representation in XML.
  *
  * @author Kohsuke Kawaguchi
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public final class HexBinaryAdapter extends XmlAdapter<String,byte[]> {
     public byte[] unmarshal(String s) {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -35,7 +35,7 @@
  * as specified in <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">the whitespace facet 'replace'</a>
  *
  * @author Kohsuke Kawaguchi, Martin Grebac
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public final class NormalizedStringAdapter extends XmlAdapter<String,String> {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -160,7 +160,7 @@
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems Inc.</li> <li> Kohsuke Kawaguchi, Sun Microsystems Inc.</li></ul>
  * @see XmlJavaTypeAdapter
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  */
 public abstract class XmlAdapter<ValueType,BoundType> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -86,7 +86,7 @@
  * <p><b> Example: </b> See example in {@link XmlAdapter}
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems Inc.</li> <li> Kohsuke Kawaguchi, Sun Microsystems Inc.</li></ul>
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  * @see XmlAdapter
  */
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java	Fri Aug 08 12:54:39 2014 -0700
@@ -51,7 +51,7 @@
  *
  * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
  * @see XmlJavaTypeAdapter
- * @since JAXB2.0
+ * @since 1.6, JAXB 2.0
  */
 @Retention(RUNTIME) @Target({PACKAGE})
 public @interface XmlJavaTypeAdapters {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/package.html	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/package.html	Fri Aug 08 12:54:39 2014 -0700
@@ -279,7 +279,7 @@
         </table>
 
         <!-- Put @see and @since tags down here. -->
-        @since JAXB 2.0
+        @since 1.6, JAXB 2.0
     </body>
 </html>
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java	Fri Aug 08 12:54:39 2014 -0700
@@ -50,7 +50,7 @@
  * @author Marc Hadley
  * @author Kohsuke Kawaguchi
  * @author Joseph Fialli
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  *
  * @see Marshaller#setAttachmentMarshaller(AttachmentMarshaller)
  *
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java	Fri Aug 08 12:54:39 2014 -0700
@@ -56,7 +56,7 @@
  * @author Kohsuke Kawaguchi
  * @author Joseph Fialli
  *
- * @since JAXB 2.0
+ * @since 1.6, JAXB 2.0
  *
  * @see javax.xml.bind.Unmarshaller#setAttachmentUnmarshaller(AttachmentUnmarshaller)
  *
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/package.html	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/attachment/package.html	Fri Aug 08 12:54:39 2014 -0700
@@ -61,7 +61,7 @@
         </ul>
 
         <!-- Put @see and @since tags down here. -->
-        @since JAXB 2.0
+        @since 1.6, JAXB 2.0
     </body>
 </html>
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -62,7 +62,7 @@
  *
  * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
  * @see javax.xml.bind.Marshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public abstract class AbstractMarshallerImpl implements Marshaller
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -68,7 +68,7 @@
  *         <li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li>
  *         </ul>
  * @see javax.xml.bind.Unmarshaller
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public abstract class AbstractUnmarshallerImpl implements Unmarshaller
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -52,7 +52,7 @@
  * @see javax.xml.bind.Unmarshaller
  * @see javax.xml.bind.Validator
  * @see javax.xml.bind.ValidationEventHandler
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class DefaultValidationEventHandler implements ValidationEventHandler {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -41,7 +41,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class NotIdentifiableEventImpl
     extends ValidationEventImpl
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,7 +42,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ParseConversionEventImpl
     extends ValidationEventImpl
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,7 +42,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class PrintConversionEventImpl
     extends ValidationEventImpl
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -43,7 +43,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationEventImpl implements ValidationEvent
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -47,7 +47,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationEventLocatorImpl implements ValidationEventLocator
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java	Fri Aug 08 12:54:39 2014 -0700
@@ -71,6 +71,7 @@
  *
  * @author
  *      Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @since 1.6
  */
 public class JAXBResult extends SAXResult {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java	Fri Aug 08 12:54:39 2014 -0700
@@ -87,6 +87,7 @@
  *
  * @author
  *      Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
+ * @since 1.6
  */
 public class JAXBSource extends SAXSource {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java	Fri Aug 08 12:54:39 2014 -0700
@@ -45,7 +45,7 @@
  * @see javax.xml.bind.ValidationEventHandler
  * @see javax.xml.bind.ValidationEvent
  * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
+ * @since 1.6, JAXB 1.0
  */
 public class ValidationEventCollector implements ValidationEventHandler
 {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java	Fri Aug 08 12:54:39 2014 -0700
@@ -114,6 +114,8 @@
  * <PRE>
  *     ap1.clearContent();
  * </PRE>
+ *
+ * @since 1.6
  */
 
 public abstract class AttachmentPart {
@@ -190,7 +192,7 @@
      *      <code>AttachmentPart</code> object or if there was a data
      *      transformation error.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      * @see #getRawContentBytes
      */
     public abstract InputStream getRawContent() throws SOAPException;
@@ -208,7 +210,7 @@
      *      <code>AttachmentPart</code> object or if there was a data
      *      transformation error.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract byte[] getRawContentBytes() throws SOAPException;
 
@@ -225,7 +227,7 @@
      *      <code>AttachmentPart</code> object or if there was a data
      *      transformation error.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract InputStream getBase64Content() throws SOAPException;
 
@@ -267,7 +269,7 @@
      *
      * @exception SOAPException if an there is an error in setting the content
      * @exception NullPointerException if <code>content</code> is null
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void setRawContent(InputStream content, String contentType) throws SOAPException;
 
@@ -285,7 +287,7 @@
      *
      * @exception SOAPException if an there is an error in setting the content
      * or content is null
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void setRawContentBytes(
         byte[] content, int offset, int len,  String contentType)
@@ -309,7 +311,7 @@
      * @exception SOAPException if an there is an error in setting the content
      * @exception NullPointerException if <code>content</code> is null
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void setBase64Content(
         InputStream content, String contentType) throws SOAPException;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java	Fri Aug 08 12:54:39 2014 -0700
@@ -56,6 +56,8 @@
  *    d.addDetailEntry(name);
  *    Iterator it = d.getDetailEntries();
  * </PRE>
+ *
+ * @since 1.6
  */
 public interface Detail extends SOAPFaultElement {
 
@@ -85,7 +87,7 @@
      * DetailEntry object to this Detail object.
      *
      * @see Detail#addDetailEntry(Name name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public DetailEntry addDetailEntry(QName qname) throws SOAPException;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,8 @@
  * a <code>SOAPFault</code> object.  A <code>DetailEntry</code> object,
  * which carries information about errors related to the <code>SOAPBody</code>
  * object that contains it, is application-specific.
+ *
+ * @since 1.6
  */
 public interface DetailEntry extends SOAPElement {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -63,6 +63,8 @@
  *        This method can be used internally by a service implementation to
  *        create a message that is a response to a request.
  * </UL>
+ *
+ * @since 1.6
  */
 public abstract class MessageFactory {
 
@@ -140,7 +142,7 @@
      * @exception SOAPException if there was an error in creating the
      *            specified implementation of  <code>MessageFactory</code>.
      * @see SAAJMetaFactory
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static MessageFactory newInstance(String protocol) throws SOAPException {
         return SAAJMetaFactory.getInstance().newMessageFactory(protocol);
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,6 +32,7 @@
  * object.
  *
  * @see MimeHeaders
+ * @since 1.6
  */
 public class MimeHeader {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,6 +39,7 @@
  * API.
  * @see SOAPMessage#getAttachments
  * @see AttachmentPart
+ * @since 1.6
  */
 public class MimeHeaders {
     private Vector headers;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Name.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Name.java	Fri Aug 08 12:54:39 2014 -0700
@@ -73,6 +73,7 @@
  * in favor of <code>javax.xml.namespace.QName<code>
  * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
  * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
+ * @since 1.6
  */
 public interface Name {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Node.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Node.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,8 @@
  * This interface extnends the standard DOM Node interface with methods for
  * getting and setting the value of a node, for
  * getting and setting the parent of a node, and for removing a node.
+ *
+ * @since 1.6
  */
 public interface Node extends org.w3c.dom.Node {
     /**
@@ -61,7 +63,7 @@
      *              node and either has more than one child node or has a child
      *              node that is not a <code>Text</code> node.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setValue(String value);
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -38,7 +38,7 @@
 * class.
 *
 * @author SAAJ RI Development Team
-* @since SAAJ 1.3
+* @since 1.6, SAAJ 1.3
 */
 
 public abstract class SAAJMetaFactory {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java	Fri Aug 08 12:54:39 2014 -0700
@@ -35,7 +35,7 @@
  *
  * @author XWS-Security Development Team
  *
- * @since SAAJ 1.3
+ * @since 1.6, SAAJ 1.3
  */
 public class SAAJResult extends DOMResult {
 
@@ -53,7 +53,7 @@
      *
      * @throws SOAPException if there is a problem creating a <code>SOAPMessage</code>
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult() throws SOAPException {
         this(MessageFactory.newInstance().createMessage());
@@ -79,7 +79,7 @@
      * @throws SOAPException if a <code>SOAPMessage</code> supporting the
      *             specified protocol cannot be created
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult(String protocol) throws SOAPException {
         this(MessageFactory.newInstance(protocol).createMessage());
@@ -99,7 +99,7 @@
      *                  populated as a result of some transformation or
      *                  marshalling operation
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult(SOAPMessage message) {
         super(message.getSOAPPart());
@@ -116,7 +116,7 @@
      *
      * @param rootNode - the root to which the results will be appended
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SAAJResult(SOAPElement rootNode) {
         super(rootNode);
@@ -125,7 +125,7 @@
 
     /**
      * @return the resulting Tree that was created under the specified root Node.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public javax.xml.soap.Node getResult() {
         return (javax.xml.soap.Node)super.getNode().getFirstChild();
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,6 +42,7 @@
  * error information, is an example of a <code>SOAPBodyElement</code> object.
  *
  * @see SOAPFault
+ * @since 1.6
  */
 public interface SOAPBody extends SOAPElement {
 
@@ -90,7 +91,7 @@
      * @exception SOAPException if there is a SOAP error
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException;
 
@@ -127,7 +128,7 @@
      * @see SOAPFault#setFaultString
      * @see SOAPBody#addFault(Name faultCode, String faultString, Locale locale)
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPFault addFault(QName faultCode, String faultString, Locale locale)
         throws SOAPException;
@@ -164,7 +165,7 @@
      *                if there is a SOAP error
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public SOAPFault addFault(Name faultCode, String faultString)
         throws SOAPException;
@@ -202,7 +203,7 @@
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
      * @see SOAPBody#addFault(Name faultCode, String faultString)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPFault addFault(QName faultCode, String faultString)
         throws SOAPException;
@@ -252,7 +253,7 @@
      * @exception SOAPException
      *                if a SOAP error occurs
      * @see SOAPBody#addBodyElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
 
@@ -272,7 +273,7 @@
      *         that was added.
      * @exception SOAPException
      *                if the <code>Document</code> cannot be added
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public SOAPBodyElement addDocument(org.w3c.dom.Document document)
         throws SOAPException;
@@ -290,7 +291,7 @@
      *                if there is not exactly one child <code>SOAPElement</code> of the <code>
      *              <code>SOAPBody</code>.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public org.w3c.dom.Document extractContentAsDocument()
         throws SOAPException;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -38,6 +38,8 @@
  * <PRE>
  *    SOAPBodyElement sbe = sb.addBodyElement(myName);
  * </PRE>
+ *
+ * @since 1.6
  */
 public interface SOAPBodyElement extends SOAPElement {
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java	Fri Aug 08 12:54:39 2014 -0700
@@ -45,6 +45,8 @@
  * directly to a URL following the request/response paradigm.  That is,
  * messages are sent using the method <code>call</code>, which sends the
  * message and then waits until it gets a reply.
+ *
+ * @since 1.6
  */
 public abstract class SOAPConnection {
 
@@ -78,7 +80,7 @@
      * @return the <code>SOAPMessage</code> object that is the response to the
      *                  get message request
      * @throws SOAPException if there is a SOAP error
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPMessage get(Object to)
                                 throws SOAPException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,6 +32,8 @@
  * SAAJ communication infrastructure. Otherwise {@link SOAPConnection} objects
  * can be created by calling <code>createConnection()</code> on the newly
  * created <code>SOAPConnectionFactory</code> object.
+ *
+ * @since 1.6
  */
 public abstract class SOAPConnectionFactory {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java	Fri Aug 08 12:54:39 2014 -0700
@@ -29,6 +29,8 @@
 
 /**
  * The definition of constants pertaining to the SOAP protocol.
+ *
+ * @since 1.6
  */
 public interface SOAPConstants {
     /**
@@ -41,7 +43,7 @@
      * argument version of <code>createMessage</code>, an
      * <code>UnsupportedOperationException</code>.
      *
-     * @since  SAAJ 1.3
+     * @since  1.6, SAAJ 1.3
      */
     public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
 
@@ -49,7 +51,7 @@
      * Used to create <code>MessageFactory</code> instances that create
      * <code>SOAPMessages</code> whose behavior supports the SOAP 1.1  specification.
      *
-     * @since  SAAJ 1.3
+     * @since  1.6, SAAJ 1.3
      */
     public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
 
@@ -58,26 +60,26 @@
      * <code>SOAPMessages</code> whose behavior supports the SOAP 1.2
      * specification
      *
-     * @since  SAAJ 1.3
+     * @since  1.6, SAAJ 1.3
      */
     public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
 
     /**
      * The default protocol: SOAP 1.1 for backwards compatibility.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
 
     /**
      * The namespace identifier for the SOAP 1.1 envelope.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
                 URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
     /**
      * The namespace identifier for the SOAP 1.2 envelope.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
                 URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope";
@@ -102,21 +104,21 @@
 
     /**
      * The namespace identifier for the SOAP 1.2 encoding.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding";
 
     /**
      * The media type  of the <code>Content-Type</code> MIME header in SOAP 1.1.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         SOAP_1_1_CONTENT_TYPE = "text/xml";
 
     /**
      * The media type  of the <code>Content-Type</code> MIME header in SOAP 1.2.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
@@ -137,21 +139,21 @@
      * The URI identifying the next application processing a SOAP request as the intended
      * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2
      * specification).
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE + "/role/next";
 
     /**
      * The URI specifying the role None in SOAP 1.2.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE + "/role/none";
 
     /**
      * The URI identifying the ultimate receiver of the SOAP 1.2 message.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String
         URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER =
@@ -159,41 +161,41 @@
 
     /**
      * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final String SOAP_ENV_PREFIX = "env";
 
     /**
      * SOAP 1.2 VersionMismatch Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_VERSIONMISMATCH_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 MustUnderstand Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_MUSTUNDERSTAND_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 DataEncodingUnknown Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 Sender Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_SENDER_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX);
 
     /**
      * SOAP 1.2 Receiver Fault
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static final QName SOAP_RECEIVER_FAULT =
          new QName(URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX);
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,6 +40,8 @@
  * objects of the correct type. See {@link #getChildElements()} and
  * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
  * for details.
+ *
+ * @since 1.6
  */
 public interface SOAPElement extends Node, org.w3c.dom.Element {
 
@@ -74,7 +76,7 @@
      * @exception SOAPException if there is an error in creating the
      *                          <code>SOAPElement</code> object
      * @see SOAPElement#addChildElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPElement addChildElement(QName qname) throws SOAPException;
 
@@ -173,7 +175,7 @@
      * is also useful for recycling portions of a document within a SOAP
      * message.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public abstract void removeContents();
 
@@ -224,7 +226,7 @@
                                 an attribute with <code>QName</code>
                                 <code>qname</code> on this SOAPElement.
      * @see SOAPElement#addAttribute(Name, String)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPElement addAttribute(QName qname, String value)
         throws SOAPException;
@@ -261,7 +263,7 @@
      * @return a <code>String</code> giving the value of the specified
      *         attribute, Null if there is no such attribute
      * @see SOAPElement#getAttributeValue(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getAttributeValue(QName qname);
 
@@ -287,7 +289,7 @@
      *
      * @return an iterator over the QNames of the attributes
      * @see SOAPElement#getAllAttributes()
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getAllAttributesAsQNames();
 
@@ -322,7 +324,7 @@
      * @return an iterator over the namespace prefixes are within scope of this
      *         <code>SOAPElement</code> object
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator getVisibleNamespacePrefixes();
 
@@ -348,7 +350,7 @@
      *
      * @exception SOAPException if the <code>QName</code> cannot be created.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public QName createQName(String localName, String prefix)
         throws SOAPException;
@@ -366,7 +368,7 @@
      * @return a <code>QName</code> object with the qname of this
      *         <code>SOAPElement</code> object
      * @see SOAPElement#getElementName()
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public QName getElementQName();
 
@@ -386,7 +388,7 @@
     *                          is not allowed.
     * @return The renamed Node
     *
-    * @since SAAJ 1.3
+    * @since 1.6, SAAJ 1.3
     */
    public SOAPElement setElementQName(QName newName) throws SOAPException;
 
@@ -409,7 +411,7 @@
      * @return <code>true</code> if the attribute was
      *         removed successfully; <code>false</code> if it was not
      * @see SOAPElement#removeAttribute(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public boolean removeAttribute(QName qname);
 
@@ -496,7 +498,7 @@
      *         in this <code>SOAPElement</code> object with the
      *         specified qname
      * @see SOAPElement#getChildElements(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getChildElements(QName qname);
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -37,6 +37,7 @@
  * inserted.
  * @deprecated - Use <code>javax.xml.soap.SOAPFactory</code> for creating SOAPElements.
  * @see javax.xml.soap.SOAPFactory
+ * @since 1.6
  */
 public class SOAPElementFactory {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java	Fri Aug 08 12:54:39 2014 -0700
@@ -93,6 +93,8 @@
  *     Name name = se.createName("GetLastTradePrice", "WOMBAT",
  *                                "http://www.wombat.org/trader");
  * </PRE>
+ *
+ * @since 1.6
  */
 public interface SOAPEnvelope extends SOAPElement {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,6 +39,8 @@
  * the provider.  Reasons for embedding a <code>Throwable</code>
  * object include problems such as input/output errors or a parsing
  * problem, such as an error in parsing a header.
+ *
+ * @since 1.6
  */
 public class SOAPException extends Exception {
     private Throwable cause;
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -43,6 +43,7 @@
  * <code>javax.xml.soap.Detail</code> objects as well as
  * <code>java.xml.soap.Name</code> objects.
  *
+ * @since 1.6
  */
 public abstract class SOAPFactory {
 
@@ -77,7 +78,7 @@
      * @exception SOAPException if there is an error in creating the
      *            <code>SOAPElement</code> object
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPElement createElement(Element domElement) throws SOAPException {
         throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory.");
@@ -120,7 +121,7 @@
      * @exception SOAPException if there is an error in creating the
      *            <code>SOAPElement</code> object
      * @see SOAPFactory#createElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public  SOAPElement createElement(QName qname) throws SOAPException {
         throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory.");
@@ -188,7 +189,7 @@
      *@param faultCode the FaultCode for the fault
      *@return a <code>SOAPFault</code> object
      *@throws SOAPException if there is a SOAP error
-     *@since SAAJ 1.3
+     *@since 1.6, SAAJ 1.3
      */
     public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException;
 
@@ -196,7 +197,7 @@
      *Creates a new default <code>SOAPFault</code> object
      *@return a <code>SOAPFault</code> object
      *@throws SOAPException if there is a SOAP error
-     *@since SAAJ 1.3
+     *@since 1.6, SAAJ 1.3
      */
     public abstract SOAPFault createFault() throws SOAPException;
 
@@ -290,7 +291,7 @@
      * @exception SOAPException if there was an error creating the
      *            specified <code>SOAPFactory</code>
      * @see SAAJMetaFactory
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public static SOAPFactory newInstance(String protocol)
         throws SOAPException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,6 +42,8 @@
  * Depending on the <code>protocol</code> specified while creating the
  * <code>MessageFactory</code> instance,  a <code>SOAPFault</code> has
  * sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
+ *
+ * @since 1.6
  */
 public interface SOAPFault extends SOAPBodyElement {
 
@@ -72,7 +74,7 @@
      * @exception SOAPException if there was an error in adding the
      *            <i>faultcode</i> element to the underlying XML tree.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setFaultCode(Name faultCodeQName) throws SOAPException;
 
@@ -91,7 +93,7 @@
      * @see #setFaultCode(Name)
      * @see #getFaultCodeAsQName()
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setFaultCode(QName faultCodeQName) throws SOAPException;
 
@@ -128,7 +130,7 @@
      * @return a <code>Name</code> representing the faultcode
      * @see #setFaultCode(Name)
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Name getFaultCodeAsName();
 
@@ -141,7 +143,7 @@
      *
      * @see #setFaultCode(QName)
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public QName getFaultCodeAsQName();
 
@@ -158,7 +160,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Subcode.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getFaultSubcodes();
 
@@ -171,7 +173,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Subcode.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void removeAllFaultSubcodes();
 
@@ -187,7 +189,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Subcode.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void appendFaultSubcode(QName subcode) throws SOAPException;
 
@@ -270,7 +272,7 @@
      * @exception SOAPException if there was an error in adding the
      *            <code>faultString</code> to the underlying XML tree.
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setFaultString(String faultString, Locale locale)
         throws SOAPException;
@@ -315,7 +317,7 @@
      *          the fault string or <code>null</code> if no locale was specified
      * @see #setFaultString(String, Locale)
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Locale getFaultStringLocale();
 
@@ -327,7 +329,7 @@
      * @return true if this <code>SOAPFault</code> has a <code>Detail</code>
      * subelement and false otherwise.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public boolean hasDetail();
 
@@ -377,7 +379,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getFaultReasonLocales() throws SOAPException;
 
@@ -393,7 +395,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public Iterator getFaultReasonTexts() throws SOAPException;
 
@@ -414,7 +416,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getFaultReasonText(Locale locale) throws SOAPException;
 
@@ -441,7 +443,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Reason.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void addFaultReasonText(String text, java.util.Locale locale)
         throws SOAPException;
@@ -457,7 +459,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Node.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getFaultNode();
 
@@ -472,7 +474,7 @@
      *      support the SOAP 1.2 concept of Fault Node.
      *
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setFaultNode(String uri) throws SOAPException;
 
@@ -487,7 +489,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getFaultRole();
 
@@ -504,7 +506,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setFaultRole(String uri) throws SOAPException;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,6 +32,8 @@
  * <P>
  * Content is added to a <code>SOAPFaultElement</code> using the
  * <code>SOAPElement</code> method <code>addTextNode</code>.
+ *
+ * @since 1.6
  */
 public interface SOAPFaultElement extends SOAPElement {
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java	Fri Aug 08 12:54:39 2014 -0700
@@ -66,6 +66,7 @@
  * </PRE>
  *
  * @see SOAPHeaderElement
+ * @since 1.6
  */
 public interface SOAPHeader extends SOAPElement {
     /**
@@ -92,7 +93,7 @@
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs
      * @see SOAPHeader#addHeaderElement(Name)
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addHeaderElement(QName qname)
         throws SOAPException;
@@ -115,7 +116,7 @@
      * @see #extractHeaderElements
      * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator examineMustUnderstandHeaderElements(String actor);
 
@@ -180,7 +181,7 @@
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
      * @exception UnsupportedOperationException if this is a SOAP 1.1 Header.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
         throws SOAPException;
@@ -196,7 +197,7 @@
      * @return the new <code>SOAPHeaderElement</code> object that was
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
         throws SOAPException;
@@ -211,7 +212,7 @@
      * @return the new <code>SOAPHeaderElement</code> object that was
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
         throws SOAPException;
@@ -226,7 +227,7 @@
      * @return the new <code>SOAPHeaderElement</code> object that was
      *          inserted into this <code>SOAPHeader</code> object
      * @exception SOAPException if a SOAP error occurs.
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
         throws SOAPException;
@@ -240,7 +241,7 @@
      *          <code>SOAPHeader</code>
      * @see #extractAllHeaderElements
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator examineAllHeaderElements();
 
@@ -255,7 +256,7 @@
      *
      * @see #examineAllHeaderElements
      *
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Iterator extractAllHeaderElements();
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,6 +33,8 @@
  * <P>
  * A <code>SOAPHeaderElement</code> object can have other
  * <code>SOAPElement</code> objects as its children.
+ *
+ * @since 1.6
  */
 public interface SOAPHeaderElement extends SOAPElement {
 
@@ -65,7 +67,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setRole(String uri) throws SOAPException;
 
@@ -89,7 +91,7 @@
      * @exception UnsupportedOperationException if this message does not
      *      support the SOAP 1.2 concept of Fault Role.
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public String getRole();
 
@@ -143,7 +145,7 @@
      * @see #setMustUnderstand
      * @see #getRelay
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public void setRelay(boolean relay) throws SOAPException;
 
@@ -160,7 +162,7 @@
      * @see #getMustUnderstand
      * @see #setRelay
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public boolean getRelay();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java	Fri Aug 08 12:54:39 2014 -0700
@@ -100,6 +100,7 @@
  *
  * @see MessageFactory
  * @see AttachmentPart
+ * @since 1.6
  */
 public abstract class SOAPMessage {
     /**
@@ -108,7 +109,7 @@
          * supported values. The default is "utf-8".
          *
          * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
-         * @since SAAJ 1.2
+         * @since 1.6, SAAJ 1.2
          */
     public static final String CHARACTER_SET_ENCODING =
         "javax.xml.soap.character-set-encoding";
@@ -119,7 +120,7 @@
      * "false".
      *
      * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public static final String WRITE_XML_DECLARATION =
         "javax.xml.soap.write-xml-declaration";
@@ -163,7 +164,7 @@
          *         object
          * @exception SOAPException
          *               if the SOAP Body does not exist or cannot be retrieved
-         * @since SAAJ 1.2
+         * @since 1.6, SAAJ 1.2
          */
     public SOAPBody getSOAPBody() throws SOAPException {
         throw new UnsupportedOperationException("getSOAPBody must be overridden by all subclasses of SOAPMessage");
@@ -178,7 +179,7 @@
          *         object
          * @exception SOAPException
          *               if the SOAP Header does not exist or cannot be retrieved
-         * @since SAAJ 1.2
+         * @since 1.6, SAAJ 1.2
          */
     public SOAPHeader getSOAPHeader() throws SOAPException {
         throw new UnsupportedOperationException("getSOAPHeader must be overridden by all subclasses of SOAPMessage");
@@ -230,7 +231,7 @@
      * @param headers
      *           a <code>MimeHeaders</code> object containing the MIME
      *           headers for which to search
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract void removeAttachments(MimeHeaders headers);
 
@@ -258,7 +259,7 @@
      * @throws SOAPException if there is an error in the attempt to access the
      *          attachment
      *
-     * @since SAAJ 1.3
+     * @since 1.6, SAAJ 1.3
      */
     public abstract AttachmentPart getAttachment(SOAPElement element) throws SOAPException;
 
@@ -432,7 +433,7 @@
      *           the value to be associated with the specified property
      * @exception SOAPException
      *               if the property name is not recognized.
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public void setProperty(String property, Object value)
         throws SOAPException {
@@ -448,7 +449,7 @@
      *         if no such property exists.
      * @exception SOAPException
      *               if the property name is not recognized.
-     * @since SAAJ 1.2
+     * @since 1.6, SAAJ 1.2
      */
     public Object getProperty(String property) throws SOAPException {
         throw new UnsupportedOperationException("getProperty must be overridden by all subclasses of SOAPMessage");
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java	Fri Aug 08 12:54:39 2014 -0700
@@ -64,6 +64,8 @@
  * The <code>SOAPPart</code> method <code>getEnvelope</code> can be used
  * to retrieve the <code>SOAPEnvelope</code> object.
  * <P>
+ *
+ * @since 1.6
  */
 public abstract class SOAPPart implements org.w3c.dom.Document, Node {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/Text.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/Text.java	Fri Aug 08 12:54:39 2014 -0700
@@ -29,6 +29,7 @@
  * A representation of a node whose value is text.  A <code>Text</code> object
  * may represent text that is content or text that is a comment.
  *
+ * @since 1.6
  */
 public interface Text extends Node, org.w3c.dom.Text {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Action.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Action.java	Fri Aug 08 12:54:39 2014 -0700
@@ -118,7 +118,7 @@
  *
  * @see FaultAction
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -29,7 +29,7 @@
  * clients that wish to receive callback notification of the completion of
  * service endpoint operations invoked asynchronously.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface AsyncHandler<T> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Binding.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Binding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -29,7 +29,7 @@
 /** The <code>Binding</code> interface is the base interface
  *  for JAX-WS protocol bindings.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Binding {
 
@@ -61,7 +61,7 @@
      * @return String The binding identifier for the port.
      *    Never returns <code>null</code>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     String getBindingID();
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,7 +33,7 @@
  * protocol binding and associated context objects for request and
  * response message processing.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
  * @see javax.xml.ws.Binding
  **/
@@ -154,7 +154,7 @@
      *
      * @see W3CEndpointReference
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public EndpointReference getEndpointReference();
 
@@ -176,7 +176,7 @@
      * @throws java.lang.UnsupportedOperationException If this
      * <code>BindingProvider</code> uses the XML/HTTP binding.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public <T extends EndpointReference> T getEndpointReference(Class<T> clazz);
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingType.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/BindingType.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,7 +39,7 @@
  *  This annotation may be overriden programmatically or via
  *  deployment descriptors, depending on the platform in use.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  **/
 @Target(ElementType.TYPE)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Dispatch.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Dispatch.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,7 +33,7 @@
  *  class acts as a factory for the creation of <code>Dispatch</code>
  *  instances.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Dispatch<T> extends BindingProvider {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Endpoint.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Endpoint.java	Fri Aug 08 12:54:39 2014 -0700
@@ -61,7 +61,7 @@
  * as possible instead of generating new ones based on the annotations
  * present on the implementor.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
  * @see javax.xml.ws.Binding
  * @see javax.xml.ws.BindingType
@@ -119,7 +119,7 @@
      *
      *
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      *
      */
     public static Endpoint create(Object implementor, WebServiceFeature ... features) {
@@ -166,7 +166,7 @@
      *        </code> parameter will have their default values.
      *
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public static Endpoint create(String bindingId, Object implementor, WebServiceFeature ... features) {
         return Provider.provider().createEndpoint(bindingId, implementor, features);
@@ -266,7 +266,7 @@
      *          If a <code>java.lang.SecurityManger</code>
      *          is being used and the application doesn't have the
      *          <code>WebServicePermission("publishEndpoint")</code> permission.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public static Endpoint publish(String address, Object implementor, WebServiceFeature ... features) {
         return Provider.provider().createAndPublishEndpoint(address, implementor, features);
@@ -330,7 +330,7 @@
      *          If a <code>java.lang.SecurityManger</code>
      *          is being used and the application doesn't have the
      *          <code>WebServicePermission("publishEndpoint")</code> permission.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public void publish(HttpContext serverContext) {
         throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
@@ -446,7 +446,7 @@
      *
      * @see W3CEndpointReference
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract EndpointReference getEndpointReference(Element... referenceParameters);
 
@@ -472,7 +472,7 @@
      * uses the XML/HTTP binding.
      *
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
             Element... referenceParameters);
@@ -490,7 +490,7 @@
      * @throws java.lang.IllegalStateException
      *        If the endpoint has been published already or it has been stopped.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public void setEndpointContext(EndpointContext ctxt) {
         throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -42,7 +42,7 @@
  * before {@link Endpoint#publish} methods.
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class EndpointContext {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java	Fri Aug 08 12:54:39 2014 -0700
@@ -81,7 +81,7 @@
  *
  * @see W3CEndpointReference
  * @see Service
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @XmlTransient // to treat this class like Object as far as databinding is concerned (proposed JAXB 2.1 feature)
 public abstract class EndpointReference {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/FaultAction.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/FaultAction.java	Fri Aug 08 12:54:39 2014 -0700
@@ -145,7 +145,7 @@
  *   &lt;/definitions>
  * </pre>
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Holder.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Holder.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,7 +30,7 @@
 /**
  * Holds a value of type <code>T</code>.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public final class Holder<T> implements Serializable {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,7 +32,7 @@
  *  protocol agnostic XML message and contains methods that
  *  provide access to the payload of the message.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface LogicalMessage {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,7 +30,7 @@
  *  are used to communicate protocol level fault information to clients and may
  *  be used on the server to control the protocol specific fault representation.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public class ProtocolException extends WebServiceException {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Provider.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Provider.java	Fri Aug 08 12:54:39 2014 -0700
@@ -38,7 +38,7 @@
  *  the <code>Provider</code> instance will receive entire protocol messages
  *  or just message payloads.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  *  @see javax.xml.transform.Source
  *  @see javax.xml.soap.SOAPMessage
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,7 +40,7 @@
  * overloading conflicts in document literal mode. Only the <code>className</code>
  * is required in this case.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  **/
 
 @Target(ElementType.METHOD)
@@ -65,7 +65,7 @@
     /**
      * wsdl:part name for the wrapper part
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public String partName() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -54,7 +54,7 @@
  *
  * @see RespectBindingFeature
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java	Fri Aug 08 12:54:39 2014 -0700
@@ -80,7 +80,7 @@
  *
  * @see AddressingFeature
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public final class RespectBindingFeature extends WebServiceFeature {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Response.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Response.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,7 +39,7 @@
  *  {@link WebServiceException} that represents the error that occured during the
  *  asynchronous method invocation.</p>
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Response<T> extends Future<T> {
     /** Gets the contained response context.
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,7 +39,7 @@
  * overloading conflicts in document literal mode. Only the <code>className</code>
  * is required in this case.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 
 @Target(ElementType.METHOD)
@@ -65,7 +65,7 @@
     /**
      * wsdl:part name for the wrapper part
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public String partName() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/Service.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/Service.java	Fri Aug 08 12:54:39 2014 -0700
@@ -57,7 +57,7 @@
  * can be enabled by creating a <code>ThreadPoolExecutor</code> and
  * registering it with the service.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
  * @see javax.xml.ws.spi.Provider
  * @see javax.xml.ws.handler.HandlerResolver
@@ -153,7 +153,7 @@
      * @see java.lang.reflect.InvocationHandler
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> T getPort(QName portName,
             Class<T> serviceEndpointInterface, WebServiceFeature... features) {
@@ -219,7 +219,7 @@
      *
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> T getPort(Class<T> serviceEndpointInterface,
             WebServiceFeature... features) {
@@ -297,7 +297,7 @@
      *                      with this port or is unsupported.
      *                  </UL>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> T getPort(EndpointReference endpointReference,
            Class<T> serviceEndpointInterface, WebServiceFeature... features) {
@@ -381,7 +381,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
             Service.Mode mode, WebServiceFeature... features) {
@@ -456,7 +456,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
             Class<T> type, Service.Mode mode,
@@ -514,7 +514,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public Dispatch<Object> createDispatch(QName portName,
             JAXBContext context, Service.Mode mode, WebServiceFeature... features) {
@@ -587,7 +587,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
     **/
     public Dispatch<Object> createDispatch(EndpointReference endpointReference,
             JAXBContext context, Service.Mode mode,
@@ -722,7 +722,7 @@
      *        it must throw a WebServiceException.
      * @throws WebServiceException If any error in creation of the
      *                    specified service.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      **/
     public static Service create(
             java.net.URL wsdlDocumentLocation,
@@ -752,7 +752,7 @@
      * @throws WebServiceException If any error in creation of the
      *                    specified service
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public static Service create(QName serviceName, WebServiceFeature ... features) {
         return new Service(null, serviceName, features);
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -36,7 +36,7 @@
  * Used to indicate whether a {@link Provider} implementation wishes to work
  * with entire protocol messages or just with protocol message payloads.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java	Fri Aug 08 12:54:39 2014 -0700
@@ -41,7 +41,7 @@
  *  determined based on the value of the <code>WebServiceClient</code>
  *  annotation on the generated service interface itself.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  *  @see javax.xml.ws.WebServiceClient
 **/
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebFault.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebFault.java	Fri Aug 08 12:54:39 2014 -0700
@@ -36,7 +36,7 @@
  * to the local and namespace name of the fault element and the name
  * of the fault bean.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
@@ -60,7 +60,7 @@
 
   /**
    *  wsdl:Message's name. Default name is the exception's class name.
-   *  @since JAX-WS 2.2
+   *  @since 1.7, JAX-WS 2.2
    */
   public String messageName() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,7 +40,7 @@
  *  element represents the Web service for which the generated
  *  service interface provides a client view.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -41,7 +41,7 @@
  *  into an endpoint implementation class using the
  *  <code>Resource</code> annotation.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  *
  *  @see javax.annotation.Resource
  **/
@@ -120,7 +120,7 @@
      *
      * @see W3CEndpointReference
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public EndpointReference getEndpointReference(Element... referenceParameters);
 
@@ -144,7 +144,7 @@
      * @throws WebServiceException If the <code>clazz</code> type of
      * <code>EndpointReference</code> is not supported.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
             Element... referenceParameters);
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -28,7 +28,7 @@
 /** The <code>WebServiceException</code> class is the base
  *  exception class for all JAX-WS API runtime exceptions.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 
 public class WebServiceException extends java.lang.RuntimeException {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java	Fri Aug 08 12:54:39 2014 -0700
@@ -44,7 +44,7 @@
  * @see javax.xml.ws.soap.AddressingFeature
  * @see javax.xml.ws.soap.MTOMFeature
  *
- * @since 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public abstract class WebServiceFeature {
    /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java	Fri Aug 08 12:54:39 2014 -0700
@@ -55,6 +55,7 @@
  * @see java.security.Permissions
  * @see java.lang.SecurityManager
  * @see java.net.SocketPermission
+ * @since 1.6
  */
 public final class WebServicePermission extends BasicPermission {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,7 +33,7 @@
 /**
  * Used to annotate a Provider implementation class.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  * @see javax.xml.ws.Provider
  */
 @Target(ElementType.TYPE)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java	Fri Aug 08 12:54:39 2014 -0700
@@ -75,7 +75,7 @@
  * @see javax.annotation.Resource
  * @see WebServiceFeatureAnnotation
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  *
 **/
 
@@ -143,7 +143,7 @@
      * A portable JNDI lookup name that resolves to the target
      * web service reference.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     String lookup() default "";
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java	Fri Aug 08 12:54:39 2014 -0700
@@ -69,7 +69,7 @@
  * </code></pre>
  *
  * @see WebServiceRef
- * @since 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 
 @Documented
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,7 +31,7 @@
 /** The <code>Handler</code> interface
  *  is the base interface for JAX-WS handlers.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface Handler<C extends MessageContext> {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,7 +39,7 @@
  *
  *  @see javax.xml.ws.Service#setHandlerResolver
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface HandlerResolver {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -28,7 +28,7 @@
 /** The <code>LogicalHandler</code> extends
  *  Handler to provide typesafety for the message context parameter.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface LogicalHandler<C extends LogicalMessageContext> extends Handler<C> {
 }
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,7 +32,7 @@
  *  provide access to a the contained message as a protocol neutral
  *  LogicalMessage
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface LogicalMessageContext
                     extends MessageContext {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -36,7 +36,7 @@
  * enable handlers in a handler chain to share processing related
  * state.
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public interface MessageContext extends Map<String, Object> {
 
@@ -168,7 +168,7 @@
      * wsa:IsReferenceParameter="true" attribute.
      * <p>Type: List&lt;Element>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public static final String REFERENCE_PARAMETERS =
             "javax.xml.ws.reference.parameters";
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java	Fri Aug 08 12:54:39 2014 -0700
@@ -35,7 +35,7 @@
  *  This interface is never implemented by an application,
  *  only by a JAX-WS implementation.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface PortInfo {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -33,7 +33,7 @@
  *  to provide typesafety for the message context parameter and add a method
  *  to obtain access to the headers that may be processed by the handler.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface SOAPHandler<T extends SOAPMessageContext>
     extends Handler<T> {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -38,7 +38,7 @@
  *
  *  @see javax.xml.soap.SOAPMessage
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface SOAPMessageContext
                     extends javax.xml.ws.handler.MessageContext {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,7 +31,7 @@
 /** The <code>HTTPBinding</code> interface is an
  *  abstraction for the XML/HTTP binding.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface HTTPBinding extends Binding {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -32,7 +32,7 @@
  *  <p>Since there is no standard format for faults or exceptions
  *  in XML/HTTP messaging, only the HTTP status code is captured.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public class HTTPException extends javax.xml.ws.ProtocolException  {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java	Fri Aug 08 12:54:39 2014 -0700
@@ -57,7 +57,7 @@
  * This annotation's behaviour is defined by the corresponding feature
  * {@link AddressingFeature}.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
@@ -106,7 +106,7 @@
      * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
      * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     Responses responses() default Responses.ALL;
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java	Fri Aug 08 12:54:39 2014 -0700
@@ -112,7 +112,7 @@
  * for more information on WS-Addressing.
  *
  * @see Addressing
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 public final class AddressingFeature extends WebServiceFeature {
@@ -151,7 +151,7 @@
      * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
      * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public enum Responses {
         /**
@@ -229,7 +229,7 @@
      * @param required true means requires the use of ws-addressing .
      * @param responses specifies what type of responses are required
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public AddressingFeature(boolean enabled, boolean required, Responses responses) {
         this.enabled = enabled;
@@ -268,7 +268,7 @@
      *         {@link Responses#NON_ANONYMOUS} when endpoint requires the use
      * of only non-anonymous responses
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Responses getResponses() {
         return responses;
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java	Fri Aug 08 12:54:39 2014 -0700
@@ -54,7 +54,7 @@
  * This annotation's behaviour is defined by the corresponding feature
  * {@link MTOMFeature}.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java	Fri Aug 08 12:54:39 2014 -0700
@@ -54,7 +54,7 @@
  * The {@link #threshold} property can be used to set the threshold
  * value used to determine when binary data should be XOP encoded.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public final class MTOMFeature extends WebServiceFeature {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,7 +34,7 @@
 /** The <code>SOAPBinding</code> interface is an abstraction for
  *  the SOAP binding.
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
 **/
 public interface SOAPBinding extends Binding {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java	Fri Aug 08 12:54:39 2014 -0700
@@ -48,7 +48,7 @@
  *  @see javax.xml.ws.soap.SOAPBinding#getSOAPFactory
  *  @see javax.xml.ws.ProtocolException
  *
- *  @since JAX-WS 2.0
+ *  @since 1.6, JAX-WS 2.0
  **/
 public class SOAPFaultException extends javax.xml.ws.ProtocolException  {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java	Fri Aug 08 12:54:39 2014 -0700
@@ -43,7 +43,7 @@
  *
  * @see Provider#createEndpoint(String, Class, Invoker, WebServiceFeature...)
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 
 public abstract class Invoker {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java	Fri Aug 08 12:54:39 2014 -0700
@@ -41,7 +41,7 @@
  * <code>Endpoint</code> objects.
  * <p>
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public abstract class Provider {
 
@@ -161,7 +161,7 @@
      *        it must throw a WebServiceException.
      * @return The newly created service delegate.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public ServiceDelegate createServiceDelegate(
             java.net.URL wsdlDocumentLocation,
@@ -218,7 +218,7 @@
      * @throws NullPointerException If the <code>null</code>
      * <code>eprInfoset</code> value is given.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset);
 
@@ -271,7 +271,7 @@
      *
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(EndpointReference endpointReference,
             Class<T> serviceEndpointInterface,
@@ -333,7 +333,7 @@
      * @throws WebServiceException If an error occurs while creating the
      *                             <code>W3CEndpointReference</code>.
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      */
     public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName,
             List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters);
@@ -407,7 +407,7 @@
      *     </ul>
      * @throws WebServiceException If an error occurs while creating the
      *                             <code>W3CEndpointReference</code>.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReference createW3CEndpointReference(String address,
             QName interfaceName, QName serviceName, QName portName,
@@ -434,7 +434,7 @@
      *        endpoint.  Supported features not in the <code>features
      *        </code> parameter will have their default values.
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Endpoint createAndPublishEndpoint(String address,
             Object implementor, WebServiceFeature ... features) {
@@ -455,7 +455,7 @@
      *        endpoint.  Supported features not in the <code>features
      *        </code> parameter will have their default values.
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Endpoint createEndpoint(String bindingId, Object implementor,
             WebServiceFeature ... features) {
@@ -478,7 +478,7 @@
      *        endpoint.  Supported features not in the <code>features
      *        </code> parameter will have their default values.
      * @return The newly created endpoint.
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public Endpoint createEndpoint(String bindingId, Class<?> implementorClass,
             Invoker invoker, WebServiceFeature ... features) {
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java	Fri Aug 08 12:54:39 2014 -0700
@@ -47,7 +47,7 @@
  * @see javax.xml.ws.Service
  * @see javax.xml.ws.spi.Provider
  *
- * @since JAX-WS 2.0
+ * @since 1.6, JAX-WS 2.0
  */
 public abstract class ServiceDelegate {
 
@@ -119,7 +119,7 @@
      * @see java.lang.reflect.InvocationHandler
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(QName portName,
             Class<T> serviceEndpointInterface, WebServiceFeature... features);
@@ -194,7 +194,7 @@
      *                      with this port or is unsupported.
      *                  </UL>
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(EndpointReference endpointReference,
            Class<T> serviceEndpointInterface, WebServiceFeature... features);
@@ -256,7 +256,7 @@
      *
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> T getPort(Class<T> serviceEndpointInterface,
             WebServiceFeature... features);
@@ -334,7 +334,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
             Service.Mode mode, WebServiceFeature... features);
@@ -406,7 +406,7 @@
      * @see javax.xml.soap.SOAPMessage
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
             Class<T> type, Service.Mode mode,
@@ -462,7 +462,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
      **/
     public abstract Dispatch<Object> createDispatch(QName portName,
             JAXBContext context, Service.Mode mode, WebServiceFeature... features);
@@ -532,7 +532,7 @@
      * @see javax.xml.bind.JAXBContext
      * @see WebServiceFeature
      *
-     * @since JAX-WS 2.1
+     * @since 1.6, JAX-WS 2.1
     **/
     public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
             JAXBContext context, Service.Mode mode,
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java	Fri Aug 08 12:54:39 2014 -0700
@@ -65,7 +65,7 @@
  * @see MTOM
  * @see RespectBinding
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 @Target(ElementType.ANNOTATION_TYPE)
 @Retention(RetentionPolicy.RUNTIME)
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -37,7 +37,7 @@
  * web service requests to corresponding HttpContext objects.
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class HttpContext {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java	Fri Aug 08 12:54:39 2014 -0700
@@ -46,7 +46,7 @@
  * is undefined.
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class HttpExchange {
 
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -36,7 +36,7 @@
  * {@link Endpoint#publish(HttpContext) }
  *
  * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
+ * @since 1.7, JAX-WS 2.2
  */
 public abstract class HttpHandler {
     /**
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java	Fri Aug 08 12:54:39 2014 -0700
@@ -90,6 +90,6 @@
   </pre>
 
   @author Jitendra Kotamraju
-  @since JAX-WS 2.2
+  @since 1.7, JAX-WS 2.2
  */
 package javax.xml.ws.spi.http;
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java	Fri Aug 08 12:54:39 2014 -0700
@@ -61,7 +61,7 @@
  * WS-Addressing</a>
  * for more information on WS-Addressing EndpointReferences.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 
 // XmlRootElement allows this class to be marshalled on its own
--- a/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java	Fri Aug 08 12:54:39 2014 -0700
@@ -62,7 +62,7 @@
  * <code>endpointName</code> (if specified) MUST match a service and port
  * in the WSDL document.
  *
- * @since JAX-WS 2.1
+ * @since 1.6, JAX-WS 2.1
  */
 public final class W3CEndpointReferenceBuilder {
     /**
@@ -110,6 +110,7 @@
      * @return A <code>W3CEndpointReferenceBuilder</code> instance with
      *   the <code>interfaceName</code> as <code>wsam:InterfaceName</code>
      *   element added to the <code>wsa:Metadata</code> element
+     * @since 1.7
      */
     public W3CEndpointReferenceBuilder interfaceName(QName interfaceName) {
         this.interfaceName = interfaceName;
@@ -253,7 +254,7 @@
      * @throws java.lang.IllegalArgumentException if <code>element</code>
      * is <code>null</code>.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReferenceBuilder element(Element element) {
         if (element == null) {
@@ -277,7 +278,7 @@
      * @throws java.lang.IllegalArgumentException if <code>name</code>
      *   or <code>value</code> is <code>null</code>.
      *
-     * @since JAX-WS 2.2
+     * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReferenceBuilder attribute(QName name, String value) {
         if (name == null || value == null) {
--- a/jdk/src/macosx/native/java/util/prefs/MacOSXPreferencesFile.m	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/macosx/native/java/util/prefs/MacOSXPreferencesFile.m	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -71,6 +71,8 @@
     static jclass exceptionClass = NULL;
     jclass c;
 
+    (*env)->ExceptionClear(env);  // If an exception is pending, clear it before
+                                  // calling FindClass() and/or ThrowNew().
     if (exceptionClass) {
         c = exceptionClass;
     } else {
@@ -534,8 +536,13 @@
 (JNIEnv *env, jobject klass, jobject jpath,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef node = NULL;
@@ -579,8 +586,13 @@
 (JNIEnv *env, jobject klass, jobject jpath,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFStringRef parentName;
@@ -647,9 +659,17 @@
  jobject jname, jlong juser, jlong jhost)
 {
     // like addNode, but can put a three-level-deep dict into the root file
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef child = toCF(env, jchild);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef child = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        child = toCF(env, jchild);
+    }
+    if (child != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFMutableDictionaryRef parent;
@@ -693,9 +713,17 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jchild,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef child = toCF(env, jchild);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef child = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        child = toCF(env, jchild);
+    }
+    if (child != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef constParent;
@@ -734,10 +762,21 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jkey, jobject jvalue,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef value = toCF(env, jvalue);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef key = NULL;
+    CFStringRef value = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        key = toCF(env, jkey);
+    }
+    if (key != NULL) {
+        value = toCF(env, jvalue);
+    }
+    if (value != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFMutableDictionaryRef node = NULL;
@@ -771,9 +810,17 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef key = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        key = toCF(env, jkey);
+    }
+    if (key != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef constNode;
@@ -812,9 +859,17 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef key = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        key = toCF(env, jkey);
+    }
+    if (key != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFPropertyListRef value;
@@ -914,8 +969,13 @@
                                 jobject jname, jlong juser, jlong jhost,
                                 Boolean allowSlash)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef node;
--- a/jdk/src/share/bin/java.c	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/bin/java.c	Fri Aug 08 12:54:39 2014 -0700
@@ -98,6 +98,7 @@
  */
 static void SetClassPath(const char *s);
 static void SelectVersion(int argc, char **argv, char **main_class);
+static void SetJvmEnvironment(int argc, char **argv);
 static jboolean ParseArguments(int *pargc, char ***pargv,
                                int *pmode, char **pwhat,
                                int *pret, const char *jrepath);
@@ -238,6 +239,10 @@
                                jvmpath, sizeof(jvmpath),
                                jvmcfg,  sizeof(jvmcfg));
 
+    if (!IsJavaArgs()) {
+        SetJvmEnvironment(argc,argv);
+    }
+
     ifn.CreateJavaVM = 0;
     ifn.GetDefaultJavaVMInitArgs = 0;
 
@@ -640,6 +645,67 @@
     return jvmtype;
 }
 
+/*
+ * static void SetJvmEnvironment(int argc, char **argv);
+ *   Is called just before the JVM is loaded.  We can set env variables
+ *   that are consumed by the JVM.  This function is non-destructive,
+ *   leaving the arg list intact.  The first use is for the JVM flag
+ *   -XX:NativeMemoryTracking=value.
+ */
+static void
+SetJvmEnvironment(int argc, char **argv) {
+
+    static const char*  NMT_Env_Name    = "NMT_LEVEL_";
+
+    int i;
+    for (i = 0; i < argc; i++) {
+        /*
+         * The following case checks for "-XX:NativeMemoryTracking=value".
+         * If value is non null, an environmental variable set to this value
+         * will be created to be used by the JVM.
+         * The argument is passed to the JVM, which will check validity.
+         * The JVM is responsible for removing the env variable.
+         */
+        char *arg = argv[i];
+        if (JLI_StrCCmp(arg, "-XX:NativeMemoryTracking=") == 0) {
+            int retval;
+            // get what follows this parameter, include "="
+            size_t pnlen = JLI_StrLen("-XX:NativeMemoryTracking=");
+            if (JLI_StrLen(arg) > pnlen) {
+                char* value = arg + pnlen;
+                size_t pbuflen = pnlen + JLI_StrLen(value) + 10; // 10 max pid digits
+
+                /*
+                 * ensures that malloc successful
+                 * DONT JLI_MemFree() pbuf.  JLI_PutEnv() uses system call
+                 *   that could store the address.
+                 */
+                char * pbuf = (char*)JLI_MemAlloc(pbuflen);
+
+                JLI_Snprintf(pbuf, pbuflen, "%s%d=%s", NMT_Env_Name, JLI_GetPid(), value);
+                retval = JLI_PutEnv(pbuf);
+                if (JLI_IsTraceLauncher()) {
+                    char* envName;
+                    char* envBuf;
+
+                    // ensures that malloc successful
+                    envName = (char*)JLI_MemAlloc(pbuflen);
+                    JLI_Snprintf(envName, pbuflen, "%s%d", NMT_Env_Name, JLI_GetPid());
+
+                    printf("TRACER_MARKER: NativeMemoryTracking: env var is %s\n",envName);
+                    printf("TRACER_MARKER: NativeMemoryTracking: putenv arg %s\n",pbuf);
+                    envBuf = getenv(envName);
+                    printf("TRACER_MARKER: NativeMemoryTracking: got value %s\n",envBuf);
+                    free(envName);
+                }
+
+            }
+
+        }
+
+    }
+}
+
 /* copied from HotSpot function "atomll()" */
 static int
 parse_size(const char *s, jlong *result) {
--- a/jdk/src/share/bin/jli_util.h	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/bin/jli_util.h	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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,17 +64,22 @@
 #ifdef _WIN32
 #include <windows.h>
 #include <io.h>
+#include <process.h>
 #define JLI_StrCaseCmp(p1, p2)          stricmp((p1), (p2))
 #define JLI_StrNCaseCmp(p1, p2, p3)     strnicmp((p1), (p2), (p3))
 int  JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
 void JLI_CmdToArgs(char *cmdline);
 #define JLI_Lseek                       _lseeki64
+#define JLI_PutEnv                      _putenv
+#define JLI_GetPid                      _getpid
 #else  /* NIXES */
 #include <unistd.h>
 #include <strings.h>
 #define JLI_StrCaseCmp(p1, p2)          strcasecmp((p1), (p2))
 #define JLI_StrNCaseCmp(p1, p2, p3)     strncasecmp((p1), (p2), (p3))
 #define JLI_Snprintf                    snprintf
+#define JLI_PutEnv                      putenv
+#define JLI_GetPid                      getpid
 #ifdef __solaris__
 #define JLI_Lseek                       llseek
 #endif
--- a/jdk/src/share/classes/java/lang/reflect/Modifier.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/classes/java/lang/reflect/Modifier.java	Fri Aug 08 12:54:39 2014 -0700
@@ -26,6 +26,7 @@
 package java.lang.reflect;
 
 import java.security.AccessController;
+import java.util.StringJoiner;
 import sun.reflect.LangReflectAccess;
 import sun.reflect.ReflectionFactory;
 
@@ -232,27 +233,24 @@
      * represented by {@code mod}
      */
     public static String toString(int mod) {
-        StringBuilder sb = new StringBuilder();
-        int len;
+        StringJoiner sj = new StringJoiner(" ");
 
-        if ((mod & PUBLIC) != 0)        sb.append("public ");
-        if ((mod & PROTECTED) != 0)     sb.append("protected ");
-        if ((mod & PRIVATE) != 0)       sb.append("private ");
+        if ((mod & PUBLIC) != 0)        sj.add("public");
+        if ((mod & PROTECTED) != 0)     sj.add("protected");
+        if ((mod & PRIVATE) != 0)       sj.add("private");
 
         /* Canonical order */
-        if ((mod & ABSTRACT) != 0)      sb.append("abstract ");
-        if ((mod & STATIC) != 0)        sb.append("static ");
-        if ((mod & FINAL) != 0)         sb.append("final ");
-        if ((mod & TRANSIENT) != 0)     sb.append("transient ");
-        if ((mod & VOLATILE) != 0)      sb.append("volatile ");
-        if ((mod & SYNCHRONIZED) != 0)  sb.append("synchronized ");
-        if ((mod & NATIVE) != 0)        sb.append("native ");
-        if ((mod & STRICT) != 0)        sb.append("strictfp ");
-        if ((mod & INTERFACE) != 0)     sb.append("interface ");
+        if ((mod & ABSTRACT) != 0)      sj.add("abstract");
+        if ((mod & STATIC) != 0)        sj.add("static");
+        if ((mod & FINAL) != 0)         sj.add("final");
+        if ((mod & TRANSIENT) != 0)     sj.add("transient");
+        if ((mod & VOLATILE) != 0)      sj.add("volatile");
+        if ((mod & SYNCHRONIZED) != 0)  sj.add("synchronized");
+        if ((mod & NATIVE) != 0)        sj.add("native");
+        if ((mod & STRICT) != 0)        sj.add("strictfp");
+        if ((mod & INTERFACE) != 0)     sj.add("interface");
 
-        if ((len = sb.length()) > 0)    /* trim trailing space */
-            return sb.toString().substring(0, len-1);
-        return "";
+        return sj.toString();
     }
 
     /*
--- a/jdk/src/share/classes/java/util/JapaneseImperialCalendar.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/classes/java/util/JapaneseImperialCalendar.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -38,20 +38,20 @@
 import sun.util.calendar.ZoneInfo;
 
 /**
- * <code>JapaneseImperialCalendar</code> implements a Japanese
+ * {@code JapaneseImperialCalendar} implements a Japanese
  * calendar system in which the imperial era-based year numbering is
  * supported from the Meiji era. The following are the eras supported
  * by this calendar system.
- * <pre><tt>
+ * <pre>{@code
  * ERA value   Era name    Since (in Gregorian)
  * ------------------------------------------------------
  *     0       N/A         N/A
- *     1       Meiji       1868-01-01 midnight local time
- *     2       Taisho      1912-07-30 midnight local time
- *     3       Showa       1926-12-25 midnight local time
- *     4       Heisei      1989-01-08 midnight local time
+ *     1       Meiji       1868-01-01T00:00:00 local time
+ *     2       Taisho      1912-07-30T00:00:00 local time
+ *     3       Showa       1926-12-25T00:00:00 local time
+ *     4       Heisei      1989-01-08T00:00:00 local time
  * ------------------------------------------------------
- * </tt></pre>
+ * }</pre>
  *
  * <p><code>ERA</code> value 0 specifies the years before Meiji and
  * the Gregorian year values are used. Unlike {@link
@@ -63,6 +63,31 @@
  * with time differences for applying the era transitions. This
  * calendar implementation assumes local time for all transitions.
  *
+ * <p>A new era can be specified using property
+ * jdk.calendar.japanese.supplemental.era. The new era is added to the
+ * predefined eras. The syntax of the property is as follows.
+ * <p><pre>
+ *   {@code name=<name>,abbr=<abbr>,since=<time['u']>}
+ * </pre>
+ * where
+ * <dl>
+ * <dt>{@code <name>:}<dd>the full name of the new era (non-ASCII characters allowed)
+ * <dt>{@code <abbr>:}<dd>the abbreviation of the new era (non-ASCII characters allowed)
+ * <dt>{@code <time['u']>:}<dd>the start time of the new era represented by
+ * milliseconds from 1970-01-01T00:00:00 local time or UTC if {@code 'u'} is
+ * appended to the milliseconds value. (ASCII digits only)
+ * </dl>
+ *
+ * <p>If the given era is invalid, such as the since value before the
+ * beginning of the last predefined era, the given era will be
+ * ignored.
+ *
+ * <p>The following is an example of the property usage.
+ * <p><pre>
+ *   java -Djdk.calendar.japanese.supplemental.era="name=NewEra,abbr=N,since=253374307200000"
+ * </pre>
+ * The property specifies an era change to NewEra at 9999-02-11T00:00:00 local time.
+ *
  * @author Masayoshi Okutsu
  * @since 1.6
  */
@@ -102,7 +127,6 @@
     public static final int HEISEI = 4;
 
     private static final int EPOCH_OFFSET   = 719163; // Fixed date of January 1, 1970 (Gregorian)
-    private static final int EPOCH_YEAR     = 1970;
 
     // Useful millisecond constants.  Although ONE_DAY and ONE_WEEK can fit
     // into ints, they must be longs in order to prevent arithmetic overflow
@@ -111,7 +135,6 @@
     private static final int  ONE_MINUTE = 60*ONE_SECOND;
     private static final int  ONE_HOUR   = 60*ONE_MINUTE;
     private static final long ONE_DAY    = 24*ONE_HOUR;
-    private static final long ONE_WEEK   = 7*ONE_DAY;
 
     // Reference to the sun.util.calendar.LocalGregorianCalendar instance (singleton).
     private static final LocalGregorianCalendar jcal
@@ -217,6 +240,7 @@
     };
 
     // Proclaim serialization compatibility with JDK 1.6
+    @SuppressWarnings("FieldNameHidesFieldInSuperclass")
     private static final long serialVersionUID = -3364572813905467929L;
 
     static {
@@ -340,6 +364,7 @@
      * <code>false</code> otherwise.
      * @see Calendar#compareTo(Calendar)
      */
+    @Override
     public boolean equals(Object obj) {
         return obj instanceof JapaneseImperialCalendar &&
             super.equals(obj);
@@ -349,6 +374,7 @@
      * Generates the hash code for this
      * <code>JapaneseImperialCalendar</code> object.
      */
+    @Override
     public int hashCode() {
         return super.hashCode() ^ jdate.hashCode();
     }
@@ -381,6 +407,7 @@
      * or if any calendar fields have out-of-range values in
      * non-lenient mode.
      */
+    @Override
     public void add(int field, int amount) {
         // If amount == 0, do nothing even the given field is out of
         // range. This is tested by JCK.
@@ -509,6 +536,7 @@
         }
     }
 
+    @Override
     public void roll(int field, boolean up) {
         roll(field, up ? +1 : -1);
     }
@@ -533,6 +561,7 @@
      * @see #add(int,int)
      * @see #set(int,int)
      */
+    @Override
     public void roll(int field, int amount) {
         // If amount == 0, do nothing even the given field is out of
         // range. This is tested by JCK.
--- a/jdk/src/share/classes/java/util/StringJoiner.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/classes/java/util/StringJoiner.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -24,6 +24,9 @@
  */
 package java.util;
 
+import sun.misc.JavaLangAccess;
+import sun.misc.SharedSecrets;
+
 /**
  * {@code StringJoiner} is used to construct a sequence of characters separated
  * by a delimiter and optionally starting with a supplied prefix
@@ -67,22 +70,24 @@
     private final String delimiter;
     private final String suffix;
 
-    /*
-     * StringBuilder value -- at any time, the characters constructed from the
-     * prefix, the added element separated by the delimiter, but without the
-     * suffix, so that we can more easily add elements without having to jigger
-     * the suffix each time.
-     */
-    private StringBuilder value;
+    /** Contains all the string components added so far. */
+    private String[] elts;
+
+    /** The number of string components added so far. */
+    private int size;
 
-    /*
-     * By default, the string consisting of prefix+suffix, returned by
-     * toString(), or properties of value, when no elements have yet been added,
-     * i.e. when it is empty.  This may be overridden by the user to be some
-     * other value including the empty String.
+    /** Total length in chars so far, excluding prefix and suffix. */
+    private int len;
+
+    /**
+     * When overriden by the user to be non-null via {@link setEmptyValue}, the
+     * string returned by toString() when no elements have yet been added.
+     * When null, prefix + suffix is used as the empty value.
      */
     private String emptyValue;
 
+    private static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
+
     /**
      * Constructs a {@code StringJoiner} with no characters in it, with no
      * {@code prefix} or {@code suffix}, and a copy of the supplied
@@ -125,7 +130,6 @@
         this.prefix = prefix.toString();
         this.delimiter = delimiter.toString();
         this.suffix = suffix.toString();
-        this.emptyValue = this.prefix + this.suffix;
     }
 
     /**
@@ -148,29 +152,44 @@
         return this;
     }
 
+    private static int getChars(String s, char[] chars, int start) {
+        int len = s.length();
+        s.getChars(0, len, chars, start);
+        return len;
+    }
+
     /**
      * Returns the current value, consisting of the {@code prefix}, the values
      * added so far separated by the {@code delimiter}, and the {@code suffix},
      * unless no elements have been added in which case, the
-     * {@code prefix + suffix} or the {@code emptyValue} characters are returned
+     * {@code prefix + suffix} or the {@code emptyValue} characters are returned.
      *
      * @return the string representation of this {@code StringJoiner}
      */
     @Override
     public String toString() {
-        if (value == null) {
+        final String[] elts = this.elts;
+        if (elts == null && emptyValue != null) {
             return emptyValue;
-        } else {
-            if (suffix.equals("")) {
-                return value.toString();
-            } else {
-                int initialLength = value.length();
-                String result = value.append(suffix).toString();
-                // reset value to pre-append initialLength
-                value.setLength(initialLength);
-                return result;
+        }
+        final int size = this.size;
+        final int addLen = prefix.length() + suffix.length();
+        if (addLen == 0) {
+            compactElts();
+            return size == 0 ? "" : elts[0];
+        }
+        final String delimiter = this.delimiter;
+        final char[] chars = new char[len + addLen];
+        int k = getChars(prefix, chars, 0);
+        if (size > 0) {
+            k += getChars(elts[0], chars, k);
+            for (int i = 1; i < size; i++) {
+                k += getChars(delimiter, chars, k);
+                k += getChars(elts[i], chars, k);
             }
         }
+        k += getChars(suffix, chars, k);
+        return jla.newStringUnsafe(chars);
     }
 
     /**
@@ -182,7 +201,16 @@
      * @return a reference to this {@code StringJoiner}
      */
     public StringJoiner add(CharSequence newElement) {
-        prepareBuilder().append(newElement);
+        final String elt = String.valueOf(newElement);
+        if (elts == null) {
+            elts = new String[8];
+        } else {
+            if (size == elts.length)
+                elts = Arrays.copyOf(elts, 2 * size);
+            len += delimiter.length();
+        }
+        len += elt.length();
+        elts[size++] = elt;
         return this;
     }
 
@@ -207,24 +235,25 @@
      */
     public StringJoiner merge(StringJoiner other) {
         Objects.requireNonNull(other);
-        if (other.value != null) {
-            final int length = other.value.length();
-            // lock the length so that we can seize the data to be appended
-            // before initiate copying to avoid interference, especially when
-            // merge 'this'
-            StringBuilder builder = prepareBuilder();
-            builder.append(other.value, other.prefix.length(), length);
+        if (other.elts == null) {
+            return this;
         }
-        return this;
+        other.compactElts();
+        return add(other.elts[0]);
     }
 
-    private StringBuilder prepareBuilder() {
-        if (value != null) {
-            value.append(delimiter);
-        } else {
-            value = new StringBuilder().append(prefix);
+    private void compactElts() {
+        if (size > 1) {
+            final char[] chars = new char[len];
+            int i = 1, k = getChars(elts[0], chars, 0);
+            do {
+                k += getChars(delimiter, chars, k);
+                k += getChars(elts[i], chars, k);
+                elts[i] = null;
+            } while (++i < size);
+            size = 1;
+            elts[0] = jla.newStringUnsafe(chars);
         }
-        return value;
     }
 
     /**
@@ -238,10 +267,7 @@
      * @return the length of the current value of {@code StringJoiner}
      */
     public int length() {
-        // Remember that we never actually append the suffix unless we return
-        // the full (present) value or some sub-string or length of it, so that
-        // we can add on more if we need to.
-        return (value != null ? value.length() + suffix.length() :
-                emptyValue.length());
+        return (size == 0 && emptyValue != null) ? emptyValue.length() :
+            len + prefix.length() + suffix.length();
     }
 }
--- a/jdk/src/share/classes/sun/security/smartcardio/CardImpl.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/classes/sun/security/smartcardio/CardImpl.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -26,9 +26,9 @@
 package sun.security.smartcardio;
 
 import java.nio.ByteBuffer;
-
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import javax.smartcardio.*;
-
 import static sun.security.smartcardio.PCSC.*;
 
 /**
@@ -62,6 +62,15 @@
     // thread holding exclusive access to the card, or null
     private volatile Thread exclusiveThread;
 
+    // used for platform specific logic
+    private static final boolean isWindows;
+
+    static {
+        final String osName = AccessController.doPrivileged(
+            (PrivilegedAction<String>) () -> System.getProperty("os.name"));
+        isWindows = osName.startsWith("Windows");
+    }
+
     CardImpl(TerminalImpl terminal, String protocol) throws PCSCException {
         this.terminal = terminal;
         int sharingMode = SCARD_SHARE_SHARED;
@@ -74,7 +83,12 @@
             connectProtocol = SCARD_PROTOCOL_T1;
         } else if (protocol.equalsIgnoreCase("direct")) {
             // testing
-            connectProtocol = 0;
+
+            // MSDN states that the preferred protocol can be zero, but doesn't
+            //     specify whether other values are allowed.
+            // pcsc-lite implementation expects the preferred protocol to be non zero.
+            connectProtocol = isWindows ? 0 : SCARD_PROTOCOL_RAW;
+
             sharingMode = SCARD_SHARE_DIRECT;
         } else {
             throw new IllegalArgumentException("Unsupported protocol " + protocol);
--- a/jdk/src/share/classes/sun/util/calendar/Era.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/classes/sun/util/calendar/Era.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -41,20 +41,15 @@
  * <code>CalendarDate</code>.
  *
  * <p>The following era names are defined in this release.
- * <!-- TODO: use HTML table -->
- * <pre><tt>
+ * <pre>{@code
  *   Calendar system         Era name         Since (in Gregorian)
  *   -----------------------------------------------------------------------
- *   Japanese calendar       Meiji            1868-01-01 midnight local time
- *                           Taisho           1912-07-30 midnight local time
- *                           Showa            1926-12-26 midnight local time
- *                           Heisei           1989-01-08 midnight local time
- *   Julian calendar         BeforeCommonEra  -292275055-05-16T16:47:04.192Z
- *                           CommonEra        0000-12-30 midnight local time
- *   Taiwanese calendar      MinGuo           1911-01-01 midnight local time
- *   Thai Buddhist calendar  BuddhistEra      -543-01-01 midnight local time
+ *   Japanese calendar       Meiji            1868-01-01T00:00:00 local time
+ *                           Taisho           1912-07-30T00:00:00 local time
+ *                           Showa            1926-12-25T00:00:00 local time
+ *                           Heisei           1989-01-08T00:00:00 local time
  *   -----------------------------------------------------------------------
- * </tt></pre>
+ * }</pre>
  *
  * @author Masayoshi Okutsu
  * @since 1.5
--- a/jdk/src/share/classes/sun/util/calendar/LocalGregorianCalendar.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/classes/sun/util/calendar/LocalGregorianCalendar.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -25,11 +25,7 @@
 
 package sun.util.calendar;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
+import java.security.AccessController;
 import java.util.TimeZone;
 
 /**
@@ -39,6 +35,28 @@
  */
 
 public class LocalGregorianCalendar extends BaseCalendar {
+    private static final Era[] JAPANESE_ERAS = {
+        new Era("Meiji",  "M", -3218832000000L, true),
+        new Era("Taisho", "T", -1812153600000L, true),
+        new Era("Showa",  "S", -1357603200000L, true),
+        new Era("Heisei", "H",   600220800000L, true),
+    };
+
+    private static boolean isValidEra(Era newEra, Era[] eras) {
+        Era last = eras[eras.length - 1];
+        if (last.getSinceDate().getYear() >= newEra.getSinceDate().getYear()) {
+            return false;
+        }
+        // The new era name should be unique. Its abbr may not.
+        String newName = newEra.getName();
+        for (Era era : eras) {
+            if (era.getName().equals(newName)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
     private String name;
     private Era[] eras;
 
@@ -118,58 +136,70 @@
     }
 
     static LocalGregorianCalendar getLocalGregorianCalendar(String name) {
-        Properties calendarProps;
-        try {
-            calendarProps = CalendarSystem.getCalendarProperties();
-        } catch (IOException | IllegalArgumentException e) {
-            throw new InternalError(e);
-        }
-        // Parse calendar.*.eras
-        String props = calendarProps.getProperty("calendar." + name + ".eras");
-        if (props == null) {
+        // Only the Japanese calendar is supported.
+        if (!"japanese".equals(name)) {
             return null;
         }
-        List<Era> eras = new ArrayList<>();
-        StringTokenizer eraTokens = new StringTokenizer(props, ";");
-        while (eraTokens.hasMoreTokens()) {
-            String items = eraTokens.nextToken().trim();
-            StringTokenizer itemTokens = new StringTokenizer(items, ",");
-            String eraName = null;
-            boolean localTime = true;
-            long since = 0;
-            String abbr = null;
+
+        // Append an era to the predefined eras if it's given by the property.
+        String prop = AccessController.doPrivileged(
+                new sun.security.action.GetPropertyAction("jdk.calendar.japanese.supplemental.era"));
+        if (prop != null) {
+            Era era = parseEraEntry(prop);
+            if (era != null) {
+                if (isValidEra(era, JAPANESE_ERAS)) {
+                    int length = JAPANESE_ERAS.length;
+                    Era[] eras = new Era[length + 1];
+                    System.arraycopy(JAPANESE_ERAS, 0, eras, 0, length);
+                    eras[length] = era;
+                    return new LocalGregorianCalendar(name, eras);
+                }
+            }
+        }
+        return new LocalGregorianCalendar(name, JAPANESE_ERAS);
+    }
 
-            while (itemTokens.hasMoreTokens()) {
-                String item = itemTokens.nextToken();
-                int index = item.indexOf('=');
-                // it must be in the key=value form.
-                if (index == -1) {
+    private static Era parseEraEntry(String entry) {
+        String[] keyValuePairs = entry.split(",");
+        String eraName = null;
+        boolean localTime = true;
+        long since = 0;
+        String abbr = null;
+
+        for (String item : keyValuePairs) {
+            String[] keyvalue = item.split("=");
+            if (keyvalue.length != 2) {
+                return null;
+            }
+            String key = keyvalue[0].trim();
+            String value = keyvalue[1].trim();
+            switch (key) {
+            case "name":
+                eraName = value;
+                break;
+            case "since":
+                if (value.endsWith("u")) {
+                    localTime = false;
+                    value = value.substring(0, value.length() - 1);
+                }
+                try {
+                    since = Long.parseLong(value);
+                } catch (NumberFormatException e) {
                     return null;
                 }
-                String key = item.substring(0, index);
-                String value = item.substring(index + 1);
-                if ("name".equals(key)) {
-                    eraName = value;
-                } else if ("since".equals(key)) {
-                    if (value.endsWith("u")) {
-                        localTime = false;
-                        since = Long.parseLong(value.substring(0, value.length() - 1));
-                    } else {
-                        since = Long.parseLong(value);
-                    }
-                } else if ("abbr".equals(key)) {
-                    abbr = value;
-                } else {
-                    throw new RuntimeException("Unknown key word: " + key);
-                }
+                break;
+            case "abbr":
+                abbr = value;
+                break;
+            default:
+                return null;
             }
-            Era era = new Era(eraName, abbr, since, localTime);
-            eras.add(era);
         }
-        Era[] eraArray = new Era[eras.size()];
-        eras.toArray(eraArray);
-
-        return new LocalGregorianCalendar(name, eraArray);
+        if (eraName == null || eraName.isEmpty()
+                || abbr == null || abbr.isEmpty()) {
+            return null;
+        }
+        return new Era(eraName, abbr, since, localTime);
     }
 
     private LocalGregorianCalendar(String name, Era[] eras) {
@@ -262,9 +292,8 @@
     }
 
     private boolean validateEra(Era era) {
-        // Validate the era
-        for (int i = 0; i < eras.length; i++) {
-            if (era == eras[i]) {
+        for (Era era1 : eras) {
+            if (era == era1) {
                 return true;
             }
         }
@@ -333,6 +362,7 @@
         }
         if (i >= 0) {
             ldate.setLocalEra(era);
+            @SuppressWarnings("null")
             int y = ldate.getNormalizedYear() - era.getSinceDate().getYear() + 1;
             ldate.setLocalYear(y);
         } else {
--- a/jdk/src/share/lib/calendars.properties	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/src/share/lib/calendars.properties	Fri Aug 08 12:54:39 2014 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -23,37 +23,6 @@
 #
 
 #
-# Japanese imperial calendar
-#
-#   Meiji  since 1868-01-01 00:00:00 local time (Gregorian)
-#   Taisho since 1912-07-30 00:00:00 local time (Gregorian)
-#   Showa  since 1926-12-25 00:00:00 local time (Gregorian)
-#   Heisei since 1989-01-08 00:00:00 local time (Gregorian)
-calendar.japanese.type: LocalGregorianCalendar
-calendar.japanese.eras: \
-	name=Meiji,abbr=M,since=-3218832000000;  \
-	name=Taisho,abbr=T,since=-1812153600000; \
-	name=Showa,abbr=S,since=-1357603200000;  \
-	name=Heisei,abbr=H,since=600220800000
-
-#
-# Taiwanese calendar
-#   Minguo since 1911-01-01 00:00:00 local time (Gregorian)
-calendar.taiwanese.type: LocalGregorianCalendar
-calendar.taiwanese.eras: \
-	name=MinGuo,since=-1830384000000
-
-#
-# Thai Buddhist calendar
-#   Buddhist Era since -542-01-01 00:00:00 local time (Gregorian)
-calendar.thai-buddhist.type: LocalGregorianCalendar
-calendar.thai-buddhist.eras: \
-	name=BuddhistEra,abbr=B.E.,since=-79302585600000
-calendar.thai-buddhist.year-boundary: \
-	day1=4-1,since=-79302585600000; \
-	day1=1-1,since=-915148800000
-
-#
 # Hijrah calendars
 #
 calendar.hijrah.Hijrah-umalqura: hijrah-config-umalqura.properties
--- a/jdk/test/ProblemList.txt	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/ProblemList.txt	Fri Aug 08 12:54:39 2014 -0700
@@ -217,6 +217,9 @@
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
 
+# 8049312
+com/sun/crypto/provider/Cipher/AES/CICO.java			generic-all
+
 ############################################################################
 
 # jdk_sound
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/CICO.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.Cipher;
+import javax.crypto.CipherInputStream;
+import javax.crypto.CipherOutputStream;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV). The test tries 3 different read methods of
+ *          CipherInputStream.
+ */
+public class CICO {
+    private static final String ALGORITHM = "aEs";
+    private static final String[] MODES = { "PCBC", "ECb", "cbC", "cFB",
+        "cFB24", "cFB32", "Cfb40", "CFB72", "OfB", "OfB20", "OfB48",
+        "OfB56", "OFB64", "OFB112", "CFB112", "pCbC" };
+    private static final String[] PADDING = { "noPadding", "pkcs5padding" };
+    private static final String PROVIDER = "SunJCE";
+    private static final int NREADS = 3;
+    private static final int KEY_LENGTH = 128;
+
+    private final byte[] plainText = new byte[1600000];
+
+
+    public static void main(String argv[]) throws Exception {
+        CICO test = new CICO();
+        for (String mode : MODES) {
+            for (String pad : PADDING) {
+                for (int m = 0; m < NREADS; m++) {
+                    test.runTest(ALGORITHM, mode, pad, m);
+                }
+            }
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad, int whichRead) throws Exception {
+        Cipher ci1 = null;
+        Cipher ci2 = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+
+        try {
+            // Do initialization
+            Random rdm = new Random();
+            rdm.nextBytes(plainText);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            if (!kg.getAlgorithm().equals(algo)) {
+                throw new RuntimeException("Unexpected algorithm <"
+                        + kg.getAlgorithm() + ">, expected value is <" + algo
+                        + ">");
+            }
+
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            ci1 = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+
+            if (mo.equalsIgnoreCase("ECB")) {
+                ci1.init(Cipher.ENCRYPT_MODE, key);
+            } else {
+                ci1.init(Cipher.ENCRYPT_MODE, key, aps);
+            }
+
+            if (!mo.equalsIgnoreCase("ECB")) {
+                iv = ci1.getIV();
+                aps = new IvParameterSpec(iv);
+            } else {
+                aps = null;
+            }
+
+            ci2 = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            if (mo.equalsIgnoreCase("ECB")) {
+                ci2.init(Cipher.DECRYPT_MODE, key);
+            } else {
+                ci2.init(Cipher.DECRYPT_MODE, key, aps);
+            }
+
+            ByteArrayInputStream baInput = new ByteArrayInputStream(plainText);
+            ByteArrayOutputStream baOutput = new ByteArrayOutputStream();
+            try (CipherInputStream ciInput = new CipherInputStream(baInput, ci1);
+                    CipherOutputStream ciOutput = new CipherOutputStream(
+                            baOutput, ci2)) {
+                // According to specification, CipherInputStream does not support the
+                // mark and reset methods
+                if (ciInput.markSupported()) {
+                    throw new RuntimeException(
+                            "CipherInputStream unexpectedly supports the mark and reset methods");
+                }
+
+                // Read from the input and write to the output using 2 types
+                // of buffering : byte[] and int
+                switch (whichRead) {
+                case 0:
+                    int buffer0 = ciInput.read();
+                    while (buffer0 != -1) {
+                        ciOutput.write(buffer0);
+                        buffer0 = ciInput.read();
+                    }
+                    break;
+                case 1:
+                    byte[] buffer1 = new byte[20];
+                    int len1 = ciInput.read(buffer1);
+                    while (len1 != -1) {
+                        ciOutput.write(buffer1, 0, len1);
+                        len1 = ciInput.read(buffer1);
+                    }
+                    break;
+                case NREADS - 1:
+                    byte[] buffer2 = new byte[ci1
+                                              .getOutputSize(plainText.length)];
+                    int offset2 = 0;
+                    int len2 = 0;
+                    while (len2 != -1) {
+                        len2 = ciInput.read(buffer2, offset2, buffer2.length
+                                - offset2);
+                        offset2 += len2;
+                    }
+                    ciOutput.write(buffer2, 0, buffer2.length);
+                    break;
+                }
+            }
+
+            // Get the output
+            byte[] recoveredText = new byte[baOutput.size()];
+            recoveredText = baOutput.toByteArray();
+            if (!java.util.Arrays.equals(plainText, recoveredText)) {
+                throw new RuntimeException(
+                        "Original text is not equal with recovered text, with "
+                                + algo + "/" + mo + "/" + pad + "/" + whichRead);
+            }
+
+            // Compare input and output
+
+        } catch (NoSuchAlgorithmException e) {
+            //OFB20 is for negative testing
+            if (!mo.equalsIgnoreCase("OFB20")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with "
+                        + algo + "/" + mo + "/" + pad + "/" + whichRead);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch (IOException | NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException e) {
+            System.out.println("Unexpected Exception with "
+                    + algo + "/" + mo + "/" + pad + "/" + whichRead);
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/CTR.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Arrays;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with 4 different modes with NoPadding. Check if
+ *          data before encryption and after decryption is the same.
+ */
+
+public class CTR {
+
+    private static final String ALGORITHM = "AES";
+
+    private static final String PROVIDER = "SunJCE";
+
+    private static final String[] MODES = {"CTR","CFB24","OFB32","GCM"};
+
+    private static final String PADDING = "NoPadding";
+
+
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        CTR test = new CTR();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+
+        try {
+            Random rdm = new Random();
+            byte[] plainText;
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            for (int i = 0; i < 15; i++) {
+                plainText = new byte[1600 + i + 1];
+                rdm.nextBytes(plainText);
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.ENCRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.ENCRYPT_MODE, key);
+                }
+
+                byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+                int offset = ci.update(plainText, 0, plainText.length,
+                        cipherText, 0);
+
+                ci.doFinal(cipherText, offset);
+
+                if (!mo.equalsIgnoreCase("ECB")) {
+                    iv = ci.getIV();
+                    aps = new IvParameterSpec(iv);
+                } else {
+                    aps = null;
+                }
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.DECRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters());
+                }
+
+                byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)];
+                int len = ci.doFinal(cipherText, 0, cipherText.length,
+                        recoveredText);
+                byte[] tmp = new byte[len];
+
+                for (int j = 0; j < len; j++) {
+                    tmp[j] = recoveredText[j];
+                }
+                Arrays.toString(plainText);
+                if (!java.util.Arrays.equals(plainText, tmp)) {
+                    System.out.println("Original: ");
+                    dumpBytes(plainText);
+                    System.out.println("Recovered: ");
+                    dumpBytes(tmp);
+                    throw new RuntimeException("Original text is not equal with recovered text, with mode:" + mo);
+                }
+            }
+        } catch (NoSuchAlgorithmException | NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes){
+        for (byte b : bytes){
+            System.out.print(Integer.toHexString(b));
+        }
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/Padding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV). The test tries 3 different read methods of
+ *          CipherInputStream.
+ */
+public class Padding {
+
+    private static final String ALGORITHM = "AES";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "PCBC", "OFB",
+        "OFB150", "cFB", "CFB7", "cFB8", "cFB16", "cFB24", "cFB32",
+        "Cfb40", "cfB48", "cfB56", "cfB64", "cfB72", "cfB80", "cfB88",
+        "cfB96", "cfb104", "cfB112", "cfB120", "OFB8", "OFB16", "OFB24",
+        "OFB32", "OFB40", "OFB48", "OFB56", "OFB64", "OFB72", "OFB80",
+        "OFB88", "OFB96", "OFB104", "OFB112", "OFB120", "GCM" };
+    private static final String PADDING = "PKCS5Padding";
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        Padding test = new Padding();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+        try {
+            Random rdm = new Random();
+            byte[] plainText;
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            for (int i = 0; i < 15; i++) {
+                plainText = new byte[1600 + i + 1];
+                rdm.nextBytes(plainText);
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.ENCRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.ENCRYPT_MODE, key);
+                }
+
+                byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+                int offset = ci.update(plainText, 0, plainText.length,
+                        cipherText, 0);
+                ci.doFinal(cipherText, offset);
+
+                if (!mo.equalsIgnoreCase("ECB")) {
+                    iv = ci.getIV();
+                    aps = new IvParameterSpec(iv);
+                } else {
+                    aps = null;
+                }
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.DECRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters());
+                }
+
+                byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)];
+                int len = ci.doFinal(cipherText, 0, cipherText.length,
+                        recoveredText);
+                byte[] tmp = new byte[len];
+
+                for (int j = 0; j < len; j++) {
+                    tmp[j] = recoveredText[j];
+                }
+
+                if (!java.util.Arrays.equals(plainText, tmp)) {
+                    System.out.println("Original: ");
+                    dumpBytes(plainText);
+                    System.out.println("Recovered: ");
+                    dumpBytes(tmp);
+                    throw new RuntimeException(
+                            "Original text is not equal with recovered text, with mode:"
+                                    + mo);
+                }
+            }
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and OFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("OFB150")) {
+                System.out
+                .println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch ( NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes) {
+        for (byte b : bytes) {
+            System.out.print(Integer.toHexString(b));
+        }
+
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV).
+ * @author Liwen Wang
+ * @author Parag Salvi
+ */
+public class TestAESCipher {
+
+    private static final String ALGORITHM = "AES";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "CTR", "PCBC", "OFB",
+        "OFB150", "cFB", "CFB7", "cFB8", "cFB16", "cFB24", "cFB32",
+        "Cfb40", "cfB48", "cfB56", "cfB64", "cfB72", "cfB80", "cfB88",
+        "cfB96", "cfb104", "cfB112", "cfB120", "OFB8", "OFB16", "OFB24",
+        "OFB32", "OFB40", "OFB48", "OFB56", "OFB64", "OFB72", "OFB80",
+        "OFB88", "OFB96", "OFB104", "OFB112", "OFB120", "GCM" };
+    private static final String[] PADDING = { "NoPadding", "PKCS5Padding" };
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        TestAESCipher test = new TestAESCipher();
+        for (String mode : MODES) {
+            int padKinds = 1;
+            if (mode.equalsIgnoreCase("ECB") || mode.equalsIgnoreCase("PCBC")
+                    || mode.equalsIgnoreCase("CBC")) {
+                padKinds = PADDING.length;
+            }
+
+            for (int k = 0; k < padKinds; k++) {
+                test.runTest(ALGORITHM, mode, PADDING[k]);
+            }
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+        try {
+            // Initialization
+            Random rdm = new Random();
+            byte[] plainText = new byte[128];
+            rdm.nextBytes(plainText);
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            // encrypt
+            if (!mo.equalsIgnoreCase("GCM")) {
+                ci.init(Cipher.ENCRYPT_MODE, key, aps);
+            } else {
+                ci.init(Cipher.ENCRYPT_MODE, key);
+            }
+
+            byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+            int offset = ci.update(plainText, 0, plainText.length, cipherText,
+                    0);
+            ci.doFinal(cipherText, offset);
+
+            if (!mo.equalsIgnoreCase("ECB")) {
+                iv = ci.getIV();
+                aps = new IvParameterSpec(iv);
+            } else {
+                aps = null;
+            }
+
+            if (!mo.equalsIgnoreCase("GCM")) {
+                ci.init(Cipher.DECRYPT_MODE, key, aps);
+            } else {
+                ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters());
+            }
+
+            byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)];
+            int len = ci.doFinal(cipherText, 0, cipherText.length,
+                    recoveredText);
+            byte[] tmp = new byte[len];
+            System.arraycopy(recoveredText, 0, tmp, 0, len);
+
+            // Comparison
+            if (!java.util.Arrays.equals(plainText, tmp)) {
+                System.out.println("Original: ");
+                dumpBytes(plainText);
+                System.out.println("Recovered: ");
+                dumpBytes(tmp);
+                throw new RuntimeException(
+                        "Original text is not equal with recovered text, with mode:"
+                                + mo);
+            }
+
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and OFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("OFB150")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        }  catch ( NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes) {
+        for (byte b : bytes) {
+            System.out.print(Integer.toHexString(b));
+        }
+
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.InvalidParameterSpecException;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.GCMParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES encryption with no padding. Expect the original data length
+ *          is the same as the encrypted data.
+ */
+public class TestNonexpanding {
+
+    private static final String ALGORITHM = "AES";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "OFB", "OFB150",
+        "cFB", "CFB7", "cFB8", "cFB16", "cFB24", "cFB32", "Cfb40", "cfB48",
+        "cfB56", "cfB64", "cfB72", "cfB80", "cfB88", "cfB96", "cfb104",
+        "cfB112", "cfB120", "GCM" };
+    private static final String PADDING = "NoPadding";
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        TestNonexpanding test = new TestNonexpanding();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        SecretKey key = null;
+        try {
+            // Initialization
+            Random rdm = new Random();
+            byte[] plainText = new byte[128];
+            rdm.nextBytes(plainText);
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            // encrypt
+            ci.init(Cipher.ENCRYPT_MODE, key);
+            byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+            int offset = ci.update(plainText, 0, plainText.length, cipherText,
+                    0);
+            ci.doFinal(cipherText, offset);
+
+            // Comparison
+            if (!(plainText.length == cipherText.length)) {
+                // The result of encryption in GCM is a combination of an
+                // authentication tag and cipher text.
+                if (mo.equalsIgnoreCase("GCM")) {
+                    GCMParameterSpec spec = ci.getParameters().getParameterSpec(GCMParameterSpec.class);
+                    int cipherTextLength = cipherText.length - spec.getTLen()
+                            / 8;
+                    if (plainText.length == cipherTextLength) {
+                        return;
+                    }
+                }
+                System.out.println("Original length: " + plainText.length);
+                System.out.println("Cipher text length: " + cipherText.length);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and OFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("OFB150")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch ( NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidParameterSpecException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV). The test tries 3 different read methods of
+ *          CipherInputStream.
+ */
+public class TestSameBuffer {
+
+    private static final String ALGORITHM = "Rijndael";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "OFB", "CFB150",
+        "cFB", "CFB7", " cFB8", "cFB16", "cFB24", "cFB32", "Cfb40",
+        "cfB48", " cfB56", "cfB64", "cfB72", "cfB80", "cfB88", "cfB96",
+        "cfb104", "cfB112", "cfB120" };
+    private static final String PADDING = "NoPadding";
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        TestSameBuffer test = new TestSameBuffer();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+        try {
+            // Initialization
+            Random rdm = new Random();
+            byte[] plainText = new byte[128];
+            rdm.nextBytes(plainText);
+
+            // keep the plain text
+            byte[] tmpText = new byte[plainText.length];
+            for (int i = 0; i < plainText.length; i++) {
+                tmpText[i] = plainText[i];
+            }
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            // encrypt
+            ci.init(Cipher.ENCRYPT_MODE, key);
+            int offset = ci
+                    .update(plainText, 0, plainText.length, plainText, 0);
+            ci.doFinal(plainText, offset);
+
+            if (!mo.equalsIgnoreCase("ECB")) {
+                iv = ci.getIV();
+                aps = new IvParameterSpec(iv);
+            } else {
+                aps = null;
+            }
+
+            ci.init(Cipher.DECRYPT_MODE, key, aps);
+            byte[] recoveredText = new byte[ci.getOutputSize(plainText.length)];
+            ci.doFinal(plainText, 0, plainText.length, recoveredText);
+
+            // Comparison
+            if (!java.util.Arrays.equals(tmpText, recoveredText)) {
+                System.out.println("Original: ");
+                dumpBytes(plainText);
+                System.out.println("Recovered: ");
+                dumpBytes(recoveredText);
+                throw new RuntimeException(
+                        "Original text is not equal with recovered text, with mode:"
+                                + mo);
+            }
+
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and CFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("CFB150")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        }  catch (NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes) {
+        for (byte b : bytes) {
+            System.out.print(Integer.toHexString(b));
+        }
+
+        System.out.println();
+    }
+}
--- a/jdk/test/java/lang/reflect/Modifier/toStringTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/java/lang/reflect/Modifier/toStringTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. 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
@@ -23,11 +23,11 @@
 
 /**
  * @test
- * @bug 4394937
+ * @bug 4394937 8051382
  * @summary tests the toString method of reflect.Modifier
  */
 
-import java.lang.reflect.*;
+import java.lang.reflect.Modifier;
 
 public class toStringTest {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Calendar/SupplementalJapaneseEraTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.text.SimpleDateFormat;
+import java.time.chrono.JapaneseDate;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import static java.util.GregorianCalendar.*;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/*
+ * Usage:
+ *   java SupplementalJapaneseEraTest <flag>
+ *    <flag>
+ *      -s   prints start time for a test era
+ *      -e   prints the English name of the last predefined era
+ *
+ *   java -Djdk.calendar.japanese.supplemental.era=... SupplementalJapaneseEraTest <flag>
+ *      -t   executes tests with a valid property value
+ *      -b <eraname>
+ *           executes tests with an invalid property value
+ *           <eraname> must be the output with -e
+ */
+
+public class SupplementalJapaneseEraTest {
+    private static final Locale WAREKI_LOCALE = Locale.forLanguageTag("ja-JP-u-ca-japanese");
+    private static final String NEW_ERA_NAME = "NewEra";
+    private static final String NEW_ERA_ABBR = "N.E.";
+    private static int errors = 0;
+
+    public static void main(String[] args) {
+        // args[0] is a flag.
+        switch (args[0]) {
+        case "-s":
+            // print the start time of the new era for testing
+            Calendar cal = new Calendar.Builder()
+                .setCalendarType("japanese")
+                .setTimeZone(TimeZone.getTimeZone("GMT"))
+                .setDate(200, FEBRUARY, 11)
+                .build();
+            System.out.println(cal.getTimeInMillis());
+            break;
+
+        case "-e":
+            // print the current era name in English
+            Calendar jcal = new Calendar.Builder()
+                .setCalendarType("japanese")
+                .setFields(YEAR, 1, DAY_OF_YEAR, 1)
+                .build();
+            System.out.println(jcal.getDisplayName(ERA, LONG, Locale.US));
+            break;
+
+        case "-t":
+            // test with a valid property value
+            testProperty();
+            break;
+
+        case "-b":
+            // test with an invalid property value
+            // args[1] is the current era name given by -e.
+            testValidation(args[1].replace("\r", "")); // remove any CR for Cygwin
+            break;
+        }
+        if (errors != 0) {
+            throw new RuntimeException("test failed");
+        }
+    }
+
+    private static void testProperty() {
+        Calendar jcal = new Calendar.Builder()
+            .setCalendarType("japanese")
+            .setFields(YEAR, 1, DAY_OF_YEAR, 1)
+            .build();
+        Date firstDayOfEra = jcal.getTime();
+
+        jcal.set(ERA, jcal.get(ERA) - 1); // previous era
+        jcal.set(YEAR, 1);
+        jcal.set(DAY_OF_YEAR, 1);
+        Calendar cal = new GregorianCalendar();
+        cal.setTimeInMillis(jcal.getTimeInMillis());
+        cal.add(YEAR, 199);
+        int year = cal.get(YEAR);
+
+        SimpleDateFormat sdf;
+        String expected, got;
+
+        // test long era name
+        sdf = new SimpleDateFormat("GGGG y-MM-dd", WAREKI_LOCALE);
+        got = sdf.format(firstDayOfEra);
+        expected = NEW_ERA_NAME + " 1-02-11";
+        if (!expected.equals(got)) {
+            System.err.printf("GGGG y-MM-dd: got=\"%s\", expected=\"%s\"%n", got, expected);
+            errors++;
+        }
+
+        // test era abbreviation
+        sdf = new SimpleDateFormat("G y-MM-dd", WAREKI_LOCALE);
+        got = sdf.format(firstDayOfEra);
+        expected = NEW_ERA_ABBR+" 1-02-11";
+        if (!expected.equals(got)) {
+            System.err.printf("GGGG y-MM-dd: got=\"%s\", expected=\"%s\"%n", got, expected);
+            errors++;
+        }
+
+        // confirm the gregorian year
+        sdf = new SimpleDateFormat("y", Locale.US);
+        int y = Integer.parseInt(sdf.format(firstDayOfEra));
+        if (y != year) {
+            System.err.printf("Gregorian year: got=%d, expected=%d%n", y, year);
+            errors++;
+        }
+
+        // test java.time.chrono.JapaneseEra
+        JapaneseDate jdate = JapaneseDate.of(year, 2, 11);
+        got = jdate.toString();
+        expected = "Japanese " + NEW_ERA_NAME + " 1-02-11";
+        if (!expected.equals(got)) {
+            System.err.printf("JapaneseDate: got=\"%s\", expected=\"%s\"%n", got, expected);
+            errors++;
+        }
+    }
+
+    private static void testValidation(String eraName) {
+        Calendar jcal = new Calendar.Builder()
+            .setCalendarType("japanese")
+            .setFields(YEAR, 1, DAY_OF_YEAR, 1)
+            .build();
+        if (!jcal.getDisplayName(ERA, LONG, Locale.US).equals(eraName)) {
+            errors++;
+            String prop = System.getProperty("jdk.calendar.japanese.supplemental.era");
+            System.err.println("Era changed with invalid property: " + prop);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Calendar/SupplementalJapaneseEraTest.sh	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,74 @@
+#
+# Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8048123
+# @summary Test for jdk.calendar.japanese.supplemental.era support
+# @build SupplementalJapaneseEraTest
+# @run shell SupplementalJapaneseEraTest.sh
+
+PROPERTY=jdk.calendar.japanese.supplemental.era
+STATUS=0
+
+# get the start time of the fictional next era
+SINCE=`${TESTJAVA}/bin/java -cp "${TESTCLASSES}" SupplementalJapaneseEraTest -s`
+
+echo "Tests with valid property values..."
+for P in "name=NewEra,abbr=N.E.,since=$SINCE" \
+         "name = NewEra, abbr = N.E., since = $SINCE"
+do
+    if ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp "${TESTCLASSES}" \
+           -D$PROPERTY="$P" SupplementalJapaneseEraTest -t; then
+        echo "$P: passed"
+    else
+        echo "$P: failed"
+        STATUS=1
+    fi
+done
+
+# get the name of the current era to be used to confirm that
+# invalid property values are ignored.
+ERA=`${TESTJAVA}/bin/java -cp "${TESTCLASSES}" SupplementalJapaneseEraTest -e`
+
+echo "Tests with invalid property values..."
+for P in "foo=Bar,name=NewEra,abbr=N.E.,since=$SINCE" \
+         "=NewEra,abbr=N.E.,since=$SINCE" \
+         "=,abbr=N.E.,since=$SINCE" \
+         "name,abbr=N.E.,since=$SINCE" \
+         "abbr=N.E.,since=$SINCE" \
+         "name=NewEra,since=$SINCE" \
+         "name=,abbr=N.E.,since=$SINCE" \
+         "name=NewEra,abbr=,since=$SINCE" \
+         "name=NewEra,abbr=N.E." \
+         "name=NewEra,abbr=N.E.,since=0" \
+         "name=NewEra,abbr=N.E.,since=9223372036854775808" # Long.MAX_VALUE+1
+do
+    if ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp "${TESTCLASSES}" \
+           -D$PROPERTY="$P" SupplementalJapaneseEraTest -b "$ERA"; then
+        echo "$P: passed"
+    else
+        echo "$P: failed"
+        STATUS=1
+    fi
+done
+exit $STATUS
--- a/jdk/test/java/util/StringJoiner/MergeTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/java/util/StringJoiner/MergeTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 8017231 8020977
+ * @bug 8017231 8020977 8054221
  * @summary test  StringJoiner::merge
  * @run testng MergeTest
  */
@@ -36,98 +36,135 @@
 
 @Test
 public class MergeTest {
-    public void testNull() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        try {
-            sj.merge(null);
-            fail("Should throw NullPointerException!");
-        } catch (NullPointerException npe) {
-            // expected
+    private final static String[] PREFIXES = {"", "{", "@#$%"};
+    private final static String[] SUFFIXES = {"", "}", "*&%$"};
+
+    private static class Fixes {
+        public String pre0, suf0;
+        public String pre1, suf1;
+        public Fixes(String prefix0, String suffix0,
+                     String prefix1, String suffix1) {
+            this.pre0 = prefix0;
+            this.suf0 = suffix0;
+            this.pre1 = prefix1;
+            this.suf1 = suffix1;
         }
     }
 
-    public void testSimple() {
+    private static Stream<Fixes> fixesStream() {
+        Stream.Builder<Fixes> builder = Stream.builder();
+        for (final String prefix0 : PREFIXES) {
+            for (final String suffix0 : SUFFIXES) {
+                for (final String prefix1 : PREFIXES) {
+                    for (final String suffix1 : SUFFIXES) {
+                        builder.accept(new Fixes(prefix0, suffix0,
+                                                 prefix1, suffix1));
+                    }
+                }
+            }
+        }
+        return builder.build();
+    }
+
+    @Test(expectedExceptions = {NullPointerException.class})
+    public void testNull() {
         StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(",", "[", "]");
-        Stream.of("a", "b", "c").forEachOrdered(sj::add);
-        Stream.of("d", "e", "f").forEachOrdered(other::add);
+        sj.merge(null);
+    }
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c,d,e,f}");
+    public void testSimple() {
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(",", fixes.pre1, fixes.suf1);
+            Stream.of("a", "b", "c").forEachOrdered(sj::add);
+            Stream.of("d", "e", "f").forEachOrdered(other::add);
+
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c,d,e,f" + fixes.suf0);
+        });
     }
 
     public void testEmptyOther() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(",", "[", "]");
-        Stream.of("a", "b", "c").forEachOrdered(sj::add);
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(",", fixes.pre1, fixes.suf1);
+            Stream.of("a", "b", "c").forEachOrdered(sj::add);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c" + fixes.suf0);
 
-        other.setEmptyValue("EMPTY");
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c}");
+            other.setEmptyValue("EMPTY");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c" + fixes.suf0);
+        });
     }
 
     public void testEmptyThis() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(":", "[", "]");
-        Stream.of("d", "e", "f").forEachOrdered(other::add);
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1);
+            Stream.of("d", "e", "f").forEachOrdered(other::add);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{d:e:f}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "d:e:f" + fixes.suf0);
 
-        sj = new StringJoiner(",", "{", "}").setEmptyValue("EMPTY");
-        assertEquals(sj.toString(), "EMPTY");
-        sj.merge(other);
-        assertEquals(sj.toString(), "{d:e:f}");
+            sj = new StringJoiner(",", fixes.pre0, fixes.suf0).setEmptyValue("EMPTY");
+            assertEquals(sj.toString(), "EMPTY");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "d:e:f" + fixes.suf0);
+        });
     }
 
     public void testEmptyBoth() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(":", "[", "]");
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + fixes.suf0);
 
-        other.setEmptyValue("NOTHING");
-        sj.merge(other);
-        assertEquals(sj.toString(), "{}");
+            other.setEmptyValue("NOTHING");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + fixes.suf0);
 
-        sj = new StringJoiner(",", "{", "}").setEmptyValue("EMPTY");
-        assertEquals(sj.toString(), "EMPTY");
-        sj.merge(other);
-        assertEquals(sj.toString(), "EMPTY");
+            sj = new StringJoiner(",", fixes.pre0, fixes.suf0).setEmptyValue("EMPTY");
+            assertEquals(sj.toString(), "EMPTY");
+            sj.merge(other);
+            assertEquals(sj.toString(), "EMPTY");
+        });
     }
 
     public void testCascadeEmpty() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner o1 = new StringJoiner(":", "[", "]").setEmptyValue("Empty1");
-        StringJoiner o2 = new StringJoiner(",", "<", ">").setEmptyValue("Empty2");
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner o1 = new StringJoiner(":", fixes.pre1, fixes.suf1).setEmptyValue("Empty1");
+            StringJoiner o2 = new StringJoiner(",", "<", ">").setEmptyValue("Empty2");
 
-        o1.merge(o2);
-        assertEquals(o1.toString(), "Empty1");
+            o1.merge(o2);
+            assertEquals(o1.toString(), "Empty1");
 
-        sj.merge(o1);
-        assertEquals(sj.toString(), "{}");
+            sj.merge(o1);
+            assertEquals(sj.toString(), fixes.pre0 + fixes.suf0);
+        });
     }
 
     public void testDelimiter() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(":", "[", "]");
-        Stream.of("a", "b", "c").forEachOrdered(sj::add);
-        Stream.of("d", "e", "f").forEachOrdered(other::add);
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1);
+            Stream.of("a", "b", "c").forEachOrdered(sj::add);
+            Stream.of("d", "e", "f").forEachOrdered(other::add);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c,d:e:f}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c,d:e:f" + fixes.suf0);
+        });
     }
 
     public void testMergeSelf() {
-        final StringJoiner sj = new StringJoiner(",", "[", "]").add("a").add("b");
-        assertEquals(sj.merge(sj).toString(), "[a,b,a,b]");
-        assertEquals(sj.merge(sj).toString(), "[a,b,a,b,a,b,a,b]");
-
-        final StringJoiner sj2 = new StringJoiner(",").add("c").add("d");
-        assertEquals(sj2.merge(sj2).toString(), "c,d,c,d");
+        fixesStream().forEach(fixes -> {
+            final StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0).add("a").add("b");
+            assertEquals(sj.merge(sj).toString(), fixes.pre0 + "a,b,a,b" + fixes.suf0);
+            assertEquals(sj.merge(sj).toString(), fixes.pre0 + "a,b,a,b,a,b,a,b" + fixes.suf0);
+        });
     }
 }
--- a/jdk/test/java/util/StringJoiner/StringJoinerTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/java/util/StringJoiner/StringJoinerTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -305,9 +305,9 @@
         sj.add("2");
         assertEquals(sj.toString(), prefix + "1" + infix + "2" + suffix);
         sj.add("");
-        assertEquals(sj.toString(), prefix + "1" + infix + "2" +infix + suffix);
+        assertEquals(sj.toString(), prefix + "1" + infix + "2" + infix + suffix);
         sj.add("3");
-        assertEquals(sj.toString(), prefix + "1" + infix + "2" +infix + infix + "3" + suffix);
+        assertEquals(sj.toString(), prefix + "1" + infix + "2" + infix + infix + "3" + suffix);
     }
 
     public void testDelimiterCombinations() {
--- a/jdk/test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java	Fri Aug 08 12:54:39 2014 -0700
@@ -73,7 +73,6 @@
 public final class MonitorVmStartTerminate {
 
     private static final int PROCESS_COUNT = 10;
-    private static final long PROCESS_TIMEOUT_IN_NS = 1000*1000_000_000L;
 
     public static void main(String... args) throws Exception {
 
@@ -223,13 +222,12 @@
 
         private static void createFile(Path path) throws IOException {
             Files.write(path, new byte[0], StandardOpenOption.CREATE);
-            if (!Files.exists(path)) {
-                throw new Error("Newly created file " + path
-                        + " does not exist!");
-            }
         }
 
         private static void waitForRemoval(Path path) {
+            String timeoutFactorText = System.getProperty("test.timeout.factor", "1.0");
+            double timeoutFactor = Double.parseDouble(timeoutFactorText);
+            long timeoutNanos = 1000_000_000L*(long)(1000*timeoutFactor);
             long start = System.nanoTime();
             while (true) {
                 long now = System.nanoTime();
@@ -238,10 +236,10 @@
                 if (!Files.exists(path)) {
                     return;
                 }
-                if (waited > PROCESS_TIMEOUT_IN_NS) {
+                if (waited > timeoutNanos) {
                     System.out.println("Start: " + start);
                     System.out.println("Now: " + now);
-                    System.out.print("Process timed out after " + waited + " ns. Abort.");
+                    System.out.println("Process timed out after " + waited + " ns. Abort.");
                     System.exit(1);
                 }
                 takeNap();
@@ -293,7 +291,14 @@
         public void terminate() {
             try {
                 System.out.println("Terminating " + mainArgsIdentifier);
-                Files.delete(Paths.get(mainArgsIdentifier));
+                // File must be created before proceeding,
+                // otherwise Java process may loop forever
+                // waiting for file to be removed.
+                Path path = Paths.get(mainArgsIdentifier);
+                while (!Files.exists(path)) {
+                    takeNap();
+                }
+                Files.delete(path);
             } catch (IOException e) {
                 e.printStackTrace();
             }
@@ -303,10 +308,11 @@
         private void executeJava() throws Exception, IOException {
             String className = JavaProcess.class.getName();
             String classPath = System.getProperty("test.classes");
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-cp",
-                    classPath, className, mainArgsIdentifier);
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                "-Dtest.timeout.factor=" + System.getProperty("test.timeout.factor", "1.0"),
+                "-cp", classPath, className, mainArgsIdentifier);
             OutputBuffer ob = ProcessTools.getOutput(pb.start());
-            System.out.println("Java Process " + getMainArgsIdentifier() + " stder:"
+            System.out.println("Java Process " + getMainArgsIdentifier() + " stderr:"
                     + ob.getStderr());
             System.err.println("Java Process " + getMainArgsIdentifier() + " stdout:"
                     + ob.getStdout());
--- a/jdk/test/sun/security/smartcardio/TestAll.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/sun/security/smartcardio/TestAll.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,6 +40,7 @@
         TestMultiplePresent.class,
         TestPresent.class,
         TestTransmit.class,
+        TestDirect.class,
     };
 
     public static void main(String[] args) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/smartcardio/TestDirect.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8046343
+ * @summary Make sure that direct protocol is available
+ * @run main/manual TestDirect
+ */
+
+// This test requires special hardware.
+
+import javax.smartcardio.Card;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardTerminals;
+import javax.smartcardio.TerminalFactory;
+
+public class TestDirect {
+    public static void main(String[] args) throws Exception {
+        TerminalFactory terminalFactory = TerminalFactory.getDefault();
+        CardTerminals cardTerminals = terminalFactory.terminals();
+        CardTerminal cardTerminal = cardTerminals.list().get(0);
+        Card card = cardTerminal.connect("DIRECT");
+        card.disconnect(true);
+
+        System.out.println("OK.");
+    }
+}
--- a/jdk/test/tools/launcher/TestSpecialArgs.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/jdk/test/tools/launcher/TestSpecialArgs.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7124089 7131021
+ * @bug 7124089 7131021 8042469
  * @summary Checks for MacOSX specific flags are accepted or rejected, and
  *          MacOSX platforms specific environment is consistent.
  * @compile -XDignore.symbol.file TestSpecialArgs.java EnvironmentVariables.java
@@ -69,6 +69,137 @@
                 throw new RuntimeException("Error: argument was accepted ????");
             }
         }
+
+        /*
+         * test argument : -XX:NativeMemoryTracking=value
+         * A JVM flag, comsumed by the JVM, but requiring launcher
+         * to set an environmental variable if and only if value is supplied.
+         * Test and order:
+         * 1) execute with valid parameter: -XX:NativeMemoryTracking=MyValue
+         *    a) check for correct env variable name: "NMT_LEVEL_" + pid
+         *    b) check that "MyValue" was found in local env.
+         * 2) execute with invalid parameter: -XX:NativeMemoryTracking=
+         *    !) Won't find "NativeMemoryTracking:"
+         *       Code to create env variable not executed.
+         * 3) execute with invalid parameter: -XX:NativeMemoryTracking
+         *    !) Won't find "NativeMemoryTracking:"
+         *       Code to create env variable not executed.
+         * 4) give and invalid value and check to make sure JVM commented
+         */
+        { // NativeMemoryTracking
+            String launcherPidString = "launcher.pid=";
+            String envVarPidString = "TRACER_MARKER: NativeMemoryTracking: env var is NMT_LEVEL_";
+            String NMT_Option_Value = "off";
+            String myClassName = "helloworld";
+            boolean haveLauncherPid = false;
+
+            // === Run the tests ===
+
+            // ---Test 1a
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking=" + NMT_Option_Value,
+                        "-version");
+
+            // get the PID from the env var we set for the JVM
+            String envVarPid = null;
+            for (String line : tr.testOutput) {
+                if (line.contains(envVarPidString)) {
+                    int sindex = envVarPidString.length();
+                    envVarPid = line.substring(sindex);
+                    break;
+                }
+            }
+            // did we find envVarPid?
+            if (envVarPid == null) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: failed to find env Var Pid in tracking info");
+            }
+            // we think we found the pid string.  min test, not "".
+            if (envVarPid.length() < 1) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: env Var Pid in tracking info is empty string");
+            }
+
+            /*
+             * On Linux, Launcher Tracking will print the PID.  Use this info
+             * to validate what we got as the PID in the Launcher itself.
+             * Linux is the only one that prints this, and trying to get it
+             * here for win is awful.  So let the linux test make sure we get
+             * the valid pid, and for non-linux, just make sure pid string is
+             * non-zero.
+             */
+            if (isLinux) {
+                // get what the test says is the launcher pid
+                String launcherPid = null;
+                for (String line : tr.testOutput) {
+                    int index = line.indexOf(launcherPidString);
+                    if (index >= 0) {
+                        int sindex = index + launcherPidString.length();
+                        int tindex = sindex + line.substring(sindex).indexOf("'");
+                        System.out.println("DEBUG INFO: sindex = " + sindex);
+                        System.out.println("DEBUG INFO: searching substring: " + line.substring(sindex));
+                        System.out.println("DEBUG INFO: tindex = " + tindex);
+                        // DEBUG INFO
+                        System.out.println(tr);
+                        launcherPid = line.substring(sindex, tindex);
+                        break;
+                    }
+                }
+                if (launcherPid == null) {
+                    System.out.println(tr);
+                    throw new RuntimeException("Error: failed to find launcher Pid in launcher tracking info");
+                }
+
+                // did we create the env var with the correct pid?
+                if (!launcherPid.equals(envVarPid)) {
+                    System.out.println(tr);
+                    System.out.println("Error: wrong pid in creating env var");
+                    System.out.println("Error Info: launcherPid = " + launcherPid);
+                    System.out.println("Error Info: envVarPid   = " + envVarPid);
+                    throw new RuntimeException("Error: wrong pid in creating env var");
+                }
+            }
+
+
+            // --- Test 1b
+            if (!tr.contains("NativeMemoryTracking: got value " + NMT_Option_Value)) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: Valid param failed to set env variable");
+            }
+
+            // --- Test 2
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking=",
+                        "-version");
+            if (tr.contains("NativeMemoryTracking:")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param caused env variable to be erroneously created");
+            }
+            if (!tr.contains("Syntax error, expecting -XX:NativeMemoryTracking=")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param not checked by JVM");
+            }
+
+            // --- Test 3
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking",
+                        "-version");
+            if (tr.contains("NativeMemoryTracking:")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param caused env variable to be erroneously created");
+            }
+            if (!tr.contains("Syntax error, expecting -XX:NativeMemoryTracking=")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param not checked by JVM");
+            }
+            // --- Test 4
+            tr = doExec(envMap,javaCmd, "-XX:NativeMemoryTracking=BADVALUE",
+                        "-version");
+            if (!tr.contains("expecting -XX:NativeMemoryTracking")) {
+                System.out.println(tr);
+                throw new RuntimeException("Error: invalid param did not get JVM Syntax error message");
+            }
+
+        } // NativeMemoryTracking
+
+
         // MacOSX specific tests ensue......
         if (!isMacOSX)
             return;
--- a/langtools/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -267,3 +267,4 @@
 aca19c52b24627a6b085cfeb433051a3e420cd81 jdk9-b22
 0402a91cd14b530b6e98452341ff853717948239 jdk9-b23
 980b18627fd3f4936be2d9e2b013abb461cb2ddb jdk9-b24
+d60b572d759449913d02478219ad87e0574a3909 jdk9-b25
--- a/langtools/make/build.properties	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/make/build.properties	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2014, Oracle and/or its affiliates. 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
@@ -168,6 +168,8 @@
 sjavac.tests = \
         tools/sjavac
 
+crules.tests = ../make/test/crules
+
 #
 
 # The following files require the latest JDK to be available.
--- a/langtools/make/build.xml	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/make/build.xml	Fri Aug 08 12:54:39 2014 -0700
@@ -760,7 +760,8 @@
     **** crules targets.
     -->
 
-    <target name="build-crules" depends="-def-compilecrules,-def-build-jar-with-services">
+    <target name="build-crules"
+            depends="-def-compilecrules,-def-build-jar-with-services,build-bootstrap-javac,-create-import-jdk-stubs">
         <compilecrules/>
         <build-jar-with-services
                     name="crules"
@@ -770,13 +771,19 @@
                     jarmainclass=""
                     jarclasspath="crules.jar"
                     service.type="com.sun.source.util.Plugin"
-                    service.provider="crules.MutableFieldsAnalyzer"/>
+                    service.provider="crules.CodingRulesAnalyzerPlugin"/>
         <build-tool name="crules"/>
     </target>
 
+    <target name="jtreg-crules" depends="build-javac,build-crules,-def-jtreg">
+        <jtreg-tool name="crules"
+                    tests="${crules.tests}"
+                    extra.jvmargs="-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar" />
+    </target>
+
     <target name="check-coding-rules" depends="build-bootstrap-javac,-create-import-jdk-stubs,build-crules">
         <build-classes includes="${javac.includes}"
-            plugin.options="-J-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar -Xplugin:mutable_fields_analyzer" />
+            plugin.options="-J-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar -Xplugin:coding_rules" />
     </target>
 
     <!--
@@ -1150,6 +1157,7 @@
             <attribute name="options" default="${other.jtreg.options}"/>
             <attribute name="keywords" default="-keywords:!ignore"/>
             <attribute name="jpda.jvmargs" default=""/>
+            <attribute name="extra.jvmargs" default=""/>
             <sequential>
                 <property name="coverage.options" value=""/>              <!-- default -->
                 <property name="coverage.classpath" value=""/>            <!-- default -->
@@ -1163,7 +1171,7 @@
                     samevm="@{samevm}" verbose="@{verbose}"
                     failonerror="false" resultproperty="jtreg.@{name}.result"
                     javacoptions="-g"
-                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}${build.classes.dir} @{jpda.jvmargs}">
+                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}${build.classes.dir} @{jpda.jvmargs} @{extra.jvmargs}">
                     <arg line="@{keywords}"/>
                     <arg line="@{options}"/>
                     <arg line="@{tests}"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/CodingRulesAnalyzerPlugin/Test.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,11 @@
+/**@test /nodynamiccopyright/
+ * @compile/fail/ref=Test.out -Xplugin:coding_rules -XDrawDiagnostics Test.java
+ */
+
+import com.sun.tools.javac.util.Assert;
+
+public class Test {
+    public void check(String value) {
+        Assert.check(value.trim().length() > 0, "value=" + value);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/CodingRulesAnalyzerPlugin/Test.out	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,2 @@
+Test.java:9:21: compiler.err.proc.messager: compiler.misc.crules.should.not.use.string.concatenation
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/MutableFieldsAnalyzer/Test.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,9 @@
+/**@test /nodynamiccopyright/
+ * @compile/fail/ref=Test.out -Xplugin:coding_rules -XDrawDiagnostics Test.java
+ */
+
+package com.sun.tools.javac;
+
+public class Test {
+    public static String mutable;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/test/crules/MutableFieldsAnalyzer/Test.out	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,2 @@
+Test.java:8:26: compiler.err.proc.messager: compiler.misc.crules.err.var.must.be.final: public static String mutable
+1 error
--- a/langtools/make/tools/crules/AbstractCodingRulesAnalyzer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/make/tools/crules/AbstractCodingRulesAnalyzer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -27,64 +27,43 @@
 import java.util.Locale;
 import java.util.ResourceBundle;
 
-import javax.lang.model.element.TypeElement;
-import javax.tools.JavaFileObject;
-
-import com.sun.source.tree.Tree;
 import com.sun.source.util.JavacTask;
-import com.sun.source.util.Plugin;
-import com.sun.source.util.TaskEvent;
-import com.sun.source.util.TaskListener;
-import com.sun.source.util.Trees;
 import com.sun.tools.javac.api.BasicJavacTask;
+import com.sun.tools.javac.code.Symtab;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.TreeScanner;
 import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
 import com.sun.tools.javac.util.Log;
+import com.sun.tools.javac.util.Options;
+import com.sun.tools.javac.util.RawDiagnosticFormatter;
 
 import static com.sun.source.util.TaskEvent.Kind;
 
-public abstract class AbstractCodingRulesAnalyzer implements Plugin {
+public abstract class AbstractCodingRulesAnalyzer {
 
-    protected Log log;
-    protected Trees trees;
+    private   final Log log;
+    private   final boolean rawDiagnostics;
+    private   final JCDiagnostic.Factory diags;
+    private   final Options options;
+    protected final Messages messages;
+    protected final Symtab syms;
     protected TreeScanner treeVisitor;
     protected Kind eventKind;
-    protected Messages messages;
 
-    public void init(JavacTask task, String... args) {
+    public AbstractCodingRulesAnalyzer(JavacTask task) {
         BasicJavacTask impl = (BasicJavacTask)task;
         Context context = impl.getContext();
         log = Log.instance(context);
-        trees = Trees.instance(task);
+        options = Options.instance(context);
+        rawDiagnostics = options.isSet("rawDiagnostics");
+        diags = JCDiagnostic.Factory.instance(context);
         messages = new Messages();
-        task.addTaskListener(new PostAnalyzeTaskListener());
+        syms = Symtab.instance(context);
     }
 
-    public class PostAnalyzeTaskListener implements TaskListener {
-
-        @Override
-        public void started(TaskEvent taskEvent) {}
-
-        @Override
-        public void finished(TaskEvent taskEvent) {
-            if (taskEvent.getKind().equals(eventKind)) {
-                TypeElement typeElem = taskEvent.getTypeElement();
-                Tree tree = trees.getTree(typeElem);
-                if (tree != null) {
-                    JavaFileObject prevSource = log.currentSourceFile();
-                    try {
-                        log.useSource(taskEvent.getCompilationUnit().getSourceFile());
-                        treeVisitor.scan((JCTree)tree);
-                    } finally {
-                        log.useSource(prevSource);
-                    }
-                }
-            }
-        }
-    }
-
-    class Messages {
+    protected class Messages {
         ResourceBundle bundle;
 
         Messages() {
@@ -93,7 +72,14 @@
         }
 
         public void error(JCTree tree, String code, Object... args) {
-            String msg = (code == null) ? (String) args[0] : localize(code, args);
+            String msg;
+            if (rawDiagnostics) {
+                RawDiagnosticFormatter f = new RawDiagnosticFormatter(options);
+                msg = f.formatMessage(diags.create(DiagnosticType.FRAGMENT, log.currentSource(),
+                                                   tree.pos(), code, args), null);
+            } else {
+                msg = (code == null) ? (String) args[0] : localize(code, args);
+            }
             log.error(tree, "proc.messager", msg.toString());
         }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/tools/crules/AssertCheckAnalyzer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package crules;
+
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent.Kind;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.tree.JCTree.JCExpression;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
+import com.sun.tools.javac.tree.JCTree.Tag;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeScanner;
+import com.sun.tools.javac.util.Assert;
+
+public class AssertCheckAnalyzer extends AbstractCodingRulesAnalyzer {
+
+    public AssertCheckAnalyzer(JavacTask task) {
+        super(task);
+        treeVisitor = new AssertCheckVisitor();
+        eventKind = Kind.ANALYZE;
+    }
+
+    class AssertCheckVisitor extends TreeScanner {
+
+        @Override
+        public void visitApply(JCMethodInvocation tree) {
+            Symbol method = TreeInfo.symbolFor(tree);
+            if (method != null &&
+                method.owner.getQualifiedName().contentEquals(Assert.class.getName()) &&
+                !method.name.contentEquals("error")) {
+                JCExpression lastParam = tree.args.last();
+                if (lastParam != null &&
+                    lastParam.type.tsym == syms.stringType.tsym &&
+                    lastParam.hasTag(Tag.PLUS)) {
+                    messages.error(tree, "crules.should.not.use.string.concatenation");
+                }
+            }
+
+            super.visitApply(tree);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/tools/crules/CodingRulesAnalyzerPlugin.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package crules;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.lang.model.element.TypeElement;
+import javax.tools.JavaFileObject;
+
+import com.sun.source.tree.Tree;
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.Plugin;
+import com.sun.source.util.TaskEvent;
+import com.sun.source.util.TaskEvent.Kind;
+import com.sun.source.util.TaskListener;
+import com.sun.source.util.Trees;
+import com.sun.tools.javac.api.BasicJavacTask;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Log;
+
+public class CodingRulesAnalyzerPlugin implements Plugin {
+
+    protected Log log;
+    protected Trees trees;
+
+    public void init(JavacTask task, String... args) {
+        BasicJavacTask impl = (BasicJavacTask)task;
+        Context context = impl.getContext();
+        log = Log.instance(context);
+        trees = Trees.instance(task);
+        task.addTaskListener(new PostAnalyzeTaskListener(
+                new MutableFieldsAnalyzer(task),
+                new AssertCheckAnalyzer(task)
+        ));
+    }
+
+    public class PostAnalyzeTaskListener implements TaskListener {
+        private final Map<Kind, List<AbstractCodingRulesAnalyzer>> analyzers = new HashMap<>();
+
+        public PostAnalyzeTaskListener(AbstractCodingRulesAnalyzer... analyzers) {
+            for (AbstractCodingRulesAnalyzer analyzer : analyzers) {
+                List<AbstractCodingRulesAnalyzer> currentAnalyzers = this.analyzers.get(analyzer.eventKind);
+
+                if (currentAnalyzers == null) {
+                    this.analyzers.put(analyzer.eventKind, currentAnalyzers = new ArrayList<>());
+                }
+
+                currentAnalyzers.add(analyzer);
+            }
+        }
+
+        @Override
+        public void started(TaskEvent taskEvent) {}
+
+        @Override
+        public void finished(TaskEvent taskEvent) {
+            List<AbstractCodingRulesAnalyzer> currentAnalyzers = this.analyzers.get(taskEvent.getKind());
+
+            if (currentAnalyzers != null) {
+                TypeElement typeElem = taskEvent.getTypeElement();
+                Tree tree = trees.getTree(typeElem);
+                if (tree != null) {
+                    JavaFileObject prevSource = log.currentSourceFile();
+                    try {
+                        log.useSource(taskEvent.getCompilationUnit().getSourceFile());
+                        for (AbstractCodingRulesAnalyzer analyzer : currentAnalyzers) {
+                            analyzer.treeVisitor.scan((JCTree)tree);
+                        }
+                    } finally {
+                        log.useSource(prevSource);
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public String getName() {
+        return "coding_rules";
+    }
+
+}
--- a/langtools/make/tools/crules/MutableFieldsAnalyzer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/make/tools/crules/MutableFieldsAnalyzer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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,24 +28,25 @@
 import java.util.List;
 import java.util.Map;
 
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent.Kind;
 import com.sun.tools.javac.code.Kinds;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
 import com.sun.tools.javac.tree.TreeScanner;
 
-import static com.sun.source.util.TaskEvent.Kind;
-import static com.sun.tools.javac.code.Flags.*;
-import static com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import static com.sun.tools.javac.code.Flags.ENUM;
+import static com.sun.tools.javac.code.Flags.FINAL;
+import static com.sun.tools.javac.code.Flags.STATIC;
+import static com.sun.tools.javac.code.Flags.SYNTHETIC;
 
 public class MutableFieldsAnalyzer extends AbstractCodingRulesAnalyzer {
 
-    public MutableFieldsAnalyzer() {
+    public MutableFieldsAnalyzer(JavacTask task) {
+        super(task);
         treeVisitor = new MutableFieldsVisitor();
         eventKind = Kind.ANALYZE;
     }
 
-    public String getName() {
-        return "mutable_fields_analyzer";
-    }
-
     private boolean ignoreField(String className, String field) {
         List<String> currentFieldsToIgnore =
                 classFieldsToIgnoreMap.get(className);
@@ -89,7 +90,7 @@
     private static final String packageToCheck = "com.sun.tools.javac";
 
     private static final Map<String, List<String>> classFieldsToIgnoreMap =
-                new HashMap<String, List<String>>();
+                new HashMap<>();
 
     static {
         classFieldsToIgnoreMap.
--- a/langtools/make/tools/crules/resources/crules.properties	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/make/tools/crules/resources/crules.properties	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -26,3 +26,5 @@
 # 0: symbol
 crules.err.var.must.be.final=\
     Static variable {0} must be final
+crules.should.not.use.string.concatenation=\
+    Should not use string concatenation.
--- a/langtools/src/share/classes/com/sun/tools/javac/code/ClassFinder.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/ClassFinder.java	Fri Aug 08 12:54:39 2014 -0700
@@ -103,6 +103,10 @@
      */
     private final JavaFileManager fileManager;
 
+    /** Dependency tracker
+     */
+    private final Dependencies dependencies;
+
     /** Factory for diagnostics
      */
     JCDiagnostic.Factory diagFactory;
@@ -150,6 +154,7 @@
         names = Names.instance(context);
         syms = Symtab.instance(context);
         fileManager = context.get(JavaFileManager.class);
+        dependencies = Dependencies.instance(context);
         if (fileManager == null)
             throw new AssertionError("FileManager initialization error");
         diagFactory = JCDiagnostic.Factory.instance(context);
@@ -179,18 +184,23 @@
      */
     private void complete(Symbol sym) throws CompletionFailure {
         if (sym.kind == TYP) {
-            ClassSymbol c = (ClassSymbol)sym;
-            c.members_field = new Scope.ErrorScope(c); // make sure it's always defined
-            annotate.enterStart();
             try {
-                completeOwners(c.owner);
-                completeEnclosing(c);
+                ClassSymbol c = (ClassSymbol) sym;
+                dependencies.push(c);
+                c.members_field = new Scope.ErrorScope(c); // make sure it's always defined
+                annotate.enterStart();
+                try {
+                    completeOwners(c.owner);
+                    completeEnclosing(c);
+                } finally {
+                    // The flush needs to happen only after annotations
+                    // are filled in.
+                    annotate.enterDoneWithoutFlush();
+                }
+                fillIn(c);
             } finally {
-                // The flush needs to happen only after annotations
-                // are filled in.
-                annotate.enterDoneWithoutFlush();
+                dependencies.pop();
             }
-            fillIn(c);
         } else if (sym.kind == PCK) {
             PackageSymbol p = (PackageSymbol)sym;
             try {
@@ -257,7 +267,6 @@
                                                         + classfile.toUri());
                     }
                 }
-                return;
             } finally {
                 currentClassFile = previousClassFile;
             }
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Fri Aug 08 12:54:39 2014 -0700
@@ -66,7 +66,7 @@
                 flags &= ~flag.value;
             }
         }
-        Assert.check(flags == 0, "Flags parameter contains unknown flags " + flags);
+        Assert.check(flags == 0);
         return flagSet;
     }
 
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. 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
@@ -67,22 +67,19 @@
         private TypePathEntry(TypePathEntryKind tag) {
             Assert.check(tag == TypePathEntryKind.ARRAY ||
                     tag == TypePathEntryKind.INNER_TYPE ||
-                    tag == TypePathEntryKind.WILDCARD,
-                    "Invalid TypePathEntryKind: " + tag);
+                    tag == TypePathEntryKind.WILDCARD);
             this.tag = tag;
             this.arg = 0;
         }
 
         public TypePathEntry(TypePathEntryKind tag, int arg) {
-            Assert.check(tag == TypePathEntryKind.TYPE_ARGUMENT,
-                    "Invalid TypePathEntryKind: " + tag);
+            Assert.check(tag == TypePathEntryKind.TYPE_ARGUMENT);
             this.tag = tag;
             this.arg = arg;
         }
 
         public static TypePathEntry fromBinary(int tag, int arg) {
-            Assert.check(arg == 0 || tag == TypePathEntryKind.TYPE_ARGUMENT.tag,
-                    "Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
+            Assert.check(arg == 0 || tag == TypePathEntryKind.TYPE_ARGUMENT.tag);
             switch (tag) {
             case 0:
                 return ARRAY;
@@ -351,7 +348,7 @@
         Iterator<Integer> iter = list.iterator();
         while (iter.hasNext()) {
             Integer fst = iter.next();
-            Assert.check(iter.hasNext(), "Could not decode type path: " + list);
+            Assert.check(iter.hasNext());
             Integer snd = iter.next();
             loc = loc.append(TypePathEntry.fromBinary(fst, snd));
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Aug 08 12:54:39 2014 -0700
@@ -49,6 +49,7 @@
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.tree.JCTree.JCPolyExpression.*;
 import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.Dependencies.AttributionKind;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.List;
 import static com.sun.tools.javac.code.Flags.*;
@@ -94,6 +95,7 @@
     final Annotate annotate;
     final DeferredLintHandler deferredLintHandler;
     final TypeEnvs typeEnvs;
+    final Dependencies dependencies;
 
     public static Attr instance(Context context) {
         Attr instance = context.get(attrKey);
@@ -123,6 +125,7 @@
         annotate = Annotate.instance(context);
         deferredLintHandler = DeferredLintHandler.instance(context);
         typeEnvs = TypeEnvs.instance(context);
+        dependencies = Dependencies.instance(context);
 
         Options options = Options.instance(context);
 
@@ -254,7 +257,7 @@
      *  @param env    The current environment.
      */
     boolean isAssignableAsBlankFinal(VarSymbol v, Env<AttrContext> env) {
-        Symbol owner = owner(env);
+        Symbol owner = env.info.scope.owner;
            // owner refers to the innermost variable, method or
            // initializer block declaration at this point.
         return
@@ -269,41 +272,6 @@
              ((v.flags() & STATIC) != 0) == Resolve.isStatic(env));
     }
 
-    /**
-     * Return the innermost enclosing owner symbol in a given attribution context
-     */
-    Symbol owner(Env<AttrContext> env) {
-        while (true) {
-            switch (env.tree.getTag()) {
-                case VARDEF:
-                    //a field can be owner
-                    VarSymbol vsym = ((JCVariableDecl)env.tree).sym;
-                    if (vsym.owner.kind == TYP) {
-                        return vsym;
-                    }
-                    break;
-                case METHODDEF:
-                    //method def is always an owner
-                    return ((JCMethodDecl)env.tree).sym;
-                case CLASSDEF:
-                    //class def is always an owner
-                    return ((JCClassDecl)env.tree).sym;
-                case BLOCK:
-                    //static/instance init blocks are owner
-                    Symbol blockSym = env.info.scope.owner;
-                    if ((blockSym.flags() & BLOCK) != 0) {
-                        return blockSym;
-                    }
-                    break;
-                case TOPLEVEL:
-                    //toplevel is always an owner (for pkge decls)
-                    return env.info.scope.owner;
-            }
-            Assert.checkNonNull(env.next);
-            env = env.next;
-        }
-    }
-
     /** Check that variable can be assigned to.
      *  @param pos    The current source code position.
      *  @param v      The assigned varaible
@@ -695,6 +663,7 @@
      */
     void attribTypeVariables(List<JCTypeParameter> typarams, Env<AttrContext> env) {
         for (JCTypeParameter tvar : typarams) {
+            dependencies.push(AttributionKind.TVAR, tvar);
             TypeVar a = (TypeVar)tvar.type;
             a.tsym.flags_field |= UNATTRIBUTED;
             a.bound = Type.noType;
@@ -710,6 +679,7 @@
                 types.setBounds(a, List.of(syms.objectType));
             }
             a.tsym.flags_field &= ~UNATTRIBUTED;
+            dependencies.pop();
         }
         for (JCTypeParameter tvar : typarams) {
             chk.checkNonCyclic(tvar.pos(), (TypeVar)tvar.type);
@@ -3815,7 +3785,7 @@
             // and are subject to definite assignment checking.
             if ((env.info.enclVar == v || v.pos > tree.pos) &&
                 v.owner.kind == TYP &&
-                canOwnInitializer(owner(env)) &&
+                enclosingInitEnv(env) != null &&
                 v.owner == env.info.scope.owner.enclClass() &&
                 ((v.flags() & STATIC) != 0) == Resolve.isStatic(env) &&
                 (!env.tree.hasTag(ASSIGN) ||
@@ -3835,6 +3805,36 @@
         }
 
         /**
+         * Returns the enclosing init environment associated with this env (if any). An init env
+         * can be either a field declaration env or a static/instance initializer env.
+         */
+        Env<AttrContext> enclosingInitEnv(Env<AttrContext> env) {
+            while (true) {
+                switch (env.tree.getTag()) {
+                    case VARDEF:
+                        JCVariableDecl vdecl = (JCVariableDecl)env.tree;
+                        if (vdecl.sym.owner.kind == TYP) {
+                            //field
+                            return env;
+                        }
+                        break;
+                    case BLOCK:
+                        if (env.next.tree.hasTag(CLASSDEF)) {
+                            //instance/static initializer
+                            return env;
+                        }
+                        break;
+                    case METHODDEF:
+                    case CLASSDEF:
+                    case TOPLEVEL:
+                        return null;
+                }
+                Assert.checkNonNull(env.next);
+                env = env.next;
+            }
+        }
+
+        /**
          * Check for illegal references to static members of enum.  In
          * an enum type, constructors and initializers may not
          * reference its static members unless they are constant.
@@ -3887,17 +3887,6 @@
                    v.name != names._class;
         }
 
-        /** Can the given symbol be the owner of code which forms part
-         *  if class initialization? This is the case if the symbol is
-         *  a type or field, or if the symbol is the synthetic method.
-         *  owning a block.
-         */
-        private boolean canOwnInitializer(Symbol sym) {
-            return
-                (sym.kind & (VAR | TYP)) != 0 ||
-                (sym.kind == MTH && (sym.flags() & BLOCK) != 0);
-        }
-
     Warner noteWarner = new Warner();
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Aug 08 12:54:39 2014 -0700
@@ -2765,7 +2765,7 @@
     }
 
     public void validateTypeAnnotation(JCAnnotation a, boolean isTypeParameter) {
-        Assert.checkNonNull(a.type, "annotation tree hasn't been attributed yet: " + a);
+        Assert.checkNonNull(a.type);
         validateAnnotationTree(a);
 
         if (a.hasTag(TYPE_ANNOTATION) &&
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Aug 08 12:54:39 2014 -0700
@@ -29,6 +29,7 @@
 import com.sun.tools.javac.tree.JCTree.JCTypeCast;
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.GraphUtils.DottableNode;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.code.*;
@@ -40,9 +41,9 @@
 import com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph.Node;
 import com.sun.tools.javac.comp.Resolve.InapplicableMethodException;
 import com.sun.tools.javac.comp.Resolve.VerboseResolutionMode;
-import com.sun.tools.javac.util.GraphUtils.TarjanNode;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.EnumSet;
@@ -50,6 +51,7 @@
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 
 import static com.sun.tools.javac.code.TypeTag.*;
@@ -1607,11 +1609,6 @@
         private DependencyKind(String dotSyle) {
             this.dotSyle = dotSyle;
         }
-
-        @Override
-        public String getDotStyle() {
-            return dotSyle;
-        }
     }
 
     /**
@@ -1684,7 +1681,7 @@
              * updates on the structure of the graph this node belongs to (used to
              * keep dependencies in sync).
              */
-            class Node extends GraphUtils.TarjanNode<ListBuffer<Type>> {
+            class Node extends GraphUtils.TarjanNode<ListBuffer<Type>, Node> implements DottableNode<ListBuffer<Type>, Node> {
 
                 /** map listing all dependencies (grouped by kind) */
                 EnumMap<DependencyKind, Set<Node>> deps;
@@ -1699,33 +1696,12 @@
                     return DependencyKind.values();
                 }
 
-                @Override
-                public String getDependencyName(GraphUtils.Node<ListBuffer<Type>> to, GraphUtils.DependencyKind dk) {
-                    if (dk == DependencyKind.STUCK) return "";
-                    else {
-                        StringBuilder buf = new StringBuilder();
-                        String sep = "";
-                        for (Type from : data) {
-                            UndetVar uv = (UndetVar)inferenceContext.asUndetVar(from);
-                            for (Type bound : uv.getBounds(InferenceBound.values())) {
-                                if (bound.containsAny(List.from(to.data))) {
-                                    buf.append(sep);
-                                    buf.append(bound);
-                                    sep = ",";
-                                }
-                            }
-                        }
-                        return buf.toString();
-                    }
-                }
-
-                @Override
                 public Iterable<? extends Node> getAllDependencies() {
                     return getDependencies(DependencyKind.values());
                 }
 
                 @Override
-                public Iterable<? extends TarjanNode<ListBuffer<Type>>> getDependenciesByKind(GraphUtils.DependencyKind dk) {
+                public Collection<? extends Node> getDependenciesByKind(GraphUtils.DependencyKind dk) {
                     return getDependencies((DependencyKind)dk);
                 }
 
@@ -1855,6 +1831,36 @@
                         }
                     }
                 }
+
+                @Override
+                public Properties nodeAttributes() {
+                    Properties p = new Properties();
+                    p.put("label", toString());
+                    return p;
+                }
+
+                @Override
+                public Properties dependencyAttributes(Node sink, GraphUtils.DependencyKind dk) {
+                    Properties p = new Properties();
+                    p.put("style", ((DependencyKind)dk).dotSyle);
+                    if (dk == DependencyKind.STUCK) return p;
+                    else {
+                        StringBuilder buf = new StringBuilder();
+                        String sep = "";
+                        for (Type from : data) {
+                            UndetVar uv = (UndetVar)inferenceContext.asUndetVar(from);
+                            for (Type bound : uv.getBounds(InferenceBound.values())) {
+                                if (bound.containsAny(List.from(sink.data))) {
+                                    buf.append(sep);
+                                    buf.append(bound);
+                                    sep = ",";
+                                }
+                            }
+                        }
+                        p.put("label", buf.toString());
+                    }
+                    return p;
+                }
             }
 
             /** the nodes in the inference graph */
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Aug 08 12:54:39 2014 -0700
@@ -55,6 +55,7 @@
 import static com.sun.tools.javac.code.TypeTag.TYPEVAR;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
+import com.sun.tools.javac.util.Dependencies.AttributionKind;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
@@ -90,6 +91,7 @@
     private final DeferredLintHandler deferredLintHandler;
     private final Lint lint;
     private final TypeEnvs typeEnvs;
+    private final Dependencies dependencies;
 
     public static MemberEnter instance(Context context) {
         MemberEnter instance = context.get(memberEnterKey);
@@ -116,6 +118,7 @@
         deferredLintHandler = DeferredLintHandler.instance(context);
         lint = Lint.instance(context);
         typeEnvs = TypeEnvs.instance(context);
+        dependencies = Dependencies.instance(context);
         allowTypeAnnos = source.allowTypeAnnotations();
     }
 
@@ -555,6 +558,7 @@
 
     // process the non-static imports and the static imports of types.
     public void visitImport(JCImport tree) {
+        dependencies.push(AttributionKind.IMPORT, tree);
         JCFieldAccess imp = (JCFieldAccess)tree.qualid;
         Name name = TreeInfo.name(imp);
 
@@ -581,6 +585,7 @@
                 importNamed(tree.pos(), c, env);
             }
         }
+        dependencies.pop();
     }
 
     public void visitMethodDef(JCMethodDecl tree) {
@@ -952,6 +957,8 @@
         JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
         DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
         try {
+            dependencies.push(c);
+
             // Save class environment for later member enter (2) processing.
             halfcompleted.append(env);
 
@@ -990,16 +997,21 @@
             Type supertype;
 
             if (tree.extending != null) {
-                supertype = attr.attribBase(tree.extending, baseEnv,
-                                            true, false, true);
-                if (sym.isAnonymous()) {
-                    annotate.annotateAnonClassDefLater(tree.extending,
-                                                       tree.mods.annotations,
-                                                       baseEnv, sym, tree.pos(),
-                                                       annotate.extendsCreator);
-                } else {
-                    annotate.annotateTypeLater(tree.extending, baseEnv, sym,
-                                               tree.pos(), annotate.extendsCreator);
+                dependencies.push(AttributionKind.EXTENDS, tree.extending);
+                try {
+                    supertype = attr.attribBase(tree.extending, baseEnv,
+                            true, false, true);
+                    if (sym.isAnonymous()) {
+                        annotate.annotateAnonClassDefLater(tree.extending,
+                                tree.mods.annotations,
+                                baseEnv, sym, tree.pos(),
+                                annotate.extendsCreator);
+                    } else {
+                        annotate.annotateTypeLater(tree.extending, baseEnv, sym,
+                                tree.pos(), annotate.extendsCreator);
+                    }
+                } finally {
+                    dependencies.pop();
                 }
             } else {
                 supertype = ((tree.mods.flags & Flags.ENUM) != 0)
@@ -1018,29 +1030,34 @@
             List<JCExpression> interfaceTrees = tree.implementing;
             int i = 0;
             for (JCExpression iface : interfaceTrees) {
-                Type it = attr.attribBase(iface, baseEnv, false, true, true);
-                if (it.hasTag(CLASS)) {
-                    interfaces.append(it);
-                    if (all_interfaces != null) all_interfaces.append(it);
-                    chk.checkNotRepeated(iface.pos(), types.erasure(it), interfaceSet);
-                } else {
-                    if (all_interfaces == null)
-                        all_interfaces = new ListBuffer<Type>().appendList(interfaces);
-                    all_interfaces.append(modelMissingTypes(it, iface, true));
+                dependencies.push(AttributionKind.IMPLEMENTS, iface);
+                try {
+                    Type it = attr.attribBase(iface, baseEnv, false, true, true);
+                    if (it.hasTag(CLASS)) {
+                        interfaces.append(it);
+                        if (all_interfaces != null) all_interfaces.append(it);
+                        chk.checkNotRepeated(iface.pos(), types.erasure(it), interfaceSet);
+                    } else {
+                        if (all_interfaces == null)
+                            all_interfaces = new ListBuffer<Type>().appendList(interfaces);
+                        all_interfaces.append(modelMissingTypes(it, iface, true));
 
+                    }
+                    if (sym.isAnonymous()) {
+                        // Note: if an anonymous class ever has more than
+                        // one supertype for some reason, this will
+                        // incorrectly attach tree.mods.annotations to ALL
+                        // supertypes, not just the first.
+                        annotate.annotateAnonClassDefLater(iface, tree.mods.annotations,
+                                baseEnv, sym, tree.pos(),
+                                annotate.implementsCreator(i++));
+                    } else {
+                        annotate.annotateTypeLater(iface, baseEnv, sym, tree.pos(),
+                                annotate.implementsCreator(i++));
+                    }
+                } finally {
+                    dependencies.pop();
                 }
-                if (sym.isAnonymous()) {
-                    // Note: if an anonymous class ever has more than
-                    // one supertype for some reason, this will
-                    // incorrectly attach tree.mods.annotations to ALL
-                    // supertypes, not just the first.
-                    annotate.annotateAnonClassDefLater(iface, tree.mods.annotations,
-                                                       baseEnv, sym, tree.pos(),
-                                                       annotate.implementsCreator(i++));
-                } else {
-                    annotate.annotateTypeLater(iface, baseEnv, sym, tree.pos(),
-                                               annotate.implementsCreator(i++));
-            }
             }
 
             if ((c.flags_field & ANNOTATION) != 0) {
@@ -1157,6 +1174,7 @@
         } finally {
             deferredLintHandler.setPos(prevLintPos);
             log.useSource(prev);
+            dependencies.pop();
         }
 
         // Enter all member fields and methods of a set of half completed
--- a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java	Fri Aug 08 12:54:39 2014 -0700
@@ -488,6 +488,10 @@
                 }
             }
 
+            if (options.isSet("completionDeps")) {
+                Dependencies.GraphDependencies.preRegister(context);
+            }
+
             comp = JavaCompiler.instance(context);
 
             // FIXME: this code will not be invoked if using JavacTask.parse/analyze/generate
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Assert.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Assert.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,7 +25,6 @@
 
 package com.sun.tools.javac.util;
 
-
 /**
  * Simple facility for unconditional assertions.
  * The methods in this class are described in terms of equivalent assert
@@ -87,7 +86,7 @@
     }
 
     /** Equivalent to
-     *   assert cond : value;
+     *   assert cond : msg;
      */
     public static void check(boolean cond, String msg) {
         if (!cond)
@@ -103,7 +102,7 @@
     }
 
     /** Equivalent to
-     *   assert (o == null) : value;
+     *   assert (o == null) : msg;
      */
     public static void checkNull(Object o, String msg) {
         if (o != null)
@@ -111,7 +110,7 @@
     }
 
     /** Equivalent to
-     *   assert (o != null) : value;
+     *   assert (o != null) : msg;
      */
     public static <T> T checkNonNull(T t, String msg) {
         if (t == null)
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java	Fri Aug 08 12:54:39 2014 -0700
@@ -183,7 +183,7 @@
      */
     public void incl(int x) {
         Assert.check(currentState != BitsState.UNKNOWN);
-        Assert.check(x >= 0, "Value of x " + x);
+        Assert.check(x >= 0);
         sizeTo((x >>> wordshift) + 1);
         bits[x >>> wordshift] = bits[x >>> wordshift] |
             (1 << (x & wordmask));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Dependencies.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,559 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.javac.util;
+
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.Completer;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
+import com.sun.tools.javac.main.JavaCompiler;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.util.GraphUtils.DotVisitor;
+import com.sun.tools.javac.util.GraphUtils.NodeVisitor;
+
+import java.io.Closeable;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+
+import javax.tools.JavaFileObject;
+
+/**
+ *  This class is used to track dependencies in the javac symbol completion process.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public abstract class Dependencies {
+
+    protected static final Context.Key<Dependencies> dependenciesKey = new Context.Key<>();
+
+    public static Dependencies instance(Context context) {
+        Dependencies instance = context.get(dependenciesKey);
+        if (instance == null) {
+            //use a do-nothing implementation in case no other implementation has been set by preRegister
+            instance = new DummyDependencies(context);
+        }
+        return instance;
+    }
+
+    Dependencies(Context context) {
+        context.put(dependenciesKey, this);
+    }
+
+    /**
+     * This enum models different kinds of attribution actions triggered during
+     * symbol completion.
+     */
+    public enum AttributionKind {
+        /**
+         * Attribution of superclass (i.e. @{code extends} clause).
+         */
+        EXTENDS {
+            @Override
+            String format(JCTree tree) {
+                return "extends " + super.format(tree);
+            }
+        },
+        /**
+         * Attribution of superinterface (i.e. an type in the @{code interface} clause).
+         */
+        IMPLEMENTS {
+            @Override
+            String format(JCTree tree) {
+                return "implements " + super.format(tree);
+            }
+        },
+        /**
+         * Attribution of an import statement
+         */
+        IMPORT,
+        /**
+         * Attribution of type-variable bound
+         */
+        TVAR {
+            @Override
+            String format(JCTree tree) {
+                return "<" + super.format(tree) + ">";
+            }
+        };
+
+        String format(JCTree tree) {
+            return tree.toString();
+        }
+    }
+
+    /**
+     * Push a new completion node on the stack.
+     */
+    abstract public void push(ClassSymbol s);
+
+    /**
+     * Push a new attribution node on the stack.
+     */
+    abstract public void push(AttributionKind ak, JCTree t);
+
+    /**
+     * Remove current dependency node from the stack.
+     */
+    abstract public void pop();
+
+    /**
+     * This class creates a graph of all dependencies as symbols are completed;
+     * when compilation finishes, the resulting dependecy graph is then dumped
+     * onto a dot file. Several options are provided to customise the output of the graph.
+     */
+    public static class GraphDependencies extends Dependencies implements Closeable, Completer {
+
+        /**
+         * set of enabled dependencies modes
+         */
+        private EnumSet<DependenciesMode> dependenciesModes;
+
+        /**
+         * file in which the dependency graph should be written
+         */
+        private String dependenciesFile;
+
+        /**
+         * Register a Context.Factory to create a Dependencies.
+         */
+        public static void preRegister(final Context context) {
+            context.put(dependenciesKey, new Context.Factory<Dependencies>() {
+                public Dependencies make(Context c) {
+                    Dependencies deps = new GraphDependencies(context);
+                    return deps;
+                }
+            });
+        }
+
+        /**
+         * Build a Dependencies instance.
+         */
+        GraphDependencies(Context context) {
+            super(context);
+            Options options = Options.instance(context);
+            //fetch filename
+            String[] modes = options.get("completionDeps").split(",");
+            for (String mode : modes) {
+                if (mode.startsWith("file=")) {
+                    dependenciesFile = mode.substring(5);
+                }
+            }
+            //parse modes
+            dependenciesModes = DependenciesMode.getDependenciesModes(modes);
+            //add to closeables
+            JavaCompiler compiler = JavaCompiler.instance(context);
+            compiler.closeables = compiler.closeables.prepend(this);
+        }
+
+        enum DependenciesMode {
+            SOURCE("source"),
+            CLASS("class"),
+            REDUNDANT("redundant"),
+            SIDE_EFFECTS("side-effects");
+
+            final String opt;
+
+            private DependenciesMode(String opt) {
+                this.opt = opt;
+            }
+
+            /**
+             * This method is used to parse the {@code completionDeps} option.
+             * Possible modes are separated by colon; a mode can be excluded by
+             * prepending '-' to its name. Finally, the special mode 'all' can be used to
+             * add all modes to the resulting enum.
+             */
+            static EnumSet<DependenciesMode> getDependenciesModes(String[] modes) {
+                EnumSet<DependenciesMode> res = EnumSet.noneOf(DependenciesMode.class);
+                Collection<String> args = Arrays.asList(modes);
+                if (args.contains("all")) {
+                    res = EnumSet.allOf(DependenciesMode.class);
+                }
+                for (DependenciesMode mode : values()) {
+                    if (args.contains(mode.opt)) {
+                        res.add(mode);
+                    } else if (args.contains("-" + mode.opt)) {
+                        res.remove(mode);
+                    }
+                }
+                return res;
+            }
+        }
+
+        /**
+         * Class representing a node in the dependency graph. Nodes are of two main
+         * kinds: (i) symbol nodes, corresponding to symbol completion requests
+         * (either from source or classfile); (ii) attribution nodes, corresponding to
+         * attribution actions triggered during (source) completion.
+         */
+        static abstract class Node extends GraphUtils.AbstractNode<String, Node>
+                implements GraphUtils.DottableNode<String, Node> {
+
+            /**
+             * Model the dependencies between nodes.
+             */
+            enum DependencyKind implements GraphUtils.DependencyKind {
+                /**
+                 * standard dependency - i.e. completion of the source node depends
+                 * on completion of the sink node.
+                 */
+                REQUIRES("solid"),
+                /**
+                 * soft dependencies - i.e. completion of the source node depends
+                 * on side-effects of the source node. These dependencies are meant
+                 * to capture the order in which javac processes all dependants of a given node.
+                 */
+                SIDE_EFFECTS("dashed");
+
+                final String dotStyle;
+
+                DependencyKind(String dotStyle) {
+                    this.dotStyle = dotStyle;
+                }
+            }
+
+            /**
+             * dependant nodes grouped by kind
+             */
+            EnumMap<DependencyKind, List<Node>> depsByKind;
+
+            Node(String value) {
+                super(value);
+                this.depsByKind = new EnumMap<>(DependencyKind.class);
+                for (DependencyKind depKind : DependencyKind.values()) {
+                    depsByKind.put(depKind, new ArrayList<Node>());
+                }
+            }
+
+            void addDependency(DependencyKind depKind, Node dep) {
+                List<Node> deps = depsByKind.get(depKind);
+                if (!deps.contains(dep)) {
+                    deps.add(dep);
+                }
+            }
+
+            @Override
+            public boolean equals(Object obj) {
+                return obj instanceof Node &&
+                        data.equals(((Node) obj).data);
+            }
+
+            @Override
+            public int hashCode() {
+                return data.hashCode();
+            }
+
+            @Override
+            public GraphUtils.DependencyKind[] getSupportedDependencyKinds() {
+                return DependencyKind.values();
+            }
+
+            @Override
+            public java.util.Collection<? extends Node> getDependenciesByKind(GraphUtils.DependencyKind dk) {
+                List<Node> deps = depsByKind.get(dk);
+                if (dk == DependencyKind.REQUIRES) {
+                    return deps;
+                } else {
+                    Set<Node> temp = new HashSet<>(deps);
+                    temp.removeAll(depsByKind.get(DependencyKind.REQUIRES));
+                    return temp;
+                }
+            }
+
+            @Override
+            public Properties nodeAttributes() {
+                Properties p = new Properties();
+                p.put("label", DotVisitor.wrap(toString()));
+                return p;
+            }
+
+            @Override
+            public Properties dependencyAttributes(Node to, GraphUtils.DependencyKind dk) {
+                Properties p = new Properties();
+                p.put("style", ((DependencyKind) dk).dotStyle);
+                return p;
+            }
+        }
+
+        /**
+         * This is a dependency node used to model symbol completion requests.
+         * Completion requests can come from either source or class.
+         */
+        static class CompletionNode extends Node {
+
+            /**
+             * Completion kind (source vs. classfile)
+             */
+            enum Kind {
+                /**
+                 * Source completion request
+                 */
+                SOURCE("solid"),
+                /**
+                 * Classfile completion request
+                 */
+                CLASS("dotted");
+
+                final String dotStyle;
+
+                Kind(String dotStyle) {
+                    this.dotStyle = dotStyle;
+                }
+            }
+
+            final Kind ck;
+
+            CompletionNode(ClassSymbol sym) {
+                super(sym.getQualifiedName().toString());
+                //infer completion kind by looking at the symbol fields
+                boolean fromClass = (sym.classfile == null && sym.sourcefile == null) ||
+                        (sym.classfile != null && sym.classfile.getKind() == JavaFileObject.Kind.CLASS);
+                ck = fromClass ?
+                        CompletionNode.Kind.CLASS :
+                        CompletionNode.Kind.SOURCE;
+            }
+
+            @Override
+            public Properties nodeAttributes() {
+                Properties p = super.nodeAttributes();
+                p.put("style", ck.dotStyle);
+                p.put("shape", "ellipse");
+                return p;
+            }
+        }
+
+        /**
+         * This is a dependency node used to model attribution actions triggered during
+         * source symbol completion. The possible kinds of attribution actions are
+         * captured in {@link AttributionNode}.
+         */
+        static class AttributionNode extends Node {
+
+            AttributionNode(AttributionKind ak, JCTree tree) {
+                super(ak.format(tree));
+            }
+
+            @Override
+            public Properties nodeAttributes() {
+                Properties p = super.nodeAttributes();
+                p.put("shape", "box");
+                p.put("style", "solid");
+                return p;
+            }
+        }
+
+        /**
+         * stack of dependency nodes currently being processed
+         */
+        Stack<Node> nodeStack = new Stack<>();
+
+        /**
+         * map containing all dependency nodes seen so far
+         */
+        Map<String, Node> dependencyNodeMap = new LinkedHashMap<>();
+
+        @Override
+        public void push(ClassSymbol s) {
+            Node n = new CompletionNode(s);
+            if (n == push(n)) {
+                s.completer = this;
+            }
+        }
+
+        @Override
+        public void push(AttributionKind ak, JCTree t) {
+            push(new AttributionNode(ak, t));
+        }
+
+        /**
+         * Push a new dependency on the stack.
+         */
+        protected Node push(Node newNode) {
+            Node cachedNode = dependencyNodeMap.get(newNode.data);
+            if (cachedNode == null) {
+                dependencyNodeMap.put(newNode.data, newNode);
+            } else {
+                newNode = cachedNode;
+            }
+            if (!nodeStack.isEmpty()) {
+                Node currentNode = nodeStack.peek();
+                currentNode.addDependency(Node.DependencyKind.REQUIRES, newNode);
+            }
+            nodeStack.push(newNode);
+            return newNode;
+        }
+
+        @Override
+        public void pop() {
+            nodeStack.pop();
+        }
+
+        @Override
+        public void close() throws IOException {
+            if (dependenciesFile != null) {
+                if (!dependenciesModes.contains(DependenciesMode.REDUNDANT)) {
+                    //prune spurious edges
+                    new PruneVisitor().visit(dependencyNodeMap.values(), null);
+                }
+                if (!dependenciesModes.contains(DependenciesMode.CLASS)) {
+                    //filter class completions
+                    new FilterVisitor(CompletionNode.Kind.SOURCE).visit(dependencyNodeMap.values(), null);
+                }
+                if (!dependenciesModes.contains(DependenciesMode.SOURCE)) {
+                    //filter source completions
+                    new FilterVisitor(CompletionNode.Kind.CLASS).visit(dependencyNodeMap.values(), null);
+                }
+                if (dependenciesModes.contains(DependenciesMode.SIDE_EFFECTS)) {
+                    //add side-effects edges
+                    new SideEffectVisitor().visit(dependencyNodeMap.values(), null);
+                }
+                //write to file
+                try (FileWriter fw = new FileWriter(dependenciesFile)) {
+                    fw.append(GraphUtils.toDot(dependencyNodeMap.values(), "CompletionDeps", ""));
+                }
+            }
+        }
+
+        @Override
+        public void complete(Symbol sym) throws CompletionFailure {
+            push((ClassSymbol) sym);
+            pop();
+            sym.completer = this;
+        }
+
+        /**
+         * This visitor is used to generate the special side-effect dependencies
+         * given a graph containing only standard dependencies.
+         */
+        private static class SideEffectVisitor extends NodeVisitor<String, Node, Void> {
+            @Override
+            public void visitNode(Node node, Void arg) {
+                //do nothing
+            }
+
+            @Override
+            public void visitDependency(GraphUtils.DependencyKind dk, Node from, Node to, Void arg) {
+                //if we are adding multiple dependencies to same node
+                //make order explicit via special 'side-effect' dependencies
+                List<Node> deps = from.depsByKind.get(dk);
+                int pos = deps.indexOf(to);
+                if (dk == Node.DependencyKind.REQUIRES && pos > 0) {
+                    to.addDependency(Node.DependencyKind.SIDE_EFFECTS, deps.get(pos - 1));
+                }
+            }
+        }
+
+        /**
+         * This visitor is used to prune the graph from spurious edges using some heuristics.
+         */
+        private static class PruneVisitor extends NodeVisitor<String, Node, Void> {
+            @Override
+            public void visitNode(Node node, Void arg) {
+                //do nothing
+            }
+
+            @Override
+            public void visitDependency(GraphUtils.DependencyKind dk, Node from, Node to, Void arg) {
+                //heuristic - skips dependencies that are likely to be fake
+                if (from.equals(to) ||
+                        from.depsByKind.get(Node.DependencyKind.REQUIRES).contains(to)) {
+                    to.depsByKind.get(dk).remove(from);
+                }
+            }
+        }
+
+        /**
+         * This visitor is used to retain only completion nodes with given kind.
+         */
+        private class FilterVisitor extends NodeVisitor<String, Node, Void> {
+
+            CompletionNode.Kind ck;
+
+            private FilterVisitor(CompletionNode.Kind ck) {
+                this.ck = ck;
+            }
+
+            @Override
+            public void visitNode(Node node, Void arg) {
+                if (node instanceof CompletionNode) {
+                    if (((CompletionNode) node).ck != ck) {
+                        dependencyNodeMap.remove(node.data);
+                    }
+                }
+            }
+
+            @Override
+            public void visitDependency(GraphUtils.DependencyKind dk, Node from, Node to, Void arg) {
+                if (to instanceof CompletionNode) {
+                    if (((CompletionNode) to).ck != ck) {
+                        from.depsByKind.get(dk).remove(to);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Dummy class to be used when dependencies options are not set. This keeps
+     * performance cost of calling push/pop methods during completion marginally low.
+     */
+    private static class DummyDependencies extends Dependencies {
+
+        private DummyDependencies(Context context) {
+            super(context);
+        }
+
+        @Override
+        public void push(ClassSymbol s) {
+            //do nothing
+        }
+
+        @Override
+        public void push(AttributionKind ak, JCTree t) {
+            //do nothing
+        }
+
+        @Override
+        public void pop() {
+            //do nothing
+        }
+    }
+}
--- a/langtools/src/share/classes/com/sun/tools/javac/util/GraphUtils.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/GraphUtils.java	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,10 @@
 
 package com.sun.tools.javac.util;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Properties;
+
 /** <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
@@ -33,25 +37,65 @@
 public class GraphUtils {
 
     /**
-     * Basic interface for defining various dependency kinds. All dependency kinds
-     * must at least support basic capabilities to tell the DOT engine how to render them.
+     * Basic interface for defining various dependency kinds.
+     */
+    public interface DependencyKind { }
+
+    /**
+     * Common superinterfaces to all graph nodes.
      */
-    public interface DependencyKind {
+    public interface Node<D, N extends Node<D, N>> {
+        /**
+         * visitor method.
+         */
+        <A> void accept(NodeVisitor<D, N, A> visitor, A arg);
+    }
+
+    /**
+     * Visitor for graph nodes.
+     */
+    static abstract class NodeVisitor<D, N extends Node<D, N>, A> {
+        /**
+         * Visitor action for nodes.
+         */
+        public abstract void visitNode(N node, A arg);
         /**
-         * Returns the DOT representation (to be used in a {@code style} attribute
-         * that's most suited for this dependency kind.
+         * Visitor action for a dependency between 'from' and 'to' with given kind.
+         */
+        public abstract void visitDependency(DependencyKind dk, N from, N to, A arg);
+
+        /**
+         * Visitor entry point.
          */
-        String getDotStyle();
+        public void visit(Collection<? extends N> nodes, A arg) {
+            for (N n : new ArrayList<>(nodes)) {
+                n.accept(this, arg);
+            }
+        }
+    }
+
+    /**
+     * Optional interface for nodes supporting dot-based representation.
+     */
+    public interface DottableNode<D, N extends DottableNode<D, N>> extends Node<D, N> {
+        /**
+         * Retrieves the set of dot attributes associated with the node.
+         */
+        Properties nodeAttributes();
+        /**
+         * Retrieves the set of dot attributes associated with a given dependency.
+         */
+        Properties dependencyAttributes(N to, DependencyKind dk);
     }
 
     /**
      * This class is a basic abstract class for representing a node.
      * A node is associated with a given data.
      */
-    public static abstract class Node<D> {
+    public static abstract class AbstractNode<D, N extends AbstractNode<D, N>> implements Node<D, N> {
         public final D data;
 
-        public Node(D data) {
+        public AbstractNode(D data) {
             this.data = data;
         }
 
@@ -61,26 +105,32 @@
         public abstract DependencyKind[] getSupportedDependencyKinds();
 
         /**
-         * Get all dependencies, regardless of their kind.
+         * Get all dependencies of a given kind
          */
-        public abstract Iterable<? extends Node<D>> getAllDependencies();
-
-        /**
-         * Get a name for the dependency (of given kind) linking this node to a given node
-         */
-        public abstract String getDependencyName(Node<D> to, DependencyKind dk);
+        public abstract Collection<? extends N> getDependenciesByKind(DependencyKind dk);
 
         @Override
         public String toString() {
             return data.toString();
         }
+
+        @SuppressWarnings("unchecked")
+        public <A> void accept(NodeVisitor<D, N, A> visitor, A arg) {
+            visitor.visitNode((N)this, arg);
+            for (DependencyKind dk : getSupportedDependencyKinds()) {
+                for (N dep : new ArrayList<>(getDependenciesByKind(dk))) {
+                    visitor.visitDependency(dk, (N)this, dep, arg);
+                }
+            }
+        }
     }
 
     /**
      * This class specialized Node, by adding elements that are required in order
      * to perform Tarjan computation of strongly connected components.
      */
-    public static abstract class TarjanNode<D> extends Node<D> implements Comparable<TarjanNode<D>> {
+    public static abstract class TarjanNode<D, N extends TarjanNode<D, N>> extends AbstractNode<D, N>
+            implements Comparable<N> {
         int index = -1;
         int lowlink;
         boolean active;
@@ -89,11 +139,9 @@
             super(data);
         }
 
-        public abstract Iterable<? extends TarjanNode<D>> getAllDependencies();
+        public abstract Iterable<? extends N> getAllDependencies();
 
-        public abstract Iterable<? extends TarjanNode<D>> getDependenciesByKind(DependencyKind dk);
-
-        public int compareTo(TarjanNode<D> o) {
+        public int compareTo(N o) {
             return (index < o.index) ? -1 : (index == o.index) ? 0 : 1;
         }
     }
@@ -102,7 +150,7 @@
      * Tarjan's algorithm to determine strongly connected components of a
      * directed graph in linear time. Works on TarjanNode.
      */
-    public static <D, N extends TarjanNode<D>> List<? extends List<? extends N>> tarjan(Iterable<? extends N> nodes) {
+    public static <D, N extends TarjanNode<D, N>> List<? extends List<? extends N>> tarjan(Iterable<? extends N> nodes) {
         ListBuffer<List<N>> cycles = new ListBuffer<>();
         ListBuffer<N> stack = new ListBuffer<>();
         int index = 0;
@@ -114,15 +162,13 @@
         return cycles.toList();
     }
 
-    private static <D, N extends TarjanNode<D>> int tarjan(N v, int index, ListBuffer<N> stack, ListBuffer<List<N>> cycles) {
+    private static <D, N extends TarjanNode<D, N>> int tarjan(N v, int index, ListBuffer<N> stack, ListBuffer<List<N>> cycles) {
         v.index = index;
         v.lowlink = index;
         index++;
         stack.prepend(v);
         v.active = true;
-        for (TarjanNode<D> nd: v.getAllDependencies()) {
-            @SuppressWarnings("unchecked")
-            N n = (N)nd;
+        for (N n: v.getAllDependencies()) {
             if (n.index == -1) {
                 tarjan(n, index, stack, cycles);
                 v.lowlink = Math.min(v.lowlink, n.lowlink);
@@ -149,24 +195,45 @@
      * and {@code Node.printDependency} to display edge labels. The resulting
      * representation is also customizable with a graph name and a header.
      */
-    public static <D> String toDot(Iterable<? extends TarjanNode<D>> nodes, String name, String header) {
+    public static <D, N extends DottableNode<D, N>> String toDot(Collection<? extends N> nodes, String name, String header) {
         StringBuilder buf = new StringBuilder();
         buf.append(String.format("digraph %s {\n", name));
-        buf.append(String.format("label = \"%s\";\n", header));
-        //dump nodes
-        for (TarjanNode<D> n : nodes) {
-            buf.append(String.format("%s [label = \"%s\"];\n", n.hashCode(), n.toString()));
-        }
-        //dump arcs
-        for (TarjanNode<D> from : nodes) {
-            for (DependencyKind dk : from.getSupportedDependencyKinds()) {
-                for (TarjanNode<D> to : from.getDependenciesByKind(dk)) {
-                    buf.append(String.format("%s -> %s [label = \" %s \" style = %s ];\n",
-                            from.hashCode(), to.hashCode(), from.getDependencyName(to, dk), dk.getDotStyle()));
-                }
-            }
-        }
+        buf.append(String.format("label = %s;\n", DotVisitor.wrap(header)));
+        DotVisitor<D, N> dotVisitor = new DotVisitor<>();
+        dotVisitor.visit(nodes, buf);
         buf.append("}\n");
         return buf.toString();
     }
+
+    /**
+     * This visitor is used to dump the contents of a set of nodes of type {@link DottableNode}
+     * onto a string builder.
+     */
+    public static class DotVisitor<D, N extends DottableNode<D, N>> extends NodeVisitor<D, N, StringBuilder> {
+
+        @Override
+        public void visitDependency(DependencyKind dk, N from, N to, StringBuilder buf) {
+            buf.append(String.format("%s -> %s", from.hashCode(), to.hashCode()));
+            buf.append(formatProperties(from.dependencyAttributes(to, dk)));
+            buf.append('\n');
+        }
+
+        @Override
+        public void visitNode(N node, StringBuilder buf) {
+            buf.append(String.format("%s ", node.hashCode()));
+            buf.append(formatProperties(node.nodeAttributes()));
+            buf.append('\n');
+        }
+
+        protected String formatProperties(Properties p) {
+            return p.toString().replaceAll(",", " ")
+                .replaceAll("\\{", "[")
+                .replaceAll("\\}", "]");
+        }
+
+        protected static String wrap(String s) {
+            String res = "\"" + s + "\"";
+            return res.replaceAll("\n", "");
+        }
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Fri Aug 08 12:54:39 2014 -0700
@@ -575,6 +575,9 @@
                 }
                 reportError("err.ioerror", className, msg);
                 result = EXIT_ERROR;
+            } catch (OutOfMemoryError e) {
+                reportError("err.nomem");
+                result = EXIT_ERROR;
             } catch (Throwable t) {
                 StringWriter sw = new StringWriter();
                 PrintWriter pw = new PrintWriter(sw);
--- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Fri Aug 08 12:54:39 2014 -0700
@@ -18,6 +18,7 @@
 err.no.SourceFile.attribute=no SourceFile attribute
 err.source.file.not.found=source file not found
 err.bad.innerclasses.attribute=bad InnerClasses attribute for {0}
+err.nomem=Insufficient memory. To increase memory use -J-Xmx option.
 
 main.usage.summary=\
 Usage: {0} <options> <classes>\n\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/all/RunCodingRules.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8043643
+ * @summary Run the langtools coding rules over the langtools source code.
+ */
+
+
+import java.io.*;
+import java.nio.file.Files;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.tools.javac.util.Assert;
+
+public class RunCodingRules {
+    public static void main(String... args) throws Exception {
+        new RunCodingRules().run();
+    }
+
+    public void run() throws Exception {
+        File testSrc = new File(System.getProperty("test.src", "."));
+        File targetDir = new File(System.getProperty("test.classes", "."));
+        File sourceDir = null;
+        File crulesDir = null;
+        for (File d = testSrc; d != null; d = d.getParentFile()) {
+            if (new File(d, "TEST.ROOT").exists()) {
+                d = d.getParentFile();
+                File f = new File(d, "src/share/classes");
+                if (f.exists()) {
+                    sourceDir = f;
+                    f = new File(d, "make/tools");
+                    if (f.exists())
+                        crulesDir = f;
+                    break;
+                }
+            }
+        }
+
+        if (sourceDir == null || crulesDir == null) {
+            System.err.println("Warning: sources not found, test skipped.");
+            return ;
+        }
+
+        JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
+        StandardJavaFileManager fm = javaCompiler.getStandardFileManager(null, null, null);
+        DiagnosticListener<JavaFileObject> noErrors = diagnostic -> {
+            Assert.check(diagnostic.getKind() != Diagnostic.Kind.ERROR, diagnostic.toString());
+        };
+
+        List<File> crulesFiles = Files.walk(crulesDir.toPath())
+                                      .map(entry -> entry.toFile())
+                                      .filter(entry -> entry.getName().endsWith(".java"))
+                                      .filter(entry -> entry.getParentFile().getName().equals("crules"))
+                                      .collect(Collectors.toList());
+
+        File crulesTarget = new File(targetDir, "crules");
+        crulesTarget.mkdirs();
+        List<String> crulesOptions = Arrays.asList("-d", crulesTarget.getAbsolutePath());
+        javaCompiler.getTask(null, fm, noErrors, crulesOptions, null,
+                fm.getJavaFileObjectsFromFiles(crulesFiles)).call();
+        File registration = new File(crulesTarget, "META-INF/services/com.sun.source.util.Plugin");
+        registration.getParentFile().mkdirs();
+        try (Writer metaInfServices = new FileWriter(registration)) {
+            metaInfServices.write("crules.CodingRulesAnalyzerPlugin\n");
+        }
+
+        List<File> sources = Files.walk(sourceDir.toPath())
+                                  .map(entry -> entry.toFile())
+                                  .filter(entry -> entry.getName().endsWith(".java"))
+                                  .collect(Collectors.toList());
+
+        File sourceTarget = new File(targetDir, "classes");
+        sourceTarget.mkdirs();
+        String processorPath = crulesTarget.getAbsolutePath() + File.pathSeparator +
+                crulesDir.getAbsolutePath();
+        List<String> options = Arrays.asList("-d", sourceTarget.getAbsolutePath(),
+                "-processorpath", processorPath, "-Xplugin:coding_rules");
+        javaCompiler.getTask(null, fm, noErrors, options, null,
+                fm.getJavaFileObjectsFromFiles(sources)).call();
+    }
+}
--- a/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -36,14 +36,26 @@
 import static java.lang.String.format;
 import static java.util.stream.Collectors.*;
 
-
+/**
+ * Base class for LocalVariableTable and LocalVariableTypeTable attributes tests.
+ * To add tests cases you should extend this class.
+ * Then implement {@link #getVariableTables} to get LocalVariableTable or LocalVariableTypeTable attribute.
+ * Then add method with local variables.
+ * Finally, annotate method with information about expected variables and their types
+ * by several {@link LocalVariableTestBase.ExpectedLocals} annotations.
+ * To run test invoke {@link #test()} method.
+ * If there are variables with the same name, set different scopes for them.
+ *
+ * @see #test()
+ */
 public abstract class LocalVariableTestBase extends TestBase {
     public static final int DEFAULT_SCOPE = 0;
     private final ClassFile classFile;
     private final Class<?> clazz;
 
-    protected abstract List<VariableTable> getVariableTables(Code_attribute codeAttribute);
-
+    /**
+     * @param clazz class to test. Must contains annotated methods with expected results.
+     */
     public LocalVariableTestBase(Class<?> clazz) {
         this.clazz = clazz;
         try {
@@ -53,8 +65,12 @@
         }
     }
 
+    protected abstract List<VariableTable> getVariableTables(Code_attribute codeAttribute);
 
-    //info in the LocalVariableTable attribute is compared against expected info stored in annotations
+    /**
+     * Finds expected variables with their type in VariableTable.
+     * Also does consistency checks, like variables from the same scope must point to different indexes.
+     */
     public void test() throws IOException {
         List<java.lang.reflect.Method> testMethods = Stream.of(clazz.getDeclaredMethods())
                 .filter(m -> m.getAnnotationsByType(ExpectedLocals.class).length > 0)
@@ -198,7 +214,10 @@
         }
     }
 
-
+    /**
+     * LocalVariableTable and LocalVariableTypeTable are similar.
+     * VariableTable interface is introduced to test this attributes in the same way without code duplication.
+     */
     interface VariableTable {
 
         int localVariableTableLength();
@@ -231,14 +250,23 @@
         }
     }
 
+    /**
+     * Used to store expected results in sources
+     */
     @Retention(RetentionPolicy.RUNTIME)
     @Repeatable(Container.class)
     @interface ExpectedLocals {
+        /**
+         * @return name of a local variable
+         */
         String name();
 
+        /**
+         * @return type of local variable in the internal format.
+         */
         String type();
 
-        //variables from different scopes can share local variable table index and/or name.
+        //variables from different scopes can share the local variable table index and/or name.
         int scope() default DEFAULT_SCOPE;
     }
 
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,18 +30,41 @@
 import java.util.Map;
 import javax.tools.JavaFileObject;
 
+/**
+ * Base class for Source file attribute tests. Checks expected file name for specified classes in the SourceFile attribute.
+ * To add new tests you should extend the SourceFileTestBase class and invoke {@link #test} for static sources
+ * or {@link #compileAndTest} for generated sources. For more information see corresponding methods.
+ *
+ * @see #test
+ * @see #compileAndTest
+ */
 public class SourceFileTestBase extends TestBase {
-
+    /**
+     * Checks expected fileName for the specified class in the SourceFile attribute.
+     *
+     * @param classToTest class to check its SourceFile attribute
+     * @param fileName    expected name of the file from which the test file is compiled.
+     */
     protected void test(Class<?> classToTest, String fileName) throws Exception {
         assertAttributePresent(ClassFile.read(getClassFile(classToTest)), fileName);
     }
 
+    /**
+     * Checks expected fileName for the specified class in the SourceFile attribute.
+     *
+     * @param classToTest class name to check its SourceFile attribute
+     * @param fileName    expected name of the file from which the test file is compiled.
+     */
     protected void test(String classToTest, String fileName) throws Exception {
         assertAttributePresent(ClassFile.read(getClassFile(classToTest + ".class")), fileName);
     }
 
     /**
-     * Compile sourceCode and for all "classesToTest" checks SourceFile attribute.
+     * Compiles sourceCode and for each specified class name checks the SourceFile attribute.
+     * The file name is extracted from source code.
+     *
+     * @param sourceCode    source code to compile
+     * @param classesToTest class names to check their SourceFile attribute.
      */
     protected void compileAndTest(String sourceCode, String... classesToTest) throws Exception {
 
--- a/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -23,11 +23,14 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.io.PrintStream;
-import java.util.*;
+import java.util.List;
+import java.util.Objects;
 import java.util.function.Function;
 import java.util.stream.Stream;
-import javax.tools.*;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.ToolProvider;
 
 import static java.lang.String.format;
 import static java.lang.System.lineSeparator;
@@ -36,6 +39,11 @@
 import static java.util.stream.Collectors.joining;
 import static java.util.stream.Collectors.toList;
 
+/**
+ * Base class for class file attribute tests.
+ * Contains methods for compiling generated sources in memory,
+ * for reading files from disk and a lot of assert* methods.
+ */
 public class TestBase {
 
     public static final String LINE_SEPARATOR = lineSeparator();
@@ -66,35 +74,48 @@
         }
     }
 
+    /**
+     * Compiles sources in memory.
+     *
+     * @param sources to compile.
+     * @return memory file manager which contains class files and class loader.
+     */
     public InMemoryFileManager compile(String... sources)
             throws IOException, CompilationException {
         return compile(emptyList(), sources);
     }
 
     /**
-     * @param options - compiler options
-     * @param sources
+     * Compiles sources in memory.
+     *
+     * @param options compiler options.
+     * @param sources sources to compile.
      * @return map where key is className, value is corresponding ClassFile.
-     * @throws IOException
      */
-    public InMemoryFileManager compile(List<String> options, String...sources)
+    public InMemoryFileManager compile(List<String> options, String... sources)
             throws IOException, CompilationException {
         return compile(options, ToolBox.JavaSource::new, asList(sources));
     }
 
+    /**
+     * Compiles sources in memory.
+     *
+     * @param sources sources[i][0] - name of file, sources[i][1] - sources.
+     * @return map where key is className, value is corresponding ClassFile.
+     */
     public InMemoryFileManager compile(String[]... sources) throws IOException,
             CompilationException {
         return compile(emptyList(), sources);
     }
 
     /**
-     * @param options -  compiler options
-     * @param sources - sources[i][0] - name of file, sources[i][1] - sources
+     * Compiles sources in memory.
+     *
+     * @param options compiler options
+     * @param sources sources[i][0] - name of file, sources[i][1] - sources.
      * @return map where key is className, value is corresponding ClassFile.
-     * @throws IOException
-     * @throws CompilationException
      */
-    public InMemoryFileManager compile(List<String> options, String[]...sources)
+    public InMemoryFileManager compile(List<String> options, String[]... sources)
             throws IOException, CompilationException {
         return compile(options, src -> new ToolBox.JavaSource(src[0], src[1]), asList(sources));
     }
@@ -142,11 +163,22 @@
         return getClassFile(clazz.getName().replace(".", "/") + ".class");
     }
 
+    /**
+     * Prints message to standard error. New lines are converted to system dependent NL.
+     *
+     * @param message string to print.
+     */
     public void echo(String message) {
         System.err.println(message.replace("\n", LINE_SEPARATOR));
     }
 
-    public void printf(String template, Object...args) {
+    /**
+     * Substitutes args in template and prints result to standard error. New lines are converted to system dependent NL.
+     *
+     * @param template template in standard String.format(...) format.
+     * @param args arguments to substitute in template.
+     */
+    public void printf(String template, Object... args) {
         System.err.printf(template, Stream.of(args)
                 .map(Objects::toString)
                 .map(m -> m.replace("\n", LINE_SEPARATOR))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8051958/T8051958.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8051958
+ * @summary Cannot assign a value to final variable in lambda
+ * @compile T8051958.java
+ */
+
+class T8051958 {
+    Runnable inst_r = ()-> {
+        final int x;
+        x = 1;
+    };
+
+    Runnable static_r = ()-> {
+        final int x;
+        x = 1;
+    };
+
+    {
+        Runnable inst_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+
+    static {
+        Runnable static_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+
+    void instTest() {
+        Runnable static_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+
+    static void staticTest() {
+        Runnable static_r = ()-> {
+            final int x;
+            x = 1;
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javap/BadAttributeLength.java	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8047072
+ * @summary javap OOM on fuzzed classfile
+ * @run main BadAttributeLength
+ */
+
+
+import java.io.*;
+
+public class BadAttributeLength {
+
+    public static String source = "public class Test {\n" +
+                                  "    public static void main(String[] args) {}\n" +
+                                  "}";
+
+    public static void main(String[] args) throws Exception {
+        final File sourceFile = new File("Test.java");
+        if (sourceFile.exists()) {
+            if (!sourceFile.delete()) {
+                throw new IOException("Can't override the Test.java file. " +
+                        "Check permissions.");
+            }
+        }
+        try (FileWriter fw = new FileWriter(sourceFile)) {
+            fw.write(source);
+        }
+
+        final String[] javacOpts = {"Test.java"};
+
+        if (com.sun.tools.javac.Main.compile(javacOpts) != 0) {
+            throw new Exception("Can't compile embedded test.");
+        }
+
+        RandomAccessFile raf = new RandomAccessFile("Test.class", "rw");
+        long attPos = getFirstAttributePos(raf);
+        if (attPos < 0) {
+            throw new Exception("The class file contains no attributes at all.");
+        }
+        raf.seek(attPos + 2); // Jump to the attribute length
+        raf.writeInt(Integer.MAX_VALUE - 1);
+        raf.close();
+
+        String[] opts = { "-v", "Test.class" };
+        StringWriter sw = new StringWriter();
+        PrintWriter pout = new PrintWriter(sw);
+
+        com.sun.tools.javap.Main.run(opts, pout);
+        pout.flush();
+
+        if (sw.getBuffer().indexOf("OutOfMemoryError") != -1) {
+            throw new Exception("javap exited with OutOfMemoryError " +
+                    "instead of giving the proper error message.");
+        }
+    }
+
+    private static long getFirstAttributePos(RandomAccessFile cfile) throws Exception {
+        cfile.seek(0);
+        int v1, v2;
+        v1 = cfile.readInt();
+        // System.out.println("Magic: " + String.format("%X", v1));
+
+        v1 = cfile.readUnsignedShort();
+        v2 = cfile.readUnsignedShort();
+        // System.out.println("Version: " + String.format("%d.%d", v1, v2));
+
+        v1 = cfile.readUnsignedShort();
+        // System.out.println("CPool size: " + v1);
+        // Exhaust the constant pool
+        for (; v1 > 1; v1--) {
+            // System.out.print(".");
+            byte tag = cfile.readByte();
+            switch (tag) {
+                case 7  : // Class
+                case 8  : // String
+                    // Data is 2 bytes long
+                    cfile.skipBytes(2);
+                    break;
+                case 3  : // Integer
+                case 4  : // Float
+                case 9  : // FieldRef
+                case 10 : // MethodRef
+                case 11 : // InterfaceMethodRef
+                case 12 : // Name and Type
+                    // Data is 4 bytes long
+                    cfile.skipBytes(4);
+                    break;
+                case 5  : // Long
+                case 6  : // Double
+                    // Data is 8 bytes long
+                    cfile.skipBytes(8);
+                    break;
+                case 1  : // Utf8
+                    v2 = cfile.readUnsignedShort(); // Read buffer size
+                    cfile.skipBytes(v2); // Skip buffer
+                    break;
+                default :
+                    throw new Exception("Unexpected tag in CPool: [" + tag + "] at "
+                            + Long.toHexString(cfile.getFilePointer()));
+            }
+        }
+        // System.out.println();
+
+        cfile.skipBytes(6); // Access flags, this_class and super_class
+        v1 = cfile.readUnsignedShort(); // Number of interfaces
+        // System.out.println("Interfaces: " + v1);
+        cfile.skipBytes(3 * v1); // Each interface_info record is 3 bytes long
+        v1 = cfile.readUnsignedShort(); // Number of fields
+        // System.out.println("Fields: " + v1);
+        // Exhaust the fields table
+        for (; v1 > 0; v1--) {
+            // System.out.print(".");
+            cfile.skipBytes(6); // Skip access_flags, name_index and descriptor_index
+            v2 = cfile.readUnsignedShort(); // Field attributes count
+            if (v2 > 0) {
+                // This field has some attributes - suits our needs
+                // System.out.println();
+                return cfile.getFilePointer();
+            }
+        }
+        // System.out.println();
+        v1 = cfile.readUnsignedShort(); // Number of methods
+        // System.out.println("Methods: " + v1);
+        // Exhaust the methods table
+        for (; v1 > 0; v1--) {
+            // System.out.print(".");
+            cfile.skipBytes(6); // Skip access_flags, name_index and descriptor_index
+            v2 = cfile.readUnsignedShort(); // Method attributes count
+            if (v2 > 0) {
+                // This method got attributes - Ok with us,
+                // return position of the first one
+                // System.out.println();
+                return cfile.getFilePointer();
+            }
+        }
+        // System.out.println();
+        // Class attributes section
+        v1 = cfile.readUnsignedShort(); // Counts of attributes in class
+        if (v1 > 0) {
+            // Class has some attributes, return position of the first one
+            return cfile.getFilePointer();
+        }
+        // Bummer! No attributes in the entire class file. Not fair!
+        return -1L;
+    }
+}
--- a/make/Jprt.gmk	Fri Aug 08 21:46:29 2014 +0400
+++ b/make/Jprt.gmk	Fri Aug 08 12:54:39 2014 -0700
@@ -46,6 +46,10 @@
   JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
 endif
 
+ifeq ($(SKIP_BOOT_CYCLE), false)
+  jprt_bundle: bootcycle-images
+endif
+
 # This target must be called in the context of a SPEC file
 jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
 	@$(call CheckIfMakeAtEnd)
--- a/make/jprt.properties	Fri Aug 08 21:46:29 2014 +0400
+++ b/make/jprt.properties	Fri Aug 08 12:54:39 2014 -0700
@@ -249,7 +249,7 @@
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98,			\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98_nontiered,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-scimark,		\
-    solaris_sparcv9_5.11-product-c2-runThese,				\
+    solaris_sparcv9_5.11-product-c2-runThese8,				\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_SerialGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParNewGC,	\
@@ -273,8 +273,9 @@
     solaris_x64_5.11-{product|fastdebug}-c2-jvm98,			\
     solaris_x64_5.11-{product|fastdebug}-c2-jvm98_nontiered,		\
     solaris_x64_5.11-{product|fastdebug}-c2-scimark,			\
-    solaris_x64_5.11-product-c2-runThese,				\
-    solaris_x64_5.11-product-c2-runThese_Xcomp,				\
+    solaris_x64_5.11-product-c2-runThese8,				\
+    solaris_x64_5.11-product-c2-runThese8_Xcomp_lang,			\
+    solaris_x64_5.11-product-c2-runThese8_Xcomp_vm,			\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParNewGC,		\
@@ -298,9 +299,11 @@
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-jvm98,			\
     linux_i586_2.6-{product|fastdebug}-c2-jvm98_nontiered,		\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-scimark,			\
-    linux_i586_2.6-product-c1-runThese_Xcomp,				\
-    linux_i586_2.6-fastdebug-c1-runThese_Xshare,			\
-    linux_i586_2.6-fastdebug-c2-runThese_Xcomp,				\
+    linux_i586_2.6-product-c1-runThese8_Xcomp_lang,			\
+    linux_i586_2.6-product-c1-runThese8_Xcomp_vm,			\
+    linux_i586_2.6-fastdebug-c1-runThese8_Xshare,			\
+    linux_i586_2.6-fastdebug-c2-runThese8_Xcomp_lang,			\
+    linux_i586_2.6-fastdebug-c2-runThese8_Xcomp_vm,			\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC,	\
@@ -366,9 +369,10 @@
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-jvm98,			\
     windows_i586_6.1-{product|fastdebug}-c2-jvm98_nontiered,		\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-scimark,		\
-    windows_i586_6.1-product-{c1|c2}-runThese,				\
-    windows_i586_6.1-product-{c1|c2}-runThese_Xcomp,			\
-    windows_i586_6.1-fastdebug-c1-runThese_Xshare,			\
+    windows_i586_6.1-product-{c1|c2}-runThese8,				\
+    windows_i586_6.1-product-{c1|c2}-runThese8_Xcomp_lang,		\
+    windows_i586_6.1-product-{c1|c2}-runThese8_Xcomp_vm,		\
+    windows_i586_6.1-fastdebug-c1-runThese8_Xshare,			\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC,	\
@@ -392,8 +396,9 @@
     windows_x64_6.1-{product|fastdebug}-c2-jvm98,			\
     windows_x64_6.1-{product|fastdebug}-c2-jvm98_nontiered,		\
     windows_x64_6.1-{product|fastdebug}-c2-scimark,			\
-    windows_x64_6.1-product-c2-runThese,				\
-    windows_x64_6.1-product-c2-runThese_Xcomp,				\
+    windows_x64_6.1-product-c2-runThese8,				\
+    windows_x64_6.1-product-c2-runThese8_Xcomp_lang,			\
+    windows_x64_6.1-product-c2-runThese8_Xcomp_vm,			\
     windows_x64_6.1-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     windows_x64_6.1-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     windows_x64_6.1-{product|fastdebug}-c2-GCBasher_ParNewGC,		\
--- a/nashorn/.hgtags	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/.hgtags	Fri Aug 08 12:54:39 2014 -0700
@@ -258,3 +258,4 @@
 a9d39bcfeb1bb3f7de929c56a2ecbea10a554ca1 jdk9-b22
 aa3fda2d2967847dbd264aa962d624c07fc6c29f jdk9-b23
 49d7a2a66ae6b70fee367e2ceb29d0c20f8be01b jdk9-b24
+b33633fc10c5bffd39d3492ed2602dadd8d44642 jdk9-b25
--- a/nashorn/src/jdk/internal/dynalink/linker/GuardedInvocation.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/internal/dynalink/linker/GuardedInvocation.java	Fri Aug 08 12:54:39 2014 -0700
@@ -193,7 +193,7 @@
         invocation.getClass(); // NPE check
         this.invocation = invocation;
         this.guard = guard;
-        this.switchPoints = switchPoints;
+        this.switchPoints = switchPoints == null ? null : switchPoints.clone();
         this.exception = exception;
     }
 
--- a/nashorn/src/jdk/internal/dynalink/support/CompositeTypeBasedGuardingDynamicLinker.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/internal/dynalink/support/CompositeTypeBasedGuardingDynamicLinker.java	Fri Aug 08 12:54:39 2014 -0700
@@ -111,7 +111,7 @@
         private final TypeBasedGuardingDynamicLinker[] linkers;
         private final List<TypeBasedGuardingDynamicLinker>[] singletonLinkers;
 
-        @SuppressWarnings(value={"unchecked", "rawtypes"})
+        @SuppressWarnings({"unchecked", "rawtypes"})
         ClassToLinker(final TypeBasedGuardingDynamicLinker[] linkers) {
             this.linkers = linkers;
             singletonLinkers = new List[linkers.length];
@@ -135,7 +135,6 @@
                         case 1: {
                             list = new LinkedList<>(list);
                         }
-                        //$FALL-THROUGH$
                         default: {
                             list.add(linker);
                         }
--- a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java	Fri Aug 08 12:54:39 2014 -0700
@@ -40,6 +40,7 @@
 import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.ResourceBundle;
+
 import javax.script.AbstractScriptEngine;
 import javax.script.Bindings;
 import javax.script.Compilable;
@@ -50,6 +51,7 @@
 import javax.script.ScriptEngineFactory;
 import javax.script.ScriptException;
 import javax.script.SimpleBindings;
+
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.ErrorManager;
@@ -429,7 +431,7 @@
         return evalImpl(script, ctxt, getNashornGlobalFrom(ctxt));
     }
 
-    private Object evalImpl(final Context.MultiGlobalCompiledScript mgcs, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
+    private static Object evalImpl(final Context.MultiGlobalCompiledScript mgcs, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
         final Global oldGlobal = Context.getGlobal();
         final boolean globalChanged = (oldGlobal != ctxtGlobal);
         try {
@@ -450,7 +452,7 @@
         }
     }
 
-    private Object evalImpl(final ScriptFunction script, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
+    private static Object evalImpl(final ScriptFunction script, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
         if (script == null) {
             return null;
         }
--- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -314,7 +314,7 @@
         if (!symbol.isScope()) {
             final Type type = identNode.getType();
             if(type == Type.UNDEFINED) {
-                return method.loadUndefined(Type.OBJECT);
+                return method.loadUndefined(resultBounds.widest);
             }
 
             assert symbol.hasSlot() || symbol.isParam();
@@ -1097,7 +1097,11 @@
 
         closeBlockVariables(block);
         lc.releaseSlots();
-        assert !method.isReachable() || (lc.isFunctionBody() ? 0 : lc.getUsedSlotCount()) == method.getFirstTemp();
+        assert !method.isReachable() || (lc.isFunctionBody() ? 0 : lc.getUsedSlotCount()) == method.getFirstTemp() :
+            "reachable="+method.isReachable() +
+            " isFunctionBody=" + lc.isFunctionBody() +
+            " usedSlotCount=" + lc.getUsedSlotCount() +
+            " firstTemp=" + method.getFirstTemp();
 
         return block;
     }
@@ -4738,7 +4742,7 @@
          */
         private void replaceCompileTimeProperty(final Object propertyValue) {
             assert method.peekType().isObject();
-            if(propertyValue instanceof String) {
+            if(propertyValue instanceof String || propertyValue == null) {
                 method.load((String)propertyValue);
             } else if(propertyValue instanceof Integer) {
                 method.load(((Integer)propertyValue).intValue());
--- a/nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java	Fri Aug 08 12:54:39 2014 -0700
@@ -43,7 +43,6 @@
 import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.HashMap;
-import java.util.IdentityHashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -334,15 +333,15 @@
                     sb.append("$restOf");
                 }
                 newUnit = compiler.createCompileUnit(sb.toString(), oldUnit.getWeight());
-                log.info("Creating new compile unit ", oldUnit, " => ", newUnit);
+                log.fine("Creating new compile unit ", oldUnit, " => ", newUnit);
                 map.put(oldUnit, newUnit);
                 assert newUnit != null;
                 newUnits.add(newUnit);
             }
 
-            log.info("Replacing compile units in Compiler...");
+            log.fine("Replacing compile units in Compiler...");
             compiler.replaceCompileUnits(newUnits);
-            log.info("Done");
+            log.fine("Done");
 
             //replace old compile units in function nodes, if any are assigned,
             //for example by running the splitter on this function node in a previous
@@ -564,7 +563,7 @@
                     append(compiler.getCompileUnits().size()).
                     append(" compile unit(s)]");
 
-                log.info(sb.toString());
+                log.fine(sb.toString());
             }
 
             return setStates(fn.setRootClass(null, rootClass), BYTECODE_INSTALLED);
--- a/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java	Fri Aug 08 12:54:39 2014 -0700
@@ -50,6 +50,7 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import java.util.logging.Level;
+
 import jdk.internal.dynalink.support.NameCodec;
 import jdk.nashorn.internal.codegen.ClassEmitter.Flag;
 import jdk.nashorn.internal.codegen.types.Type;
@@ -502,7 +503,7 @@
      */
     public FunctionNode compile(final FunctionNode functionNode, final CompilationPhases phases) throws CompilationException {
 
-        log.info("Starting compile job for ", DebugLogger.quote(functionNode.getName()), " phases=", quote(phases.getDesc()));
+        log.finest("Starting compile job for ", DebugLogger.quote(functionNode.getName()), " phases=", quote(phases.getDesc()));
         log.indent();
 
         final String name = DebugLogger.quote(functionNode.getName());
@@ -531,7 +532,7 @@
             time += (env.isTimingEnabled() ? phase.getEndTime() - phase.getStartTime() : 0L);
         }
 
-        if(typeInformationFile != null && !phases.isRestOfCompilation()) {
+        if (typeInformationFile != null && !phases.isRestOfCompilation()) {
             OptimisticTypesPersistence.store(typeInformationFile, invalidatedProgramPoints);
         }
 
--- a/nashorn/src/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -1196,9 +1196,7 @@
                 } else if(binaryNode.isOptimisticUndecidedType()) {
                     // At this point, we can assign a static type to the optimistic binary ADD operator as now we know
                     // the types of its operands.
-                    final Type type = Type.widest(binaryNode.lhs().getType(), binaryNode.rhs().getType());
-                    // Use Type.CHARSEQUENCE instead of Type.STRING to avoid conversion of ConsStrings to Strings.
-                    return binaryNode.setType(type.equals(Type.STRING) ? Type.CHARSEQUENCE : type);
+                    return binaryNode.decideType();
                 }
                 return binaryNode;
             }
--- a/nashorn/src/jdk/nashorn/internal/codegen/Lower.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Lower.java	Fri Aug 08 12:54:39 2014 -0700
@@ -34,6 +34,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.ListIterator;
+
 import jdk.nashorn.internal.ir.BaseNode;
 import jdk.nashorn.internal.ir.BinaryNode;
 import jdk.nashorn.internal.ir.Block;
--- a/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Fri Aug 08 12:54:39 2014 -0700
@@ -41,6 +41,7 @@
 import java.util.Date;
 import java.util.Map;
 import java.util.TreeMap;
+
 import jdk.nashorn.internal.codegen.types.Type;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
@@ -111,6 +112,7 @@
             return;
         }
         final File file = ((LocationDescriptor)locationDescriptor).file;
+
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
             @Override
             public Void run() {
@@ -119,7 +121,7 @@
                         out.getChannel().lock(); // lock exclusive
                         final DataOutputStream dout = new DataOutputStream(new BufferedOutputStream(out));
                         dout.writeInt(optimisticTypes.size());
-                        for(Map.Entry<Integer, Type> e: optimisticTypes.entrySet()) {
+                        for(final Map.Entry<Integer, Type> e: optimisticTypes.entrySet()) {
                             dout.writeInt(e.getKey());
                             final byte typeChar;
                             final Type type = e.getValue();
@@ -156,7 +158,6 @@
             return null;
         }
         final File file = ((LocationDescriptor)locationDescriptor).file;
-
         return AccessController.doPrivileged(new PrivilegedAction<Map<Integer, Type>>() {
             @Override
             public Map<Integer, Type> run() {
@@ -229,7 +230,7 @@
                 final String versionDirName;
                 try {
                     versionDirName = getVersionDirName();
-                } catch(Exception e) {
+                } catch(final Exception e) {
                     getLogger().warning("Failed to calculate version dir name", e);
                     return null;
                 }
@@ -306,7 +307,7 @@
 
     private static long getLastModifiedClassFile(final File dir, final long max) {
         long currentMax = max;
-        for(File f: dir.listFiles()) {
+        for(final File f: dir.listFiles()) {
             if(f.getName().endsWith(".class")) {
                 final long lastModified = f.lastModified();
                 if(lastModified > currentMax) {
--- a/nashorn/src/jdk/nashorn/internal/ir/BinaryNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/BinaryNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -183,17 +183,31 @@
         switch (tokenType()) {
         case ADD:
         case ASSIGN_ADD: {
+            // Compare this logic to decideType(Type, Type); it's similar, but it handles the optimistic type
+            // calculation case while this handles the conservative case.
             final Type lhsType = lhs.getType(localVariableTypes);
             final Type rhsType = rhs.getType(localVariableTypes);
             if(lhsType == Type.BOOLEAN && rhsType == Type.BOOLEAN) {
+                // Will always fit in an int, as the value range is [0, 1, 2]. If we didn't treat them specially here,
+                // they'd end up being treated as generic INT operands and their sum would be conservatively considered
+                // to be a LONG in the generic case below; we can do better here.
                 return Type.INT;
+            } else if(isString(lhsType) || isString(rhsType)) {
+                // We can statically figure out that this is a string if either operand is a string. In this case, use
+                // CHARSEQUENCE to prevent it from being proactively flattened.
+                return Type.CHARSEQUENCE;
             }
-            final Type widestOperandType = Type.widest(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes));
+            final Type widestOperandType = Type.widest(undefinedToNumber(booleanToInt(lhsType)), undefinedToNumber(booleanToInt(rhsType)));
             if(widestOperandType == Type.INT) {
                 return Type.LONG;
             } else if (widestOperandType.isNumeric()) {
                 return Type.NUMBER;
             }
+            // We pretty much can't know what it will be statically. Must presume OBJECT conservatively, as we can end
+            // up getting either a string or an object when adding something + object, e.g.:
+            // 1 + {} == "1[object Object]", but
+            // 1 + {valueOf: function() { return 2 }} == 3. Also:
+            // 1 + {valueOf: function() { return "2" }} == "12".
             return Type.OBJECT;
         }
         case SHR:
@@ -256,10 +270,18 @@
         }
     }
 
+    private static boolean isString(final Type type) {
+        return type == Type.STRING || type == Type.CHARSEQUENCE;
+    }
+
     private static Type booleanToInt(final Type type) {
         return type == Type.BOOLEAN ? Type.INT : type;
     }
 
+    private static Type undefinedToNumber(final Type type) {
+        return type == Type.UNDEFINED ? Type.NUMBER : type;
+    }
+
     /**
      * Check if this node is an assignment
      *
@@ -527,7 +549,7 @@
 
     private Type getTypeUncached(final Function<Symbol, Type> localVariableTypes) {
         if(type == OPTIMISTIC_UNDECIDED_TYPE) {
-            return Type.widest(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes));
+            return decideType(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes));
         }
         final Type widest = getWidestOperationType(localVariableTypes);
         if(type == null) {
@@ -536,6 +558,32 @@
         return Type.narrowest(widest, Type.widest(type, Type.widest(lhs.getType(localVariableTypes), rhs.getType(localVariableTypes))));
     }
 
+    private static Type decideType(final Type lhsType, final Type rhsType) {
+        // Compare this to getWidestOperationType() for ADD and ASSIGN_ADD cases. There's some similar logic, but these
+        // are optimistic decisions, meaning that we don't have to treat boolean addition separately (as it'll become
+        // int addition in the general case anyway), and that we also don't conservatively widen sums of ints to
+        // longs, or sums of longs to doubles.
+        if(isString(lhsType) || isString(rhsType)) {
+            return Type.CHARSEQUENCE;
+        }
+        // NOTE: We don't have optimistic object-to-(int, long) conversions. Therefore, if any operand is an Object, we
+        // bail out of optimism here and presume a conservative Object return value, as the object's ToPrimitive() can
+        // end up returning either a number or a string, and their common supertype is Object, for better or worse.
+        final Type widest = Type.widest(undefinedToNumber(booleanToInt(lhsType)), undefinedToNumber(booleanToInt(rhsType)));
+        return widest.isObject() ? Type.OBJECT : widest;
+    }
+
+    /**
+     * If the node is a node representing an add operation and has {@link #isOptimisticUndecidedType() optimistic
+     * undecided type}, decides its type. Should be invoked after its operands types have been finalized.
+     * @return returns a new node similar to this node, but with its type set to the type decided from the type of its
+     * operands.
+     */
+    public BinaryNode decideType() {
+        assert type == OPTIMISTIC_UNDECIDED_TYPE;
+        return setType(decideType(lhs.getType(), rhs.getType()));
+    }
+
     @Override
     public BinaryNode setType(final Type type) {
         if (this.type == type) {
--- a/nashorn/src/jdk/nashorn/internal/ir/Block.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/Block.java	Fri Aug 08 12:54:39 2014 -0700
@@ -149,7 +149,7 @@
     @Override
     public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
         if (visitor.enterBlock(this)) {
-            return visitor.leaveBlock(setStatements(lc, Node.accept(visitor, Statement.class, statements)));
+            return visitor.leaveBlock(setStatements(lc, Node.accept(visitor, statements)));
         }
 
         return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/CallNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/CallNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,6 +30,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Function;
+
 import jdk.nashorn.internal.codegen.types.Type;
 import jdk.nashorn.internal.ir.annotations.Ignore;
 import jdk.nashorn.internal.ir.annotations.Immutable;
@@ -175,10 +176,10 @@
         if (visitor.enterCallNode(this)) {
             final CallNode newCallNode = (CallNode)visitor.leaveCallNode(
                     setFunction((Expression)function.accept(visitor)).
-                    setArgs(Node.accept(visitor, Expression.class, args)).
+                    setArgs(Node.accept(visitor, args)).
                     setEvalArgs(evalArgs == null ?
                             null :
-                            evalArgs.setArgs(Node.accept(visitor, Expression.class, evalArgs.getArgs()))));
+                            evalArgs.setArgs(Node.accept(visitor, evalArgs.getArgs()))));
             // Theoretically, we'd need to instead pass lc to every setter and do a replacement on each. In practice,
             // setType from TypeOverride can't accept a lc, and we don't necessarily want to go there now.
             if (this != newCallNode) {
--- a/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -359,7 +359,7 @@
      * @return a list of parameter nodes, potentially modified from original ones by the visitor.
      */
     public List<IdentNode> visitParameters(final NodeVisitor<? extends LexicalContext> visitor) {
-        return Node.accept(visitor, IdentNode.class, parameters);
+        return Node.accept(visitor, parameters);
     }
 
     /**
--- a/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 import java.io.File;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+
 import jdk.nashorn.internal.runtime.Debug;
 import jdk.nashorn.internal.runtime.Source;
 
@@ -652,6 +653,7 @@
             return lnext;
         }
 
+        @SuppressWarnings("unchecked")
         private T findNext() {
             for (int i = index; i >= 0; i--) {
                 final Object node = stack[i];
@@ -660,7 +662,7 @@
                 }
                 if (clazz.isAssignableFrom(node.getClass())) {
                     index = i - 1;
-                    return clazz.cast(node);
+                    return (T)node;
                 }
             }
             return null;
--- a/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -934,7 +934,7 @@
         public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
             if (visitor.enterLiteralNode(this)) {
                 final List<Expression> oldValue = Arrays.asList(value);
-                final List<Expression> newValue = Node.accept(visitor, Expression.class, oldValue);
+                final List<Expression> newValue = Node.accept(visitor, oldValue);
                 return visitor.leaveLiteralNode(oldValue != newValue ? setValue(lc, newValue) : this);
             }
             return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/Node.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/Node.java	Fri Aug 08 12:54:39 2014 -0700
@@ -27,6 +27,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import jdk.nashorn.internal.ir.visitor.NodeVisitor;
 import jdk.nashorn.internal.parser.Token;
 import jdk.nashorn.internal.parser.TokenType;
@@ -232,19 +233,34 @@
     }
 
     //on change, we have to replace the entire list, that's we can't simple do ListIterator.set
-    static <T extends Node> List<T> accept(final NodeVisitor<? extends LexicalContext> visitor, final Class<T> clazz, final List<T> list) {
-        boolean changed = false;
-        final List<T> newList = new ArrayList<>();
-
-        for (final Node node : list) {
-            final T newNode = node == null ? null : clazz.cast(node.accept(visitor));
-            if (newNode != node) {
-                changed = true;
-            }
-            newList.add(newNode);
+    static <T extends Node> List<T> accept(final NodeVisitor<? extends LexicalContext> visitor, final List<T> list) {
+        final int size = list.size();
+        if (size == 0) {
+            return list;
         }
 
-        return changed ? newList : list;
+         List<T> newList = null;
+
+        for (int i = 0; i < size; i++) {
+            final T node = list.get(i);
+            @SuppressWarnings("unchecked")
+            final T newNode = node == null ? null : (T)node.accept(visitor);
+            if (newNode != node) {
+                if (newList == null) {
+                    newList = new ArrayList<>(size);
+                    for (int j = 0; j < i; j++) {
+                        newList.add(list.get(j));
+                    }
+                }
+                newList.add(newNode);
+            } else {
+                if (newList != null) {
+                    newList.add(node);
+                }
+            }
+        }
+
+        return newList == null ? list : newList;
     }
 
     static <T extends LexicalContextNode> T replaceInLexicalContext(final LexicalContext lc, final T oldNode, final T newNode) {
--- a/nashorn/src/jdk/nashorn/internal/ir/ObjectNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/ObjectNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -61,7 +61,7 @@
     @Override
     public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
         if (visitor.enterObjectNode(this)) {
-            return visitor.leaveObjectNode(setElements(Node.accept(visitor, PropertyNode.class, elements)));
+            return visitor.leaveObjectNode(setElements(Node.accept(visitor, elements)));
         }
 
         return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/SwitchNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/SwitchNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -104,7 +104,7 @@
         if (visitor.enterSwitchNode(this)) {
             return visitor.leaveSwitchNode(
                 setExpression(lc, (Expression)expression.accept(visitor)).
-                setCases(lc, Node.accept(visitor, CaseNode.class, cases), defaultCaseIndex));
+                setCases(lc, Node.accept(visitor, cases), defaultCaseIndex));
         }
 
         return this;
--- a/nashorn/src/jdk/nashorn/internal/ir/TryNode.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/TryNode.java	Fri Aug 08 12:54:39 2014 -0700
@@ -112,7 +112,7 @@
             return visitor.leaveTryNode(
                 setBody(newBody).
                 setFinallyBody(newFinallyBody).
-                setCatchBlocks(Node.accept(visitor, Block.class, catchBlocks)).
+                setCatchBlocks(Node.accept(visitor, catchBlocks)).
                 setFinallyCatchAll(finallyCatchAll));
         }
 
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/ClassHistogramElement.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/ClassHistogramElement.java	Fri Aug 08 12:54:39 2014 -0700
@@ -30,7 +30,7 @@
 /**
  * Class histogram element for IR / Java object instrumentation
  */
-public class ClassHistogramElement {
+public final class ClassHistogramElement {
     /**
      * Instance comparator
      */
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,6 +39,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
 import jdk.internal.org.objectweb.asm.Attribute;
 import jdk.internal.org.objectweb.asm.Handle;
 import jdk.internal.org.objectweb.asm.Label;
@@ -1082,11 +1083,15 @@
             contents.put(node, sb);
         }
 
+        private static String dottyFriendly(final String name) {
+            return name.replace(':', '_');
+        }
+
         @Override
         public String toString() {
 
             final StringBuilder sb = new StringBuilder();
-            sb.append("digraph " + name + " {");
+            sb.append("digraph " + dottyFriendly(name) + " {");
             sb.append("\n");
             sb.append("\tgraph [fontname=courier]\n");
             sb.append("\tnode [style=filled,color="+COLOR_DEFAULT+",fontname=courier]\n");
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/ObjectSizeCalculator.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/ObjectSizeCalculator.java	Fri Aug 08 12:54:39 2014 -0700
@@ -52,7 +52,7 @@
  * this fact and will report incorrect sizes, as it will presume the default JVM
  * behavior.
  */
-public class ObjectSizeCalculator {
+public final class ObjectSizeCalculator {
 
     /**
      * Describes constant memory overheads for various constructs in a JVM implementation.
--- a/nashorn/src/jdk/nashorn/internal/lookup/MethodHandleFactory.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/lookup/MethodHandleFactory.java	Fri Aug 08 12:54:39 2014 -0700
@@ -124,11 +124,13 @@
      * @return return value unmodified
      */
     static Object traceReturn(final DebugLogger logger, final Object value) {
-        final String str = "    return" +
-                (VOID_TAG.equals(value) ?
-                    ";" :
-                    " " + stripName(value) + "; // [type=" + (value == null ? "null]" : stripName(value.getClass()) + ']'));
-        logger.log(TRACE_LEVEL, str);
+        if (logger.isEnabled()) {
+            final String str = "    return" +
+                    (VOID_TAG.equals(value) ?
+                        ";" :
+                        " " + stripName(value) + "; // [type=" + (value == null ? "null]" : stripName(value.getClass()) + ']'));
+            logger.log(TRACE_LEVEL, str);
+        }
         return value;
     }
 
--- a/nashorn/src/jdk/nashorn/internal/objects/Global.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/Global.java	Fri Aug 08 12:54:39 2014 -0700
@@ -46,8 +46,10 @@
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicReference;
+
 import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
+
 import jdk.internal.dynalink.linker.GuardedInvocation;
 import jdk.internal.dynalink.linker.LinkRequest;
 import jdk.nashorn.api.scripting.ScriptObjectMirror;
@@ -563,6 +565,8 @@
      * Initialize standard builtin objects like "Object", "Array", "Function" etc.
      * as well as our extension builtin objects like "Java", "JSAdapter" as properties
      * of the global scope object.
+     *
+     * @param engine ScriptEngine to initialize
      */
     public void initBuiltinObjects(final ScriptEngine engine) {
         if (this.builtinObject != null) {
@@ -1936,15 +1940,16 @@
     }
 
     private Object printImpl(final boolean newLine, final Object... objects) {
+        @SuppressWarnings("resource")
         final PrintWriter out = scontext != null? new PrintWriter(scontext.getWriter()) : getContext().getEnv().getOut();
         final StringBuilder sb = new StringBuilder();
 
-        for (final Object object : objects) {
+        for (final Object obj : objects) {
             if (sb.length() != 0) {
                 sb.append(' ');
             }
 
-            sb.append(JSType.toString(object));
+            sb.append(JSType.toString(obj));
         }
 
         // Print all at once to ensure thread friendly result.
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java	Fri Aug 08 12:54:39 2014 -0700
@@ -935,7 +935,6 @@
                     }
                     sb.append(' ');
 
-                    //$FALL-THROUGH$
                 case FORMAT_TIME:
                     final TimeZone tz = nd.getTimeZone();
                     final double utcTime = nd.getTime();
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java	Fri Aug 08 12:54:39 2014 -0700
@@ -39,6 +39,7 @@
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Callable;
+
 import jdk.internal.dynalink.beans.BeansLinker;
 import jdk.internal.dynalink.beans.StaticClass;
 import jdk.internal.dynalink.linker.GuardedInvocation;
@@ -716,7 +717,7 @@
         return target;
     }
 
-    /*
+    /**
      * Binds the source mirror object's properties to the target object. Binding
      * properties allows two-way read/write for the properties of the source object.
      * All inherited, enumerable properties are also bound. This method is used to
@@ -731,7 +732,7 @@
         // make accessor properties using dynamic invoker getters and setters
         final AccessorProperty[] props = new AccessorProperty[keys.size()];
         int idx = 0;
-        for (String name : keys) {
+        for (final String name : keys) {
             final MethodHandle getter = Bootstrap.createDynamicInvoker("dyn:getMethod|getProp|getElem:" + name, MIRROR_GETTER_TYPE);
             final MethodHandle setter = Bootstrap.createDynamicInvoker("dyn:setProp|setElem:" + name, MIRROR_SETTER_TYPE);
             props[idx] = AccessorProperty.create(name, 0, getter, setter);
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java	Fri Aug 08 12:54:39 2014 -0700
@@ -80,7 +80,8 @@
 
         private static final MethodHandle GET_ELEM = specialCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "getElem", int.class, int.class).methodHandle();
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
-        private static final MethodHandle RINT     = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "rint", double.class, double.class).methodHandle();
+        private static final MethodHandle RINT_D   = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "rint", double.class, double.class).methodHandle();
+        private static final MethodHandle RINT_O   = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "rint", Object.class, Object.class).methodHandle();
         private static final MethodHandle CLAMP_LONG = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "clampLong", long.class, long.class).methodHandle();
 
         private Uint8ClampedArrayData(final ByteBuffer nb, final int start, final int end) {
@@ -109,8 +110,10 @@
         public MethodHandle getElementSetter(final Class<?> elementType) {
             final MethodHandle setter = super.getElementSetter(elementType); //getContinuousElementSetter(getClass(), setElem(), elementType);
             if (setter != null) {
-                if (elementType == double.class) {
-                    return MH.filterArguments(setter, 2, RINT);
+                if (elementType == Object.class) {
+                    return MH.filterArguments(setter, 2, RINT_O);
+                } else if (elementType == double.class) {
+                    return MH.filterArguments(setter, 2, RINT_D);
                 } else if (elementType == long.class) {
                     return MH.filterArguments(setter, 2, CLAMP_LONG);
                 }
@@ -191,6 +194,11 @@
         }
 
         @SuppressWarnings("unused")
+        private static Object rint(final Object rint) {
+            return rint(JSType.toNumber(rint));
+        }
+
+        @SuppressWarnings("unused")
         private static long clampLong(final long l) {
             if(l < 0L) {
                 return 0L;
--- a/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java	Fri Aug 08 12:54:39 2014 -0700
@@ -28,7 +28,7 @@
 import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.ResourceBundle;
-import jdk.nashorn.api.scripting.NashornException;
+
 import jdk.nashorn.internal.codegen.CompilerConstants;
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.scripts.JS;
--- a/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java	Fri Aug 08 12:54:39 2014 -0700
@@ -36,6 +36,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
+
 import jdk.internal.dynalink.support.NameCodec;
 import jdk.nashorn.internal.codegen.CompileUnit;
 import jdk.nashorn.internal.codegen.Compiler;
@@ -236,14 +237,14 @@
     /**
      * Initialize transient fields on deserialized instances
      *
-     * @param source source
-     * @param installer code installer
+     * @param src source
+     * @param inst code installer
      */
-    public void initTransients(final Source source, final CodeInstaller<ScriptEnvironment> installer) {
+    public void initTransients(final Source src, final CodeInstaller<ScriptEnvironment> inst) {
         if (this.source == null && this.installer == null) {
-            this.source = source;
-            this.installer = installer;
-        } else if (this.source != source || this.installer != installer) {
+            this.source    = src;
+            this.installer = inst;
+        } else if (this.source != src || this.installer != inst) {
             // Existing values must be same as those passed as parameters
             throw new IllegalArgumentException();
         }
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java	Fri Aug 08 12:54:39 2014 -0700
@@ -3626,7 +3626,6 @@
         return MH.insertArguments(KNOWNFUNCPROPGUARDPROTO, 1, map, getter, depth, func);
     }
 
-    @SuppressWarnings("unused")
     private static ScriptObject getProto(final ScriptObject self, final int depth) {
         ScriptObject proto = self;
         for (int d = 0; d < depth; d++) {
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptRuntime.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptRuntime.java	Fri Aug 08 12:54:39 2014 -0700
@@ -484,17 +484,16 @@
             final Object unwrapped = ScriptObjectMirror.unwrap(expression, global);
             if (unwrapped instanceof ScriptObject) {
                 return new WithObject(scope, (ScriptObject)unwrapped);
-            } else {
-                // foreign ScriptObjectMirror
-                ScriptObject exprObj = global.newObject();
-                NativeObject.bindAllProperties(exprObj, (ScriptObjectMirror)expression);
-                return new WithObject(scope, exprObj);
             }
-        } else {
-            final Object wrappedExpr = JSType.toScriptObject(global, expression);
-            if (wrappedExpr instanceof ScriptObject) {
-                return new WithObject(scope, (ScriptObject)wrappedExpr);
-            }
+            // foreign ScriptObjectMirror
+            final ScriptObject exprObj = global.newObject();
+            NativeObject.bindAllProperties(exprObj, (ScriptObjectMirror)expression);
+            return new WithObject(scope, exprObj);
+        }
+
+        final Object wrappedExpr = JSType.toScriptObject(global, expression);
+        if (wrappedExpr instanceof ScriptObject) {
+            return new WithObject(scope, (ScriptObject)wrappedExpr);
         }
 
         throw typeError(global, "cant.apply.with.to.non.scriptobject");
@@ -819,9 +818,8 @@
 
     /** ECMA 11.9.6 The Strict Equality Comparison Algorithm */
     private static boolean strictEquals(final Object x, final Object y) {
-        if(x == y) {
-            return true;
-        }
+        // NOTE: you might be tempted to do a quick x == y comparison. Remember, though, that any Double object having
+        // NaN value is not equal to itself by value even though it is referentially.
 
         final JSType xType = JSType.ofNoFunction(x);
         final JSType yType = JSType.ofNoFunction(y);
--- a/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java	Fri Aug 08 12:54:39 2014 -0700
@@ -31,12 +31,13 @@
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
 import java.lang.invoke.SwitchPoint;
-import jdk.nashorn.api.scripting.AbstractJSObject;
-import jdk.nashorn.api.scripting.ScriptObjectMirror;
+
 import jdk.internal.dynalink.CallSiteDescriptor;
 import jdk.internal.dynalink.linker.GuardedInvocation;
 import jdk.internal.dynalink.linker.LinkRequest;
 import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
+import jdk.nashorn.api.scripting.AbstractJSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor;
 import jdk.nashorn.internal.runtime.linker.NashornGuards;
 
@@ -322,6 +323,7 @@
                 // We need to make sure correct 'this' is used for calls with Ident call
                 // expressions. We do so here using an AbstractJSObject instance.
                 return new AbstractJSObject() {
+                    @Override
                     public Object call(final Object thiz, final Object... args) {
                         return mirror.call(withFilterExpression(receiver), args);
                     }
--- a/nashorn/src/jdk/nashorn/internal/runtime/options/Options.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/options/Options.java	Fri Aug 08 12:54:39 2014 -0700
@@ -78,7 +78,10 @@
     /** The options map of enabled options */
     private final TreeMap<String, Option<?>> options;
 
-    /** System property that can be used for command line option propagation */
+    /** System property that can be used to prepend options to the explicitly specified command line. */
+    private static final String NASHORN_ARGS_PREPEND_PROPERTY = "nashorn.args.prepend";
+
+    /** System property that can be used to append options to the explicitly specified command line. */
     private static final String NASHORN_ARGS_PROPERTY = "nashorn.args";
 
     /**
@@ -419,15 +422,9 @@
      */
     public void process(final String[] args) {
         final LinkedList<String> argList = new LinkedList<>();
+        addSystemProperties(NASHORN_ARGS_PREPEND_PROPERTY, argList);
         Collections.addAll(argList, args);
-
-        final String extra = getStringProperty(NASHORN_ARGS_PROPERTY, null);
-        if (extra != null) {
-            final StringTokenizer st = new StringTokenizer(extra);
-            while (st.hasMoreTokens()) {
-                argList.add(st.nextToken());
-            }
-        }
+        addSystemProperties(NASHORN_ARGS_PROPERTY, argList);
 
         while (!argList.isEmpty()) {
             final String arg = argList.remove(0);
@@ -509,6 +506,16 @@
         }
     }
 
+    private static void addSystemProperties(final String sysPropName, final List<String> argList) {
+        final String sysArgs = getStringProperty(sysPropName, null);
+        if (sysArgs != null) {
+            final StringTokenizer st = new StringTokenizer(sysArgs);
+            while (st.hasMoreTokens()) {
+                argList.add(st.nextToken());
+            }
+        }
+    }
+
     private static OptionTemplate getOptionTemplate(final String key) {
         for (final OptionTemplate t : Options.validOptions) {
             if (t.matches(key)) {
--- a/nashorn/test/script/basic/JDK-8030182_2.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/JDK-8030182_2.js	Fri Aug 08 12:54:39 2014 -0700
@@ -41,6 +41,6 @@
 try {
     eval(str);
 } catch (e) {
-    print(e.stack.replace(/\\/g, '/'));
+    print(e.stack.replace(/\\/g, '/').replace(/<eval>@[0-9]+/, '<eval>@<id>'));
 }
 
--- a/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED	Fri Aug 08 12:54:39 2014 -0700
@@ -1,3 +1,3 @@
 ReferenceError: "g" is not defined
-	at <program> (test/script/basic/JDK-8030182_2.js#42:4<eval>@1:-1)
+	at <program> (test/script/basic/JDK-8030182_2.js#42:4<eval>@<id>:-1)
 	at <program> (test/script/basic/JDK-8030182_2.js:42)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8051439.js	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8051439: Wrong type calculated for ADD operator with undefined operand
+ *
+ * @test
+ * @run
+ */
+
+// Test + operator
+function f1() { 
+    var x; 
+    for (var i = 0;i < 3; i++) { 
+        x = x + i; 
+    }
+    x = x + "test"; 
+    return x; 
+} 
+
+// Test += operator
+function f2() { 
+    var x; 
+    for (var i = 0;i < 3; i++) { 
+        x += i; 
+    }
+    x += "test"; 
+    return x; 
+} 
+
+print(f1());
+print(f2());
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8051439.js.EXPECTED	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,2 @@
+NaNtest
+NaNtest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/compile-octane-normal.js	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Make sure that we run with the class cache off to so that every
+ * run produces compile time and with optimistic type info caching
+ * and persistent code store off, for the same reasons. These last two
+ * are currently default, but this is not guaranteed to be the case
+ * forever, so make this test future safe, we specify them explicitly
+ *
+ * @test
+ * @runif external.octane
+ * @option -scripting
+ * @option -Dnashorn.typeInfo.disabled=true
+ * @option --class-cache-size=0
+ * @option --persistent-code-cache=false
+ */
+
+var fn  = __DIR__ + 'compile-octane.js';
+var url = "file://" + fn; 
+loadWithNewGlobal(new java.net.URL(url));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/compile-octane-normal.js.EXPECTED	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,30 @@
+Compiling 'box2d'...
+Done.
+Compiling 'code-load'...
+Done.
+Compiling 'crypto'...
+Done.
+Compiling 'deltablue'...
+Done.
+Compiling 'earley-boyer'...
+Done.
+Compiling 'gbemu'... (2 files)
+Done.
+Compiling 'mandreel'...
+Done.
+Compiling 'navier-stokes'...
+Done.
+Compiling 'pdfjs'...
+Done.
+Compiling 'raytrace'...
+Done.
+Compiling 'regexp'...
+Done.
+Compiling 'richards'...
+Done.
+Compiling 'splay'...
+Done.
+Compiling 'typescript'... (3 files)
+Done.
+Compiling 'zlib'... (2 files)
+Done.
--- a/nashorn/test/script/basic/compile-octane-splitter.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/compile-octane-splitter.js	Fri Aug 08 12:54:39 2014 -0700
@@ -22,12 +22,22 @@
  */
 
 /**
+ * Make sure that we run with the class cache off to so that every
+ * run produces compile time and with optimistic type info caching
+ * and persistent code store off, for the same reasons. These last two
+ * are currently default, but this is not guaranteed to be the case
+ * forever, so make this test future safe, we specify them explicitly
+ *
  * @test
  * @option -Dnashorn.compiler.splitter.threshold=1000
  * @fork
  * @runif external.octane
  * @option -scripting
+ * @option -Dnashorn.typeInfo.disabled=true
+ * @option --class-cache-size=0
+ * @option --persistent-code-cache=false
  */
 
-compile_only = true;
-load(__DIR__ + 'run-octane.js');
+var fn  = __DIR__ + 'compile-octane.js';
+var url = "file://" + fn; 
+loadWithNewGlobal(new java.net.URL(url));
--- a/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED	Fri Aug 08 12:54:39 2014 -0700
@@ -1,15 +1,30 @@
-[box2d] Compiled OK
-[code-load] Compiled OK
-[crypto] Compiled OK
-[deltablue] Compiled OK
-[earley-boyer] Compiled OK
-[gbemu] Compiled OK
-[mandreel] Compiled OK
-[navier-stokes] Compiled OK
-[pdfjs] Compiled OK
-[raytrace] Compiled OK
-[regexp] Compiled OK
-[richards] Compiled OK
-[splay] Compiled OK
-[typescript] Compiled OK
-[zlib] Compiled OK
+Compiling 'box2d'...
+Done.
+Compiling 'code-load'...
+Done.
+Compiling 'crypto'...
+Done.
+Compiling 'deltablue'...
+Done.
+Compiling 'earley-boyer'...
+Done.
+Compiling 'gbemu'... (2 files)
+Done.
+Compiling 'mandreel'...
+Done.
+Compiling 'navier-stokes'...
+Done.
+Compiling 'pdfjs'...
+Done.
+Compiling 'raytrace'...
+Done.
+Compiling 'regexp'...
+Done.
+Compiling 'richards'...
+Done.
+Compiling 'splay'...
+Done.
+Compiling 'typescript'... (3 files)
+Done.
+Compiling 'zlib'... (2 files)
+Done.
--- a/nashorn/test/script/basic/compile-octane.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/compile-octane.js	Fri Aug 08 12:54:39 2014 -0700
@@ -22,10 +22,122 @@
  */
 
 /**
- * @test
- * @runif external.octane
- * @option -scripting
+ * Make sure that we run with the class cache off to so that every
+ * run produces compile time and with optimistic type info caching
+ * and persistent code store off, for the same reasons. These last two
+ * are currently default, but this is not guaranteed to be the case
+ * forever, so make this test future safe, we specify them explicitly
+ *
+ * This means that if you use this subtest as a compilation test
+ * harness, pass the arguments:
+ *
+ * -scripting -Dnashorn.typeInfo.disabled=true --class-cache-size=0 
+ * --persistent-code-cache=false
+ *
+ * @subtest
  */
 
-compile_only = true;
-load(__DIR__ + 'run-octane.js');
+load(__DIR__ + 'octane-payload.js');
+
+var DEFAULT_ITERS = 1; //default is one iteration through each benchmark
+var iters = DEFAULT_ITERS; 
+var args = [];
+
+if (typeof $ARGS !== 'undefined') {
+    args = $ARGS;
+} else if (typeof arguments !== 'undefined' && arguments.length != 0) {
+    args = arguments;
+}
+
+var onlyTheseTests = [];
+var verbose = false;
+
+for (var i = 0; i < args.length; ) {
+    var arg = args[i];
+    if (arg === '--iterations') {
+	iters = +args[++i];
+    } else if (arg === '--verbose') {
+	verbose = true;
+    } else {
+	onlyTheseTests.push(arg);
+    }
+    i++;
+}
+
+if (isNaN(iters)) {
+    iters = DEFAULT_ITERS;
+}
+
+if (iters != DEFAULT_ITERS) {
+    print("Running " + iters + " iterations of each compilation.");
+}
+
+function print_if_verbose(x) {
+    if (verbose) {
+	print(x);
+    }
+}
+
+function contains(a, obj) {
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] === obj) {
+            return true;
+        }
+    }
+    return false;
+}
+
+var testsCompiled = [];
+
+for (var j in tests) {
+    var test_name = tests[j].name;
+    var files = tests[j].files;
+
+    if (onlyTheseTests.length > 0 && !contains(onlyTheseTests, test_name)) {
+	print_if_verbose("Skipping " + test_name);
+	continue;
+    }
+
+    if (!contains(testsCompiled, test_name)) {
+	testsCompiled.push(test_name);
+    }
+
+    var str = "Compiling '" + test_name + "'...";
+    if (files.length > 1) {
+	str += " (" + files.length + " files)";
+    }
+    if (iters != 1) {
+	str += " (" + iters + " times)";
+    }
+    str + "...";
+    print(str);
+
+    for (var iteration = 0; iteration < iters; iteration++) {
+
+	//get a new global to avoid symbol pollution and reloads of base
+	//in the same namespace
+	var newGlobal = loadWithNewGlobal({script:'this', name:'test'});
+
+	//load base into the new global so we get BenchmarkSuite etc
+	newGlobal.load(base); 
+
+	//load all files in the single benchmark
+	for (var k in files) {	    
+	    var file = files[k];
+	    if (iteration >= 0) { //only display message on first iteration
+		var str2 = "\t";
+		if (iters > 1) {
+		    str2 += " [iteration " + (iteration + 1) + "]";
+		}
+		str2 += " processing file: " + file + "...";
+		print_if_verbose(str2);
+	    }
+	    newGlobal.load("file://" + path + file);
+	}
+    }
+    print("Done.");
+}
+
+if (testsCompiled.length == 0) {
+    print("Error: no tests given to compile");
+}
--- a/nashorn/test/script/basic/compile-octane.js.EXPECTED	Fri Aug 08 21:46:29 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-[box2d] Compiled OK
-[code-load] Compiled OK
-[crypto] Compiled OK
-[deltablue] Compiled OK
-[earley-boyer] Compiled OK
-[gbemu] Compiled OK
-[mandreel] Compiled OK
-[navier-stokes] Compiled OK
-[pdfjs] Compiled OK
-[raytrace] Compiled OK
-[regexp] Compiled OK
-[richards] Compiled OK
-[splay] Compiled OK
-[typescript] Compiled OK
-[zlib] Compiled OK
--- a/nashorn/test/script/basic/hideLocationProperties.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/hideLocationProperties.js	Fri Aug 08 12:54:39 2014 -0700
@@ -46,7 +46,7 @@
     (function() { print(__FILE__) })()
 }
 
-print(__FILE__)
+print(__FILE__.replace(/\\/g, "/"))
 
 var o = { __FILE__: "woot" }
 with(o) { print(__FILE__) }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/octane-payload.js	Fri Aug 08 12:54:39 2014 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @subtest
+ */
+
+function initZlib() {
+    zlib = new BenchmarkSuite('zlib', [152815148], [
+                            new Benchmark('zlib', false, true, 10,
+                                  runZlib, undefined, tearDownZlib, null, 3)]);
+}
+
+var tests = [
+    {name:"box2d",         files:["box2d.js"],                         suite:"Box2DBenchmark"},
+    {name:"code-load",     files:["code-load.js"],                     suite:"CodeLoad"},
+    {name:"crypto",        files:["crypto.js"],                        suite:"Crypto"},
+    {name:"deltablue",     files:["deltablue.js"],                     suite:"DeltaBlue"},
+    {name:"earley-boyer",  files:["earley-boyer.js"],                  suite:"EarleyBoyer"},
+    {name:"gbemu",         files:["gbemu-part1.js", "gbemu-part2.js"], suite:"GameboyBenchmark"},
+    {name:"mandreel",      files:["mandreel.js"],                      suite:"MandreelBenchmark"},
+    {name:"navier-stokes", files:["navier-stokes.js"],                 suite:"NavierStokes"},
+    {name:"pdfjs",         files:["pdfjs.js"],                         suite:"PdfJS"},
+    {name:"raytrace",      files:["raytrace.js"],                      suite:"RayTrace"},
+    {name:"regexp",        files:["regexp.js"],                        suite:"RegExpSuite"},
+    {name:"richards",      files:["richards.js"],                      suite:"Richards"},
+    {name:"splay",         files:["splay.js"],                         suite:"Splay"},
+    {name:"typescript",    files:["typescript.js", "typescript-input.js", "typescript-compiler.js"], suite:"typescript"},
+    //zlib currently disabled - requires read
+    {name:"zlib",          files:["zlib.js", "zlib-data.js"], suite:"zlib", before:initZlib}
+];
+
+var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
+
+// TODO: why is this path hard coded when it's defined in project properties?
+var path = dir + "../external/octane/";
+var base = path + "base.js";
+
--- a/nashorn/test/script/basic/optimistic_arithmetic_check_type.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/optimistic_arithmetic_check_type.js	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8036987, 8037572
  * @summary Implement tests that checks static types in the compiled code
+ * @option --optimistic-types=true
  * @run
  */
 
--- a/nashorn/test/script/basic/optimistic_assignment_check_type.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/optimistic_assignment_check_type.js	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8036987, 8037572
  * @summary Implement tests that checks static types in the compiled code
+ * @option --optimistic-types=true
  * @run
  */
 
--- a/nashorn/test/script/basic/optimistic_check_type.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/optimistic_check_type.js	Fri Aug 08 12:54:39 2014 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8036987, 8037572
  * @summary Implement tests that checks static types in the compiled code
+ * @option --optimistic-types=true
  * @run
  */
 
--- a/nashorn/test/script/basic/run-octane.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/basic/run-octane.js	Fri Aug 08 12:54:39 2014 -0700
@@ -24,36 +24,8 @@
 /**
  * @subtest
  */
-
-
-function initZlib() {
-    zlib = new BenchmarkSuite('zlib', [152815148], [
-                            new Benchmark('zlib', false, true, 10,
-                                  runZlib, undefined, tearDownZlib, null, 3)]);
-}
-
-var tests = [
-    {name:"box2d",         files:["box2d.js"],                         suite:"Box2DBenchmark"},
-    {name:"code-load",     files:["code-load.js"],                     suite:"CodeLoad"},
-    {name:"crypto",        files:["crypto.js"],                        suite:"Crypto"},
-    {name:"deltablue",     files:["deltablue.js"],                     suite:"DeltaBlue"},
-    {name:"earley-boyer",  files:["earley-boyer.js"],                  suite:"EarleyBoyer"},
-    {name:"gbemu",         files:["gbemu-part1.js", "gbemu-part2.js"], suite:"GameboyBenchmark"},
-    {name:"mandreel",      files:["mandreel.js"],                      suite:"MandreelBenchmark"},
-    {name:"navier-stokes", files:["navier-stokes.js"],                 suite:"NavierStokes"},
-    {name:"pdfjs",         files:["pdfjs.js"],                         suite:"PdfJS"},
-    {name:"raytrace",      files:["raytrace.js"],                      suite:"RayTrace"},
-    {name:"regexp",        files:["regexp.js"],                        suite:"RegExpSuite"},
-    {name:"richards",      files:["richards.js"],                      suite:"Richards"},
-    {name:"splay",         files:["splay.js"],                         suite:"Splay"},
-    {name:"typescript",    files:["typescript.js", "typescript-input.js", "typescript-compiler.js"], suite:"typescript"},
-    //zlib currently disabled - requires read
-    {name:"zlib",          files:["zlib.js", "zlib-data.js"], suite:"zlib", before:initZlib}
-];
-var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
-
-// TODO: why is this path hard coded when it's defined in project properties?
-var path = dir + "../external/octane/";
+var payload = __DIR__ + "octane-payload.js";
+load(payload);
 
 var runtime = undefined;
 var verbose = false;
--- a/nashorn/test/script/nosecurity/JDK-8050964.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/nosecurity/JDK-8050964.js	Fri Aug 08 12:54:39 2014 -0700
@@ -46,8 +46,11 @@
     nashornJar = new File(".", nashornJar);
 }
 
+var javahome = System.getProperty("java.home");
+var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater);
+
 // run jdep on nashorn.jar - only summary but print profile info
-`jdeps -s -P ${nashornJar.absolutePath}`
+`${jdepsPath} -s -P ${nashornJar.absolutePath}`
 
 // check for "(compact1)" in output from jdep tool
 if (! /(compact1)/.test($OUT)) {
--- a/nashorn/test/script/trusted/event_queue.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/trusted/event_queue.js	Fri Aug 08 12:54:39 2014 -0700
@@ -29,6 +29,7 @@
  * @fork
  * @option -Dnashorn.debug=true
  * @option --log=recompile:quiet
+ * @option --optimistic-types=true
  */
 
 print(Debug);
--- a/nashorn/test/script/trusted/optimistic_recompilation.js	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/script/trusted/optimistic_recompilation.js	Fri Aug 08 12:54:39 2014 -0700
@@ -28,6 +28,7 @@
  * @fork
  * @option -Dnashorn.debug=true
  * @option --log=recompile:quiet
+ * @option --optimistic-types=true
  */
 
 var forName       = java.lang.Class["forName(String)"];
--- a/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java	Fri Aug 08 21:46:29 2014 +0400
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java	Fri Aug 08 12:54:39 2014 -0700
@@ -607,6 +607,14 @@
         assertEquals(res, "hello");
     }
 
+    // @bug 8054223: Nashorn: AssertionError when use __DIR__ and ScriptEngine.eval()
+    @Test
+    public void check__DIR__Test() throws ScriptException {
+        final ScriptEngineManager m = new ScriptEngineManager();
+        final ScriptEngine e = m.getEngineByName("nashorn");
+        e.eval("__DIR__");
+    }
+
     // @bug 8050432:javax.script.filename variable should not be enumerable
     // with nashorn engine's ENGINE_SCOPE bindings
     @Test